github mw00/project-maya v1.0.15
Project Maya v1.0.15

latest releases: v1.1.74, v1.1.73, v1.1.72...
one month ago

Numbers in long prompts are now read correctly, and Maya is faster on consumer GPUs (it times the PCIe link the way decode uses it and stops re-reading experts from the SSD), plus Maya-S24 for 24 GB cards, Strix Halo support and two opt-in tier modes from the community.

Update: git pull, then ./setup.sh (Windows: START-MAYA.bat). For Maya-S24: ./setup.sh --setup --model Maya-S24 (Windows: START-MAYA.bat --setup --model Maya-S24).

What's new

  • Numbers in prompts are read the way GLM reads them (#27, found by @mab776): the server split every number in a prompt into single digits (Qwen's pre-tokenizer), where GLM groups up to three (504 is 50|4, not 5|0|4).
    • In long prompts numbers came back wrong (504 -> 5504 from ~12K tokens on, with every quant).
    • The server now uses the pre-tokenizer the model's tokenizer names. Numbers in a 32K and a 128K prompt came back exact (6 of 6, measured by @mab776).
    • Nothing to redo: the setup already stored it.
  • Maya-S24 (94.7 GB), for cards of 24 GB or less: Maya-S with its attention and shared experts in 4-bit (Q4_K) instead of 6-bit, so about 1.5 GB more of the card holds experts.
    • One Tesla V100 limited to 24 GB: decode (writing the answer) 11.8 -> 13.5 tokens/s (+14%). On the full 32 GB: 17.2 -> 19.1 (+11%). Prefill (reading the prompt) is the same.
    • It keeps 97.7% of the FP8 model's zero-shot accuracy (Maya-S: 97.9%).
    • The setup recommends it when every card has 24 GB or less; --model Maya-S24 picks it anywhere. Details: bench/results/MAYA-S24.md.
  • The CPU / PCIe split on consumer GPUs (#24 by @tanutanu56, found in #13): at start the engine times expert copies over PCIe to decide how many RAM-tier experts the CPU computes.
    • It timed them on an idle GPU. GeForce cards hold the link at Gen1 when idle, so the copies measured a link 3-8x slower than decode sees, and the CPU took experts PCIe moves faster.
    • The timing now runs with the GPU kept busy, on NVIDIA and AMD. Tesla cards like the V100 keep the link up, so nothing changes there.
  • Experts leaving VRAM are no longer read again from the SSD (#24): an expert moved down to RAM at the end of one token and needed again before its copy had landed was read from the SSD. It now waits for the copy and reads RAM.
    • 2x Tesla V100 with Maya-S: decode 28.4 / 28.9 -> 29.8 / 29.7 tokens/s, SSD reads per token 3.0 -> 2.2.
  • CPU-lane threads per GPU (#24): STRATA_GLM_CPU_LANE<n> sets GPU n's own count (a card in a narrow slot wants more than one on a wide link).
    • @tanutanu56's RTX 4070 Ti SUPER (PCIe 3.0 x4) + 5070 Ti, Maya-S: decode 8.1 -> 9.1 tokens/s with the defaults, 14.6 with the threads and the split tuned for that pair.
  • Two opt-in tier modes (#25, #26 by @handmade0octopus):
    • STRATA_GLM_RAM_RESIDENT=1 sizes the pinned RAM tier to hold every expert that isn't in VRAM, so nothing is ever evicted to the SSD (the start refuses if RAM can't hold them).
    • STRATA_GLM_PROMOTE_MIN=N keeps a fetched expert in VRAM only when it has been routed at least N times lately, so an expert used once no longer evicts a resident one.
    • RTX 4090 D, 128 GB RAM, Maya-S at 256K context, a 38K-token prompt: decode 11.8 -> 22.1 tokens/s with both, no SSD reads.
    • One AMD R9700 (measured by @boxwrench): 23.4 -> 24.5 tokens/s with PROMOTE_MIN=6, 25.1 with both, 25.55 with #24 as well (+9%).
  • An idle engine no longer holds a CPU core per GPU: its tier threads spun waiting for work. They now sleep when nothing runs (2x V100: 200% -> 2% of a core idle). Decode and prefill are unchanged (STRATA_GLM_SERVICE_IDLE_MS; 0 = spin always).
  • Sampled answers (temperature > 0) draw their token on the engine's own GPU stream instead of syncing the whole GPU every token: 2x V100, temperature 1.0: 26.7 / 26.6 -> 26.8 / 27.6 tokens/s. On Windows with an AMD GPU this also fixes answers that lost the prompt after their first token (#6, found by jerem91150).
  • AMD (experimental, by @boxwrench):
    • Faster decode expert kernels on RDNA3 / RDNA3.5 (#19: RX 7900 XT +8.6%, the same tokens).
    • The attention's prompt products in FP16 with a matrix-core attention kernel (#16: Strix Halo +16% prefill, RX 7900 XT +4% on 4K-token prompts).
    • --bench / --report on AMD (#18; --config FILE picks one installed setup).
    • Strix Halo (#17): the Ryzen AI Max+ 395's GPU shares the PC's memory, so the engine sizes its expert pool from the free RAM, and when the pool holds every expert the RAM tier only stages reads. Measured with Maya-S: prefill ~221 tokens/s on 3.5K-token prompts, decode 17.4 tokens/s.
    • A HIP build configured by hand without -DSTRATA_PREFILL_MMQ=ON now stops at configure and says so, instead of failing to link.
  • Windows: the page file the RAM tier needs (#20, reported by @anbow1): under Windows the card's memory and the pinned RAM tier are both charged to RAM + page file, so a small page file capped the RAM tier while RAM sat free (an RTX 5090 with 128 GB RAM: 2.4-4.1 tokens/s with an 8 GB page file, 8.4-11 with a 64 GB one).
    • --check now asks for at least your VRAM + 8 GB and says what a smaller one costs.
    • The engine warns at start when the commit limit, not the free RAM, caps its RAM tier.
  • The MTP draft block from a file: STRATA_GLM_MTP_GGUF=<file> now also replaces a model's own draft block, and tools/maya_quant/mtp_gguf.py writes a model's draft block alone as a small GGUF.
  • API (from Strata 0.1.40):
    • The client's stop strings end the answer (OpenAI stop, Anthropic stop_sequences with stop_reason: stop_sequence), but not inside the reasoning.
    • tool_choice works: none offers no tools, and required or a named function (Anthropic any / tool) starts the answer with the call.
    • response_format: json_object returns the JSON alone.
    • An empty assistant turn is no longer put back into the prompt.
    • The engine's start-up warnings show in the server window.
  • Activations can't turn into NaN in the quantizers (from Strata #1448): the FP16 scale of an activation block overflowed to infinity past ~8.3 million. It is now clamped at all four places it is written; below that the output is bit-identical.
  • CONTRIBUTING.md: what makes a useful speed report, bug report or pull request (#21). The README's table of users' speeds has 2x CMP 170HX with Maya-M at 61.3 tokens/s (#22, @ZackO2o).

Checked

  • 2x Tesla V100, Maya-S, 32K context (5 topics x 256 tokens): decode 29.3-30.2 tokens/s, prefill 665-672 tokens/s on the longest prompt. The launch engine (v1.0.0) on the same machine: decode 28.2-28.8, prefill 341-353.
  • The engine's parity tests and #17's glm_memory_test pass. The V100's prompt attention matches F32 (1.5e-4).
  • 142 Python tests pass (server, tool calls, setup, tokenizer, AMD installer). Tool calls work end to end.
  • NVIDIA code is unchanged by the AMD pull requests. We have no AMD hardware, so the AMD results are the contributors'. The Windows page-file warning is built and run on Linux here, not yet compiled on Windows.

Thanks to @mab776 (#27), @tanutanu56 (#13, #24), @handmade0octopus (#25, #26), @boxwrench (#16, #17, #18, #19), @anbow1 (#20), @ZackO2o (#22) and jerem91150 (#6).

Don't miss a new project-maya release

NewReleases is sending notifications on new releases.