Repository navigation
feat(models): run Inkling 2's bundled DSpark drafter - #3384
Merged
Merged
Conversation
inureyes
added a commit
that referenced
this pull request
Nov 24, 2026
Both Inkling 2 checkpoints ship a DSpark drafter in mtp.safetensors that mlxcel could not use. This ports mlx-vlm 466069f5's drafter (config validation, context-cached draft layers, the fuse-weight mix, the rnn_hidden Markov head with its one-time f64 fold into the LM head) as a DFlash-kind drafter, detected when --draft-model names an Inkling 2 directory with mtp_config and mtp.safetensors. The target half adds a verify forward with upstream's pre-layer captures inside the speculative append scope, suppressed ids on every verify row, rollback through trim_caches, and the block-versus-chain exactness probe. It is wired into the offline DFlash arm (image prompts prefill from merged embeddings), the server burst (B = 1, its own drafter family), the verify-width checks, and /v1/internal/mtp-policy, which now names a DFlash pairing with reason dflash_dispatch. On the M3 Ultra the probe declines at every width, so the drafter runs only with MLXCEL_MTP_ALLOW_INEXACT=1; there, 256-token greedy decode on Mini goes from 35.5 to 38.6 and 35.9 to 55.0 tok/s, and the proposals match mlx-vlm token for token where contexts agree. Small is deferred (download incomplete, #3373 open). Closes #3374
inureyes
force-pushed
the
feature/issue-3374-inkling2-dspark-drafter
branch
from
November 24, 2026 04:01
5120715 to
e382dd1
Compare
inureyes
marked this pull request as ready for review
November 24, 2026 04:03
Closed
5 tasks done
Merged
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3374
Runs the DSpark drafter that both Inkling 2 checkpoints bundle in
mtp.safetensors, ported from mlx-vlm 466069f5.--draft-model(server--model-draft) names the target directory itself; the pairing is detected frommtp_config.mlxcel-core/src/drafter/inkling2_dspark/): upstream config validation, context-cached draft layers (sliding and global), thefuse_weightmix, and thernn_hiddenMarkov head with its one-time f64 fold into the target LM head. Greedy only, verify width 2..=8.src/models/inkling2_speculative.rs): verify forward with upstream's pre-layer captures inside the speculative append scope, suppressed ids on every row, rollback throughtrim_caches, and the block-versus-chain exactness probe./v1/internal/mtp-policy, which now names a passing DFlash pairing with reasondflash_dispatch(documented; a declined pairing reportsexactness_declined).Validation (M3 Ultra, all GPU runs under the lock)
MLXCEL_MTP_ALLOW_INEXACT=1.docs/benchmark_results/inkling2-mini-dspark-m3ultra-2026-11-24.md.inkling2_dspark(13, host f64 reference for mix, Markov step, fold and draft_block across rounds),inkling2::speculative(emitted tokens equal the verify argmax every round),inkling,drafter::, coverage, detection, dispatch, mtp_policy. Clippy, fmt and the contract scripts pass.Deferred
.donemissing) and test(models): validate Inkling 2 Small on the real checkpoint #3373 open. The code path is the same, untested on a real checkpoint.