Flash-Next + Lightning MTP: per-cycle compute cost regression across dev3→main (5-version ladder, bisect-ready data)
Summary
Qwen3.8-Flash-Next-oQ4e-mtp + Lightning MTP shows a progressive per-cycle compute regression from dev3 through current main. We've tracked it across 5 tree versions on the same machine with identical config, and the data points to the backbone/verify compute path, not caching or draft quality.
Environment
- Mac Studio M3 Ultra 512 GB
Qwen3.8-Flash-Next-oQ4e-mtp, Lightning MTP, thinking disabled- Model settings:
mtp_enabled=true, depth 5 (field name changed — see breaking change below) - Quiet field (translation co-tenant stopped, 120 s settle), fresh restart per arm, same-prompt warm-up ×2, standalone-process timing, decode window = first→last content chunk (TTFT excluded), temp 0
5-version ladder (quiet-field warm decode @1K, tok/s)
| tree | main commit | mlx-vlm | median tok/s | cycle time | MTP accept |
|---|---|---|---|---|---|
| dev3 | 76d19fe |
0.6.3 | 167 | ~15 ms | 80-100% |
| dev4 bare | 14194fe |
0.7.1 | 85 | ~30 ms | 86-88% |
| dev4 + 3 fixes | 0578473 |
0.7.1 | 115 | ~25 ms | 87-88% |
| dev4 + 10 more | e3982c3 |
0.7.1 | 112 | ~25 ms | 87-88% |
| dev4 + 45 more (current main) | 5aa6c7f |
0.7.1 | 86 (adaptive) / 64 (fixed d5) | ~29-39 ms | 65-79% |
All rounds reported (Rascal-style, every measurement shown):
dev3: 167.5 / 167.9 / 168.2 · re-check: 167.4 / 167.7 / 167.5 / 167.6 dev4 bare: 84.4 / 84.5 / 84.4 / 86.8 · fresh restart: 81.7 / 84.5 / 87.4 / 85.0 / 84.8 dev4 + 3 fixes: 115.4 / 115.3 / 111.4 / 118.0 / 115.2 dev4 + 10 more: 111.5 / 115.3 / 111.5 / 115.7 dev4 + 45 more (adaptive): 86.7 / 86.3 / 86.2 / 86.6 dev4 + 45 more (fixed d5): 64.1 / 64.7 / 64.8 / 64.9
Three findings
1. The fundamental regression is per-cycle compute cost, not caching or draft quality
Accept rates are healthy across all arms (65-88%). The gap is cycle time: 15 ms (dev3) → 29-39 ms (current main) at similar tok/cycle (2.5). The backbone/verify path itself got 2-3× slower for qwen4_exp.
The three merged root-cause fixes (#3760 wrapper, #3776 GDN L2 gate, #3791 900 MiB expert copy) recovered 31 points (85→115), but the remaining 53-point gap (115 vs 167) is unaddressed. The latest 45 commits (including #3797, #3853, #3890, #3840, #3842, #3835) made it worse, not better (112→86).
2. mtp_num_draft_tokens silently removed with no migration path
In current main, mtp_num_draft_tokens is completely gone (zero references in the tree). It's replaced by mtp_fixed_depth and mtp_adaptive_max_depth. Existing model_settings.json files with mtp_num_draft_tokens=5 are silently ignored — MTP falls back to the adaptive controller with no depth cap, changing behavior without warning.
We'll submit a backward-compat PR for this separately.
3. Fixed depth 5 performs WORSE than adaptive in current main
With mtp_fixed_depth=5, depth histogram shows d3 acceptance at 3/14 = 21% (vs much higher on dev3), making deep drafts counterproductive:
adaptive: 81-86 tok/s (d1-d3, conservative)
fixed d5: 64-65 tok/s (d3+ acceptance broken → wasted verify cycles)This suggests the draft model's deeper positions have degraded in the mlx-vlm 0.7.1 path — possibly related to how the short-block MoE route materializes strided views during multi-token draft-head folds.
What would help narrow this
- A
perf-level flame graph or Metal trace comparing a single verify cycle on dev3 vs current main - Checking whether #3797's "batched rows share one pass over the weights" changed the single-stream path for
qwen4_exp - Verifying that the SpecPrefill draft state restoration (#3840/#3842) doesn't add per-cycle overhead when cache is hit
We're happy to run additional experiments on our M3 Ultra 512 GB if given specific builds or feature flags to test against.
Source: jundot/omlx