Repository navigation
Inkling 2: serve incoai's DFlash2 drafter (port of Enntity/atlas inkling2/dflash2-drafter, authorship intact) - #427
Merged
Conversation
A DFlash2 drafter for Inkling 2 reads the taps the bundled DSpark reads: what enters visits 5, 23 and 41, and the final-norm output (`target_layer_ids` [5, 23, 41, 48]). The factory now maps those taps to visit outputs for a DFlash2 drafter on an Inkling target as it does for DSpark (the last must be the final-norm output), and hands the drafter the target's final norm as shipped. The generic DFlash2 context projection is one `fc` over the concatenated taps, so `inkling_taps` copies each chunk of context rows, norms its last tap with Inkling's own `inkling2_rmsnorm`, and runs `fc` on the copy; the accumulator is never written, so a row projected again is normed again from its raw capture. The selector's `after_correction` softcap (30) is applied after a candidate's score, and tanh does not change which candidate scores highest, so Atlas's selector already picks the reference's drafts; only the reported confidences would differ. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit ca869e2)
- The per-row context projection (`forward_block`), the path a DFlash2 propose takes here, norms the last tap too (`inkling_tap_fc`) instead of refusing; the first build ran every step plain. - `kernels/gb10/inkling-2-mini/nvfp4/dflash2_selector_conf.cu`: GLM's confidence twin of the DFlash2 selector under a target-neutral module, so ATLAS_DFLASH_CONF_WIDTH sizes Inkling's DFlash2 verifies. The head asks for confidences on GLM and Inkling targets, and looks up only the twin the target ships (GLM's, edge weights included, on GLM; the neutral one elsewhere), so no target issues an unresolvable lookup. Observed on one GB10, dev build, voice services resident (0.5 of GPU memory), product settings per mode, 40 prompts (20 HumanEval, 10 GSM8K, 10 MMLU-Pro), reasoning low, temperature 0, aggregate tok/s, single runs, preliminary: Strict one request 53.2 with the bundled DSpark -> 64.7 with incoai/Inkling-2-Mini-DFlash2, two at once 67.3 -> 70.2; Spark one request 67.4 -> 78.8, two at once level (plain from two). Greedy text for 8 prompts x 320 tokens identical to plain decode at one and two requests, both modes. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 667de82)
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.
Brings @data-angel's
inkling2/dflash2-drafter-20261124(Enntity/atlas, the engine SparkInkling 0.5.0 ships) onto main. The two commits are cherry-picked with-x, authorship intact:3963d8851(ca869e213) Inkling 2: serve a DFlash2 drafter (incoai/Inkling-2-Mini-DFlash2)7c6b6f65d(667de82a3) Inkling 2 DFlash2: draft confidences, and the per-row context pathWhy. incoai's Inkling DFlash2 drafter reads the same four taps as the bundled DSpark: what enters visits 5, 23 and 41, then the final-norm output. Atlas loaded it, but used
[5, 23, 41, 48]as layer outputs. Three taps arrived one visit late and the fourth was never captured. On main it served correctly but gave no speedup: acceptance 0.8–1.8, code 36–45 tok/s, JSON 32 tok/s, below plain decode (sparky 203).Gate (sparky 206b, one GB10, native build of
7c6b6f65d, Inkling Strict, prefix cache on):-D warnings, spark-model--lib+ spark-server tests1:7,2:2,CONF_WIDTH=1,ADAPTIVE, MIN 1.2,GATE_FORCE=1)I wrote the tap shift and a final-norm tap independently before I found this branch (
fix/inkling-dflash2-fnorm, local, not proposed). I measured the shift alone at accept 1.25–2.90. This branch goes further: it adds the final norm on a chunk copy and the confidence twin of the selector. So this is the one to take.AMD:
dflash2_selector_conf.cuexists under gb10 only. The lookup is optional (.and_then(Result::ok), and only underATLAS_DFLASH_CONF_WIDTH), andinkling2_rmsnormis ininkling2_misc, which strix-hip links. A DevLab boot check is going on this branch.@data-angel — this is your branch rebased onto main. Shout if you'd rather open it yourself or change anything. The Inkling recipes (sparkrun-recipes#37) would move to this drafter as a follow-up once this lands.
🤖 Generated with Claude Code