Skip to content

perf(inkling): MTP is declined by the exactness gate and gives no speedup on Inkling-Small #3280

Done

Description

@inureyes

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.md with 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

  1. added
    status:ready
    type:performance
    priority:low
    area:models
    area:inference
    platform:macos
    modeltype:omni
    arch:moe
    on Nov 22, 2026
  2. inureyes commented on Nov 24, 2026

    @inureyes
    MemberAuthor

    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:

    • The block-versus-chain probe declines on Inkling 2 Mini at width 8 (464983 of 800232 logit bytes differ at verify position 0) and width 2 (559076), and on Inkling 2 Small (503855 of 800232), also with qmv_wide disabled. The drafter therefore stays off by default and the server serves classic decode.
    • Forced with 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.
    • The drafter's proposals equal mlx-vlm's token for token wherever the two contexts agree, so the drafter port is not the suspect. mlx-vlm has no gate and shows the same effect: its drafter-on text leaves its own classic text after about 213 characters.
    • feat(models): native batched decode and padded prefill for Inkling 2 #3392's batched decode shows the same class of difference: B=4 and B=8 rows differ from B=1 only at near ties (0 decided disagreements), but temperature-0 server answers are no longer byte-identical to solo answers.

    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.

  3. added
    status:in-progress
    status:review
    status:done
    and removed
    status:ready
    status:in-progress
    status:review
    on Nov 24, 2026
  4. added a commit that references this issue on Nov 25, 2026
    d5b565a
  5. added this to the 0.9 milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch:moearea:inferencearea:modelsmodeltype:omniplatform:macospriority:lowstatus:donetype:performance

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions