Repository navigation
Description
Problem / Background
The #1549 criterion "positive MTP throughput improvement" was not met in PR #3278 validation (M3 Ultra 512 GB); this issue tracks it.
PR #3278 placed Inkling MTP behind the shared block-vs-chain exactness gate (InklingModel::mtp_exactness_allows in src/models/inkling/speculative.rs). The probe declines at every draft width, including after the qmv_wide retry: verify-block position 0 differs from the single-token chain in about 47% of logit bytes. Suspected cause: at T = 1 the short convolutions (the decode_weight window multiply-sum instead of conv1d, src/lib/mlxcel-core/src/inkling_layer/attention.rs:24-77) and attention use different kernels than at T > 1.
Forcing MTP with MLXCEL_MTP_ALLOW_INEXACT=1 (128 greedy tokens, mlx-community/Inkling-Small-mlx-4bit target plus the native mtp.safetensors head) is slower than classic decode:
| Mode | tok/s |
|---|---|
| classic | 41.6 |
| width 2 | 26.6 |
| width 3 | 24.2 |
| width 10 (adaptive) | 10.8 |
Mean accepted length is 1.49 to 1.61. Upstream mlx-vlm with the same pair accepts 1.59 tokens per round (6.7% of drafted), so low acceptance is shared with the reference.
Acceptance Criteria
- Decide whether the T = 1 and T > 1 Inkling forward can be made byte-identical, or document why not. Add a probe test that fails on current code and passes after the fix, or that records the documented divergence. (bf16 0.6B and widths up to 8 on Inkling-Small via feat: survey speculative exactness and make Inkling verify exact #3415; width 10 and the partial-accept replay on Inkling-Small via the PR that closes this issue)
- Investigate acceptance (drafter chain indexing vs mlx-vlm, sampling of drafter hidden states), then either measure a throughput gain over classic at some width on M3 Ultra, or document that MTP does not help Inkling-Small and keep it off. (documented: no width beats classic; MTP stays opt-in)
- Update the Inkling MTP row in
docs/supported-models.mdwith the measured result. - Inkling 2 (comment of 2026-11-24): locate why verify position 0 differs from the single-token step and make the DSpark verify block exact (fix(inkling2): make speculative verify blocks byte-identical to decode #3405), then pick the verify width by measured throughput (update(inkling2): pick DSpark verify width by measured throughput #3417).
- Rerun the 128-token greedy benchmark (classic vs widths 2, 3, 10) on M3 Ultra and record tok/s and mean accepted length (
docs/benchmark_results/inkling-small-mtp-m3ultra-2026-11-25.md).
Verification
Rerun the 128-token greedy benchmark above, classic against widths 2, 3, and 10, on M3 Ultra, and record tok/s and mean accepted length.
Activity
fix(models): validate Inkling on real checkpoints, fix NVFP4 and MTP (#…
inureyes commentedon Nov 24, 2026
Inkling 2 hits the same wall, so this issue now covers both generations. Findings from #3384 (DSpark drafter) and #3397 (Small validation), measured on M3 Ultra:
qmv_widedisabled. The drafter therefore stays off by default and the server serves classic decode.MLXCEL_MTP_ALLOW_INEXACT=1, 256 greedy tokens: Mini 1.08x (prose) and 1.53x (code), Small 1.00x and 1.71x. Prose acceptance is low (Small 0.203, 1.42 accepted per round) and an 8-row verify costs about 107 ms against a 52 ms decode step on Small, so prose only breaks even.Next step, tracked here: locate which op makes verify position 0 differ from the single-token step on the current Inkling 2 checkpoints. One candidate specific to Inkling 2 is the query-dependent sink row, which is appended after the newest key, so it sits at key index N+1 in a single-token step but N+K in a K-row block and changes the SDPA reduction order even for row 0. The NVFP4/MXFP8 projections and the expert path (grouped kernel at B == 1, gather at L > 1) are the other candidates. A per-visit hidden-state comparison of the two arms will say which one it is.
fix(inkling2): keep verify blocks exact past the sliding window
fix(inkling2): prefill the DSpark prompt in the classic chunks
docs: add the #3405 technical report and changelog entry
fix(inkling2): make speculative verify blocks byte-identical to decode (
update(inkling2): pick DSpark verify width by measured throughput (#3417
update(inkling): make Inkling-Small MTP exact at every width (lablup#…