Skip to content

Inkling 2: serve incoai's DFlash2 drafter (port of Enntity/atlas inkling2/dflash2-drafter, authorship intact) - #427

Merged
AzeezIsh merged 2 commits into
mainfrom
port/inkling2-dflash2-drafter
Nov 25, 2026
Merged

AzeezIsh merged 2 commits into
mainfrom
port/inkling2-dflash2-drafter

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

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 path

Why. 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):

result
fmt, clippy -D warnings, spark-model --lib + spark-server tests clean · 5,925 passed, 0 failed
DFlash2, default env: accept per step 1.39–3.74 (main: 0.84–1.83)
DFlash2, default env: decode prose / code / json 38.6 / 54–56 / 43.5 tok/s
DFlash2 + #408 release env (1:7,2:2, CONF_WIDTH=1, ADAPTIVE, MIN 1.2, GATE_FORCE=1) 45.6 / 59.8 / 50.8 tok/s
DSpark, same build and env (unchanged by this PR: per-request acceptance identical to main's) 38.4 / 54.5 / 41.7 tok/s
greedy text vs plain decode, 8 prompts × 320 tokens, C1 DFlash2 default 8/8, DFlash2 release 8/8, DSpark 8/8
Qwen3.8-27B (QAD exact profile + its DFlash2) vs main greedy C1 8/8 identical
ERROR / panic 0

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.cu exists under gb10 only. The lookup is optional (.and_then(Result::ok), and only under ATLAS_DFLASH_CONF_WIDTH), and inkling2_rmsnorm is in inkling2_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

data-angel and others added 2 commits November 25, 2026 14:20
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)
@AzeezIsh
AzeezIsh merged commit b08e214 into main Nov 25, 2026
27 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants