Repository navigation
Releases
v26.11.4-botdev.5 — Argmax-First JSON/<think> Spec, 4→2 Group Syncs & Per-State Prefetch
Unified v26.11.4 M5 Ultra fork — bit-exact (0 diffs vs serial) DeepSeek-V4.1 & GLM-5.3 speedups + hardened constrained spec parity:
Highlights (v26.11.4-botdev.5)
- Argmax-first constrained verify (
prepareArgmax): replaces 16-optopK(64)+ dual Metal argsorts with a 2-op suppression-aware argmax + scalar gather across DeepSeek-V4.1, GLM-5.3, and serial JSON. SkipstopKon 95–99.9% of legal<think>and JSON verify rows, routes rare NaN-free misses to single-rowtopK, and routesNaN/-infdirectly to full-mask argmax (guaranteeing full-vocab NaN parity). - DeepSeek-V4.1
4→2exact group verify syncs & per-Stateprefetch: fuses batched verify + argmax into one eval with async group finish, moves draft-ahead prefetch onto per-slotState(0multi-slot prefetch misses), enables--dspark-overlapon constrained rounds, and mirrors reasoning-phase truncation in copy rounds (<think>copy hits). - Hardened constrained reasoning parity & error-path safety: preserves atomic
</think>closers that overlap EOS IDs (skip_eos_check), aligns reasoning repetition-loop recovery to the exact serial token index, and hardens DeepSeekcommitMain/dsparkRoundQueued/dspark_grouprollback error paths.
Verified M5 Ultra Results (0 Bit Diffs)
| Setup | Solo (drafted / plain) | Concurrent batched spec (N=2/3/4) |
JSON-schema + <think> spec (0 diffs) |
Peak Wired |
|---|---|---|---|---|
| DeepSeek-V4.1-Flash Lossless (512 GB) | 136–167 / 61 |
109.9 / 148.9 / 157.7 tok/s |
97.1 agg / 136.6 peak (2.28×) |
301.3 GiB |
DeepSeek-V4.1-Flash twig (256 GB) |
149–187 / 70 |
127.1 / 160.0–168.4 / 166.3–170.0 tok/s |
107.1 agg / 129.9 router / 143.6 peak (2.06×) |
216.0 GiB |
| Full 744B GLM-5.3 4-bit (512 GB) | 48–58 / 27 |
52.7 / 58.3 / 61.8–62.2 tok/s |
41.5–43.3 agg / 55.2 peak (1.81×) |
407.9 GiB |
Full build guide & launch recipes: BOTDEV.md
v26.11.4-botdev.4 — Bit-Exact JSON-Schema Spec Decode, GLM-5.3 Zero-Barrier vqmv & DSpark Overlap
Bit-exact greedy speculative decoding under JSON grammar (response_format: json_schema / json_object, including unbounded <think> → JSON reasoning spans), hybrid zero-barrier vqmv verify kernels for GLM-5.3, and async draft-ahead overlap / GPU-queued drafting for DeepSeek-V4.1 — all verified at 0 bit diffs against 1-row serial decode.
Verified Mac Studio M5 Ultra Results
| Model / Pack | Hardware | JSON-Schema Spec (0 diffs) |
Concurrent Batched Spec (N=2 / N=3 / N=4) |
Peak Wired |
|---|---|---|---|---|
| Full 744B GLM-5.3 (4-bit) | 512 GB M5 Ultra | 43.3 tok/s agg (1.43× serial; 45–46.4 strict, 55.2 json_object 1.81×) |
52.7 / 58.3 / 61.8 tok/s (0 diffs; solo ddalcu#2/+7%, ddalcu#3/+16%) |
407.9 GiB |
DeepSeek-V4.1-Flash twig Hybrid |
256 GB M5 Ultra | 105.5 tok/s agg (1.56× serial incl. <think>; 112–119 strict, 143.2 json_object 2.06×) |
123.3 / 162.7 / 167.7 tok/s (0 diffs; +5.9% at N=4 with overlap+queue) |
214.4 GiB |
| DeepSeek-V4.1-Flash Lossless | 512 GB M5 Ultra | Supported (dspark constrained greedy) |
102.6 / 146.2 / 153.6 tok/s (0 diffs) |
300.8 GiB |
What's New
- Bit-exact greedy JSON-schema &
<think>speculative decoding (src/engines/mlx/grammar/greedy.zig,src/engines/mlx/spec/dspark_constrained.zig): Admits clean greedy grammar-constrained requests on native draft stages across all HTTP API surfaces (chat_completions,responses,anthropic,ollama,cli,batch), truncating drafts against the JSON grammar automaton (and unbounded<think>reasoning boundaries) before verify, selecting exact constrained argmax via a GPU top-64 shortlist with full-mask fallback on misses, and rolling back on first mismatch (0diffs vs serial, including SSE streaming and<think>→ JSON hand-offs). - GLM-5.3 hybrid zero-barrier
vqmvverify kernels (src/plugins/glm_moe_dsa/): DispatchesK <= 4to zero-barrier streaming L1glm_dec_qmv2_l1_slice_h(cutting 78-layerqkv+overify from25.4 → 9.9 msatR=3and17.9 → 10.8 msatR=4) andK > 4to double-buffered direct-u4TG SRAM (NB <= 8,18.6 msatR=8), withR=2..16self-check coverage and GLM-5.3 absent/unknown effort defaulting tohigh(thinking-off tolow). - DeepSeek-V4.1 async draft-ahead overlap & GPU-queued drafting (
--dspark-overlap,--dspark-queue 0.65): Wires realdsparkPrefetchoverlap anddsparkRoundQueued(chaining speculative full-accept commit + next draft behindasyncEval(am32)with exact state save/restore on partial accept), cutting GPU wait by ~28% (8.29 → 5.98 ms) and liftingtwigN=4from158.4 → 167.7 tok/s(+5.9%) andN=1copy by +10.7%. scripts/serve-twig.sh: Enables--dspark-overlap --dspark-queue 0.65on the 256 GB profile by default.
v26.11.4-botdev.3 — Bit-Exact Batched Speculative Decoding (N=2..4)
Bit-exact batched speculative decoding across N=2..4 concurrent streams on both flagship models — one unified ReleaseFast binary, 0 bit diffs against 1-row serial decode across greedy, mid-stream join/leave, cancel, and seeded stochastic runs.
Verified Mac Studio M5 Ultra Results
| Model / Pack | Hardware | Solo Decode | Concurrent Batched Spec (N=2 / N=3 / N=4) |
Peak Wired |
|---|---|---|---|---|
| Full 744B GLM-5.3 (4-bit) | 512 GB M5 Ultra | 47–49 tok/s (57.9 code; 27 plain) | 53.4 / 59.5 / 62.2 tok/s (0 diffs; +17% to +24% vs plain batched) |
407.8 GiB |
| DeepSeek-V4.1-Flash Lossless | 512 GB M5 Ultra | 136–167 code/edit (61 plain) | 102.6 / 146.2 / 153.6 tok/s (0 diffs; +14% to +34% vs plain batched) |
300.8 GiB |
DeepSeek-V4.1-Flash twig Hybrid |
256 GB M5 Ultra | 149–187 code/edit (70 plain) | 123.4 / 161.5 / 163.6 tok/s (0 diffs; +31% to +53% vs plain batched) |
216.2 GiB |
What's New
- GLM-5.3 (
glm_moe_dsa): Bit-exact batched speculative decoding (batched_spec=onforN=2..4),vec<T,4>threadgroup SRAM verify kernels avoiding Apple GPU's 16 KiB occupancy cliff (-20.5 msonR=8qkv+o),R=2..16dual-64-bit ballot MoE dedup, batched depth-by-depth MTPdraftBatchsharinglm_headand MTP MoE across active slots, confidence-gated bonus verify rows (R <= 10,cum_p >= 0.94), and position-keyed RNG parity for seeded sampling (temp > 0). - DeepSeek-V4.1 (
deepseek_v41):--exact-group-verifyfor bit-exact concurrent DSpark drafting + verification up toR=16, fused batched stage drafting (stageInputFused/stageAttention/stageMoeFused+ slim tiled draftin_proj), 128-bit ballot--dec-hyb-deduplifted toR=2..16(register-chunked shared expert + colliding hot MXFP4 dedup), true-rounddraft_msgroup pricing +GroupCostcompile-spike guard, and startupR=2..16pre-warming under--dspark-warm. scripts/serve-twig.sh: Enables--exact-group-verify(both 256 GB and 512 GB profiles) and--dec-hyb-dedupon the 256 GB profile by default.