Inkling-2-Mini DotH-DWarp-v1

DWarp-v1 is an open-weights, hardware-co-designed multi-regime speculative decoding drafter for thinkingmachines/Inkling-2-Mini, built on the DWarp framework.

It is not a standalone language model: it pairs with frozen Inkling-2-Mini inside a speculative decoding runtime to propose up to 15 draft tokens per parallel pass (B = 16), which the target model verifies in parallel. Because every drafted token undergoes exact target verification (greedy exactness at T = 0, exact sparse residual rejection sampling at T > 0), decoding is 100% mathematically lossless and preserves Inkling-2-Mini's exact output distribution.

NOT AVAILABLE YET ON VELOGB10 (PENDING THE NEXT RELEASE).

Full native sm_121a CUDA/Rust runtime support for DWarp-v1 (including the 32 KB L1-resident Top-64 CUDA-graphed Markov loop, plausibility-gated Carry-Over Edit, 4/6-MSE NVFP4 backbone kernels, batched multi-lane draft_multi, and TP1–TP8 cluster serving) will ship in the next version of veloGB10. Complete standalone PyTorch reference code is included in reference/ so researchers and engine developers can inspect, test, or integrate DWarp-v1 immediately.


Highlights

  • +29.6% to +37.7% higher median decode & -8.5% to -20.3% lower TPOT over Inkling-2-Mini's bundled stock DSpark (mtp.safetensors) across TP=1, TP=2, and TP=4 on NVIDIA DGX Spark (GB10), with TP=2 DWarp-v1 (111 tok/s) approaching TP=4 Stock DSpark (122 tok/s) on half the nodes.
  • Eliminates high-entropy prose collapse: On sampled creative writing (Story), stock DSpark drops to 1–12% acceptance, whereas DWarp-v1 sustains 22–44% acceptance (peaking at 128 tok/s on TP=2 and 165 tok/s on TP=4).
  • Higher throughput floor on 12/12 turns: Every single turn's minimum tok/s increased under DWarp-v1 (+2.4% to +50.1%), cutting First Visible Output latency by -41.7% to -61.1%.
  • +43.4% greedy / +30.8% sampled offline acceptance gain (B = 16, L1 Top-64): Across 5 held-out regimes (code, long_ctx, math, prose, tools; 480 blocks/regime), the 32 KB L1-resident Top-64 shortlist retains 99.94% of full-vocab greedy acceptance and outperforms full-vocab at T = 0.85 (4.312 vs 4.276 tokens/verify step).
  • Both BF16 and pre-quantized NVFP4 checkpoints included: Canonical 418.96M-parameter BF16 weights (dwarp.safetensors, 800 MiB) alongside a self-contained pre-quantized Four Over Six (4/6-MSE) NVFP4 backbone checkpoint (dwarp_nvfp4.safetensors, 321 MiB).

Repository Contents & Checksums

File Format / Purpose Size SHA-256
dwarp.safetensors Canonical BF16 checkpoint (101 tensors, 418.96M params) 800 MiB (837.9 MB) 58ca02fe315eaf9249b64fbc22b7643344210e35e4d1f9817834e5f931df58c5
dwarp_nvfp4.safetensors Pre-quantized standalone NVFP4 (4/6-MSE 36 backbone projs + 65 BF16 sensitive tensors, mean rel-RMSE 8.65%) 321 MiB (336.0 MB) 23bd42cd3bb9cf3d78d63da0c635921617221c09c2e3317a6fade5ab679b89b6
dwarp_config.json Architecture & tap configuration 544 B β€”
reference/dwarp_model.py Canonical PyTorch implementation (DWarpV1, DWarpConfig, DWarpLayer, DWarpHead, DynConv2, StockDSpark) 30 KB β€”
reference/inference_example.py Runnable Python reference: B=16 1-pass draft + L1 Top-64 fold_w + plausibility-gated Carry-Over Edit + lossless verification 17 KB β€”
reference/eval_dwarp.py 5-regime held-out offline evaluator matching the benchmark tables below 22 KB β€”
reference/quantize_dwarp_nvfp4.py Offline Four Over Six (4/6-MSE) NVFP4 backbone quantizer reproducing dwarp_nvfp4.safetensors 6.4 KB β€”
eval/final_eval.json Raw 480-block/regime offline evaluation JSON receipt 2.0 KB β€”
eval/modes_ablation_final.json Raw 240-block/regime 4-mode ablation JSON receipt 2.5 KB β€”
LICENSE Apache License 2.0 12 KB β€”

Live Hardware Benchmarks (NVIDIA DGX Spark / GB10)

End-to-end serving benchmarks measured on NVIDIA DGX Spark (GB10, sm_121a, LPDDR5X unified memory) running thinkingmachines/Inkling-2-Mini under the upcoming veloGB10 integration (DWarp-v1 NVFP4 backbone + 32 KB L1 Top-64 Markov shortlist + plausibility-gated Carry-Over Edit q >= 0.05) vs. Inkling-2-Mini's bundled stock DSpark (mtp.safetensors).

1. Compact Comparison (VeloBenchmark 0.4.2 Β· 1_DECODE_TEST, Stock DSpark vs DWarp-v1)

Topology Drafter Median Decode TPOT Ansi C (Med) Python (Med) Philosophy (Med) Story (Med / Acc)
TP=1 Stock DSpark 56.8 tok/s 19.9 ms 64.3 tok/s 88.1 tok/s 51.8 tok/s 41.7 tok/s (12%)
TP=1 DWarp-v1 73.6 tok/s (+29.6%) 18.2 ms (-8.5%) 94.2 tok/s (+46.5%) 91.7 tok/s (+4.1%) 56.4 tok/s (+8.9%) 43.5 tok/s (+4.3%) / 22%
TP=2 Stock DSpark 80.6 tok/s 14.8 ms 131 tok/s 137 tok/s 65.3 tok/s 65.6 tok/s (1%)
TP=2 DWarp-v1 111 tok/s (+37.7%) 11.8 ms (-20.3%) 135 tok/s (+3.1%) 151 tok/s (+10.2%) 88.9 tok/s (+36.1%) 78.6 tok/s (+19.8%) / 44%
TP=4 Stock DSpark 122 tok/s 10.5 ms 198 tok/s 208 tok/s 103 tok/s 90.0 tok/s (2%)
TP=4 DWarp-v1 168 tok/s (+37.7%) 8.7 ms (-17.1%) 195 tok/s (-1.5%) 201 tok/s (-3.4%) 119 tok/s (+15.5%) 104 tok/s (+15.6%) / 38%

2. Detailed Session-Level Metrics

Metric TP=1 Stock TP=1 DWarp TP=1 Ξ” TP=2 Stock TP=2 DWarp TP=2 Ξ” TP=4 Stock TP=4 DWarp TP=4 Ξ”
Decode Median (p50) 56.8 tok/s 73.6 tok/s +29.6% 80.6 tok/s 111 tok/s +37.7% 122 tok/s 168 tok/s +37.7%
Decode p90 99.0 tok/s 104 tok/s +5.1% 155 tok/s 162 tok/s +4.5% 219 tok/s 213 tok/s -2.7%
Decode p99 110 tok/s 119 tok/s +8.2% 176 tok/s 171 tok/s -2.8% 238 tok/s 229 tok/s -3.8%
Decode Min / Max 39.7 / 115 38.0 / 124 -4.3% / +7.8% 62.3 / 197 73.5 / 175 +18.0% / -11.2% 86.9 / 250 85.9 / 234 -1.2% / -6.4%
TPOT (ms/tok) 19.9 ms 18.2 ms -8.5% 14.8 ms 11.8 ms -20.3% 10.5 ms 8.7 ms -17.1%
ITL p50 / p90 / p99 0.04 / 49.7 / 62.9 0.04 / 45.4 / 64.8 p90 -8.7% 0.04 / 36.4 / 42.1 0.04 / 28.7 / 35.4 p90 -21.2% 0.05 / 23.6 / 27.6 0.05 / 20.7 / 24.9 p90 -12.3%
TTFT p50 / p99 0.19s / 188ms 0.18s / 190ms -5.3% 0.13s / 155ms 0.11s / 124ms -15.4% 0.09s / 99ms 0.09s / 100ms 0.0%
First Visible Output p50 16.96s 8.86s -47.8% 11.71s 4.55s -61.1% 4.29s 2.50s -41.7%
Prefill Avg ~274 tok/s ~261 tok/s -4.7% ~388 tok/s ~422 tok/s +8.8% ~543 tok/s ~514 tok/s -5.3%
Stability / Run CV 93% / 31% 92% / 33% -1pp / +2pp 91% / 34% 96% / 30% +5pp / -4pp 96% / 40% 96% / 32% 0pp / -8pp
Tokens (Reas / Out) 12,476 (24% reas) 12,002 (14% reas) -3.8% 14,027 (17% reas) 9,812 (16% reas) -30.0% 10,747 (13% reas) 11,741 (12% reas) +9.2%
Session Duration 3m 7.3s 2m 40.4s -14.4% 2m 11.5s 1m 23.3s -36.7% 1m 13.8s 1m 13.9s +0.1%

3. Per-Turn Breakdown (Med / Min–Max tok/s, Speculation Acceptance %, Draft Depth)

Turn Topology Stock Med (Min–Max) DWarp Med (Min–Max) Med Ξ” Min Ξ” Stock Acc / Depth DWarp Acc / Depth
1. Ansi C pure code TP=1 64.3 (43.6–107) 94.2 (55.7–123) +46.5% +27.8% 72% / 4.5 75% / 4.9
TP=2 131 (64.3–159) 135 (96.5–167) +3.1% +50.1% 67% / 5.3 73% / 4.4
TP=4 198 (112–227) 195 (121–215) -1.5% +8.0% 77% / 5.0 73% / 4.3
2. Python Code TP=1 88.1 (47.6–115) 91.7 (57.4–124) +4.1% +20.6% 76% / 5.1 76% / 4.7
TP=2 137 (68.0–197) 151 (90.9–175) +10.2% +33.7% 73% / 5.8 75% / 4.6
TP=4 208 (119–236) 201 (136–234) -3.4% +14.3% 78% / 5.3 75% / 4.4
3. Philosophy TP=1 51.8 (47.2–63.4) 56.4 (49.5–76.3) +8.9% +4.9% 48% / 2.7 48% / 2.4
TP=2 65.3 (61.4–88.7) 88.9 (82.5–106) +36.1% +34.4% 28% / 2.8 44% / 2.7
TP=4 103 (92.4–109) 119 (109–128) +15.5% +18.0% 41% / 3.2 45% / 3.0
4. Story TP=1 41.7 (37.1–61.1) 43.5 (38.0–64.0) +4.3% +2.4% 12% / 2.4 22% / 2.2
TP=2 65.6 (59.6–69.1) 78.6 (73.5–128) +19.8% +23.3% 1% / 2.3 44% / 2.4
TP=4 90.0 (83.0–95.5) 104 (88.7–165) +15.6% +6.9% 2% / 3.0 38% / 3.0

Key Hardware Takeaways:

  • Consistent ~30–38% higher median decode & 9–20% lower TPOT across all three topologies (TP=1 +29.6%, TP=2 +37.7%, TP=4 +37.7%), with TP=2 DWarp-v1 (111 tok/s) approaching TP=4 Stock DSpark (122 tok/s) on half the nodes.
  • No prose collapse: Stock DSpark collapsed to 1–12% acceptance on Story, while DWarp-v1 held 22–44% (peaking at 128 tok/s on TP=2 and 165 tok/s on TP=4).
  • Higher floor on all 12/12 turns: Every turn's Min tok/s improved under DWarp-v1 (+2.4% to +50.1%), reducing run-to-run CV at TP=2 (34% β†’ 30%) and TP=4 (40% β†’ 32%).
  • Bit-exact greedy & lossless sampling verified: On T = 0 parity checks, DWarp-v1 matched Stock DSpark and plain decoding character-for-character (3,457/3,457 chars on AnsiC_T0, 3,585/3,585 chars on Python_T0). The Top-64 shortlist sparse residual sampler passed a 400,000-trial $\chi^2$ goodness-of-fit test against the exact target distribution.

Offline Held-Out 5-Regime Acceptance & 4-Mode Ablation

Measured against frozen thinkingmachines/Inkling-2-Mini target logits on a locked held-out on-policy evaluation split (40 sequences Γ— 12 anchors = 480 blocks per regime; metric: $\tau = 1 + \mathbb{E}[\text{accepted drafts}]$, mean emitted tokens per verify step). Evaluated at Greedy (g: T = 0) and Sampled (s: T = 0.85, top_p = 0.95, top_k = 128). Raw receipts: eval/final_eval.json and eval/modes_ablation_final.json.

1. Per-Regime Acceptance Breakdown (480 blocks/regime)

Regime Stock DSpark (B=8) g / s DWarp-C8 (B=8) g / s DWarp-C16 (Full Vocab) g / s DWarp-Top64 (B=16, L1 32 KB) g / s DWarp-Tree16 (M <= 16) g / s Gain (Top64 | Tree16 vs Stock)
code 3.85 / 3.82 4.05 / 3.74 4.72 / 4.17 4.71 / 4.20 4.94 / 4.35 +22.4% / +10.0% | +28.5% / +13.8%
long_ctx 2.11 / 2.07 2.59 / 2.34 2.74 / 2.39 2.75 / 2.43 2.99 / 2.63 +30.2% / +17.5% | +41.8% / +27.1%
math 3.96 / 3.90 4.51 / 4.09 5.03 / 4.41 5.03 / 4.43 5.25 / 4.56 +27.2% / +13.7% | +32.7% / +16.8%
prose 2.53 / 2.48 3.05 / 2.87 3.29 / 3.00 3.29 / 3.04 3.56 / 3.21 +30.4% / +22.6% | +40.9% / +29.2%
tools 4.21 / 4.20 5.43 / 5.16 8.12 / 7.41 8.10 / 7.45 8.10 / 7.49 +92.4% / +77.2% | +92.5% / +78.1%
Macro Avg 3.330 / 3.295 3.925 / 3.638 4.780 / 4.276 4.777 / 4.312 4.971 / 4.446 +43.4% / +30.8% | +49.2% / +34.9%

2. 4-Mode Architecture Ablation (240 blocks/regime)

Regime Mode 1: Cold Top64 g / s Mode 2a: Edit-Synonym g / s Mode 2b: Edit-Shift+1 g / s Mode 2c: Edit-Stale g / s Mode 3a: 1-Pass Tree16 g / s Mode 3b: 2-Pass Tree16 g / s
code 3.97 / 3.74 6.78 / 5.27 5.70 / 4.69 3.57 / 3.42 4.37 / 3.95 4.37 / 3.99
long_ctx 2.55 / 2.35 3.39 / 2.83 3.00 / 2.67 2.35 / 2.20 2.87 / 2.54 2.89 / 2.55
math 5.09 / 4.57 7.70 / 6.60 6.80 / 5.73 4.58 / 4.15 5.26 / 4.67 5.28 / 4.69
prose 3.54 / 3.14 4.41 / 3.79 4.34 / 3.57 3.38 / 2.99 3.71 / 3.30 3.58 / 3.31
tools 8.06 / 7.44 9.56 / 8.29 9.13 / 7.86 6.99 / 6.60 8.11 / 7.46 8.08 / 7.47
Macro Avg 4.641 / 4.248 6.370 / 5.357 5.795 / 4.905 4.171 / 3.873 4.864 / 4.383 4.838 / 4.401
Ξ” vs Cold β€” +37.3% / +26.1% +24.9% / +15.5% -10.1% / -8.8% +4.8% / +3.2% +4.2% / +3.6%

Three Practical Discoveries from the Ablation:

  1. 32 KB L1 Top-64 fold_w matches/beats full-vocab: Restricting the Markov head to only the Top-64 candidate rows from base_logits (64 Γ— 256 Γ— 2B = 32 KB vs 103 MB full vocab) retains 99.94% of greedy acceptance (4.777 vs 4.780) and exceeds full-vocab at T = 0.85 (4.312 vs 4.276, because clipping long-tail noise improves probability alignment).
  2. Plausibility-gated Carry-Over Edit captures a free +25–37% boost without stale-tail risk: Reusing rejected draft suffixes via edit_gate yields +37.3% g / +26.1% s on 1-token synonym mismatches and +24.9% g / +15.5% s on Β±1-token shifts at 0 ms extra drafter latency, while completely unrelated stale tails hurt -10.1% / -8.8%. Gating Carry-Over Edit strictly on the target correction token $x^*$ having $q_{\text{acc}}(x^*) \ge 0.05$ under DWarp's previous-round shortlist keeps the edit windfall and avoids stale tails.
  3. 1-Pass Tree16 eliminates the need for a 2nd backbone pass: DWarpHead (Micro-RNN + pair_gate) + DynConv2 is strong enough in Pass 1 that 1-Pass Tree16 (4.864 / 4.383) matches or beats 2-Pass Tree16 (4.838 / 4.401), removing Pass-2 backbone overhead completely.

Research Overview: The DWarp Framework

DWarp separates a model-agnostic speculative decoding framework from target-specific model adapters. It addresses two bottlenecks common in existing parallel block-diffusion drafters:

  1. High-entropy prose / long-context degradation (caused by suffix decay in bidirectional mask blocks, narrow training mixes, and logit over-sharpening from uncalibrated losses).
  2. Memory-bandwidth & TP-collective stalls on large-vocabulary models ($V \approx 128\text{K–256K}$), where scanning the full folded vocabulary projection (fold_w, ~65–130 MB) sequentially on every draft step dominates runtime on unified-memory accelerators (e.g., GB10 at 238–273 GB/s).
flowchart TD
    Taps["Target Residual Taps (N_tap)"] --> Mix["Per-Layer Softmax Tap Fusion + RMSNorm (DFlare-style)"]
    Taps --> Delta["Convergence Delta: RMSNorm(h_late - h_mid)"]
    BlkIn["Unified B=16 Block Input: Anchor | Cold Mask | Carry-Over Edit | Commit + slot_pos_embed + samp_feat(T, top_p)"] --> Layers
    Mix --> Layers["L_d Hybrid Layers (SWA + Global) wrapped with Tree-Aware DynConv2 (Attn & MLP)"]
    Layers --> Norm["Final RMSNorm -> base_hidden [B-1, D]"]
    Norm --> BaseHead["Single Target LM Head -> Top-64 Shortlist"]
    Norm --> Pivot["pivot_mlp([fin_h || Delta || s16]) -> Calibrated P(accept_r)"]
    Delta --> Pivot
    Delta --> FRNN["f_rnn + delta_proj(Delta)"]
    FRNN --> RNN["DWarpHead: Micro-RNN + pair_gate([fin_h || s_j]) * w1"]
    BaseHead --> L1Fold["L1-Resident Top-64 Folded Head (32 KB/step, 100% Lossless)"]
    RNN --> L1Fold

Core Model-Agnostic Mechanisms

  1. Compact Hybrid SWA + Global Block-Diffusion Backbone (B = 16):
    Runs $L_d$ lightweight dense layers over a B = 16 block (1 anchor + 15 draft slots) in one parallel pass. Most layers use Sliding-Window Attention (W = 1024) to bound context KV reads, while one interior Global Attention layer preserves long-context retrieval across 8K–256K+ prompts. Context KV projections (k_proj_ctx, v_proj_ctx) are cached once at commit time from learned softmax mixtures of target residual taps (following Tencent's DFlare layer-wise fusion).

  2. Tree-Aware Grouped Dynamic Convolutions (DynConv2):
    Building directly on Inco AI / z-lab's DFlash 2 two-tap dynamic convolution and generalizing tap-1 indexing to arbitrary tree parent pointers parent_idx[r], DynConv2 (group_size = 16) wraps both Attention and SwiGLU MLP after RMSNorm in every layer: $$\Delta k_r = \mathrm{reshape}!\big(x_r W_{\text{dyn}}^\top,; [2, D/G]\big), \qquad k_{r,0} = w_0 + \mathrm{repeat}G(\Delta k{r,0}), \qquad k_{r,1} = w_1 + \mathrm{repeat}G(\Delta k{r,1})$$ $$y_r = k_{r,0} \odot x_r + k_{r,1} \odot x_{\mathrm{parent}(r)}, \qquad x_{-1} \equiv \mathbf{0}$$ Initialized to exact identity ($w_0 = \mathbf{1}, w_1 = \mathbf{0}, W_{\text{dyn}} = \mathbf{0}$), DynConv2 suppresses suffix decay across 15 draft positions while remaining safe for both linear chains (parent = r - 1) and branching trees without cross-branch leakage.

  3. Universal Convergence Delta ($\Delta_{\text{conv}}$):
    Captures target internal convergence before generation by normalizing the residual difference between late and mid target taps: $$\Delta_{\text{conv}} = \mathrm{RMSNorm}{\text{no-weight}}!\big(h^{(\text{late})}{P-1} - h^{(\text{mid})}_{P-1}\big)$$ Projected via a zero-initialized linear layer into f_rnn and concatenated into pivot_mlp.

  4. Unified 3-Mode Block Conditioning + Sampler (T, top_p) Adaptation:
    Sampler parameters [clamp(T, 0, 2), clamp(top_p, 0, 1), I(T <= 1e-4), T * top_p] pass through samp_feat (4 -> 64 -> 16) and zero-init samp_to_hidden (16 -> D). The same weights serve:

    • Cold B = 16 Chain: $h_r = m_{\text{mask}} + e_{\text{pos}}[d_r] + s_D$.
    • Plausibility-Gated Warm-Start Carry-Over Edit: When round $t$ rejects at slot $a < c$ with target correction $x^*$ and $q_a(x^*) \ge 0.05$, the unused draft suffix draft[a+1..c] is blended additively into round $t+1$'s mask slots: $$h_r = h_r^{\text{cold}} + \sigma(g_{\text{edit}}) \odot \big(E(\text{carry}_r) + e_{\text{edit}}\big)$$ allowing bidirectional attention + DynConv2 to repair synonym swaps and Β±1-token shifts in a single pass with zero extra FLOPs. (Unlike Koo et al.'s *Carryover Drafting*, which recycles rejected *target hidden states* as temporary KV context, DWarp injects rejected *draft tokens* directly into block mask embeddings and protects against topic-shift tails with the q >= 0.05 plausibility gate.)
    • Committed Pivot-Tree Slots (commit_embed): Optional strict-sibling-isolated branch roots.
  5. Foldable Context-Gated Bilinear Markov Head (DWarpHead) & pivot_mlp:
    Extends DeepSeek-AI's DSpark rank-$R$ (R = 256) micro-RNN with a DFlash 2-inspired context-gated bilinear interaction pair_gate living inside $\mathbb{R}^R$: $$[g_j, c_j, o_j] = W_{\text{rnn}},[s_{j-1} ,|, w_1(\text{prev}j) ,|, h{\text{fin}, j} ,|, f_{\text{rnn}}] + b_{\text{rnn}}$$ $$s_j = \sigma(g_j) \odot s_{j-1} + \big(1 - \sigma(g_j)\big) \odot \tanh(c_j)$$ $$z_j = \tanh(o_j) + \tanh!\big(W_{\text{pair}},[h_{\text{fin}, j} ,|, s_j] + b_{\text{pair}}\big) \odot w_1(\text{prev}j)$$ $$\ell_j = \mathrm{softcap}!\Big(\underbrace{W_U h{\text{fin}, j}}{\text{base}j} + \underbrace{(W_U b{\text{out}})}{\text{fold_b}} + \underbrace{(W_U W_{\text{out}})}_{\text{fold_w} \in \mathbb{R}^{V \times R}}, z_j\Big)$$ Because pair_gate * w1 stays in $\mathbb{R}^R$, it folds algebraically through the exact same precomputed fold_w matrix. A lightweight pivot_mlp over [h_fin,r || Delta_conv || s16] predicts calibrated per-slot acceptance probabilities.

  6. Co-Trained 32 KB L1-Resident Top-64 fold_w & Asymmetric 4/6-MSE NVFP4:

    • Top-64 Shortlist (S = 64): base_hidden is co-trained with a shortfall-only Top-64 coverage loss $\mathrm{ReLU}(\log p_{\text{top64}} - \log q_{\text{top64}})$ so target probability mass concentrates inside top64(base_logits). At inference, each Markov step gathers only 64 rows of fold_w (64 Γ— 256 Γ— 2B = 32 KB, 100% L1-resident) instead of scanning 103 MB of full vocabulary β€” eliminating per-step TP AllReduces while remaining 100% mathematically lossless under exact sparse residual rejection sampling (p - q_S)+.
    • Asymmetric Precision: Only the 36 dense backbone linear projections (~88% of active weight bytes) are quantized offline via Cook et al.'s adaptive Four Over Six (4/6-MSE) NVFP4 block scaling (734 MB BF16 β†’ 196.9 MB NVFP4), while norms, DynConv2, embeddings, sampler MLP, DWarpHead, and pivot_mlp remain BF16.
  7. Temperature-Calibrated Multi-$T$ Hinton Forward KL:
    Hard top-1 cross-entropy and uncalibrated sharpness losses over-sharpen draft logits, hurting sampled (T = 0.85) acceptance. DWarp trains with exact $T^2$-scaled multi-temperature Hinton forward KL over the target's top-128 distribution: $$\mathcal{L}{\text{step}} = \frac{\sum w{b,r}\Big[0.55,\mathrm{CE}!\big(p^{(1.0)}{b,r},, q^{(1.0)}{b,r}\big) + 0.45 \cdot 0.85^2,\mathrm{CE}!\big(p^{(0.85)}{b,r},, q^{(0.85)}{b,r}\big)\Big]}{\sum w_{b,r}}$$ $$\mathcal{L}{\text{total}} = \mathcal{L}{\text{step}} + 0.30,\mathcal{L}{\text{base}} + 0.15,\mathcal{L}{\text{top64-shortfall}}(\text{base}) + 0.05,\mathrm{BCE}!\big(\text{pivot_logits},, \alpha^{\text{exact}}\big)$$ with slot weights $w_{b,r} = 0.90^r \cdot (1 + 0.35,\mathrm{clip}((H(p_{b,r}) - 1.5)/3, 0, 1))$.


Specific Instantiation on Inkling-2-Mini (DWarp-v1)

thinkingmachines/Inkling-2-Mini is a 26.4B-parameter looped MoE transformer (24 physical layers executed as 48 logical visits: prelude 0..5, middle 6..17 looped 3Γ—, coda 18..23, plus post-final-norm visit 48; D = 2304, 24Q / 8KV, head_dim = 128, 128 experts top-8, unpadded_vocab = 200,058, logit_softcap = 30.0).

Inkling-2-Mini-Specific Adapters Applied on Top of Core DWarp

Component DWarp-v1 Specification
Architecture 4-layer dense hybrid transformer (local_layer_ids = [0, 1, 3] SWA-1024, layer 2 Global), D = 2304, 24Q / 8KV, head_dim = 128, intermediate_size = 9216, block_size = 16, markov_rank = 256, dynconv_group_size = 16, vocab_size = 201024 (200058 unpadded), logit_softcap = 30.0
Loop-Trajectory 5-Tap Fusion Taps aligned directly to Inkling-2-Mini's looped core exits: [5, 17, 29, 41, 48] (prelude exit 5, loop passes 1/2/3 exits 17, 29, 41, post-final-norm 48)
Cross-Loop Convergence Delta $\Delta_{1 \to 3} = \mathrm{RMSNorm}{\text{no-weight}}(h^{(41)}{P-1} - h^{(17)}_{P-1})$, explicitly measuring Pass-1 β†’ Pass-3 refinement across the looped core
Zero-Loss Warm-Start (3 β†’ 4 Layers) Warm-started from Inkling-2-Mini's bundled mtp.safetensors (3 layers [0(loc), 1(glob), 2(loc)] mapped to [0, 2, 3]; inserted layer 1 initialized from layer 0 with o_proj = 0, down_proj = 0 for exact identity; stock tap 23 split evenly across [17, 29] via w[1] - ln 2). Verified Step-0 parity (3.173 / 3.117 vs Stock 3.237 / 3.192) prior to gradient updates
Target Alignment Uses Inkling-2-Mini's normed token embeddings (embed_tokens with embed_norm) and exact 30.0 * tanh(x / 30.0) logit softcapping
Parameters 418.96M total (317.9M warm-started + 101.1M new DWarp parameters), 101 flat tensors

Training Recipe & On-Policy Corpus

  • 100% On-Policy Native-ID Corpus: 194,144 rollouts generated directly by Inkling-2-Mini (161.97M generated tokens, ~380M total sequence tokens, 0 re-tokenization drift) across 5 regimes: code (37.7M), long_ctx (30.2M, 4K–16K context), math (58.3M), prose (31.5M, sampled at T = 0.7–1.0), and tools (2.3M), plus 500 locked held-out evaluation rollouts (100/regime).
  • Simultaneous 3-Mode Block Curriculum: Within every training sequence, up to 16 anchors are partitioned into ~45% Cold B = 16, ~30% Carry-Over Edit (35% front synonym swaps, 25% 25%-rate top-7 noise, 25% Β±1-token shifts, 15% unrelated stale-tail negatives), and ~25% Dual-Branch Pivot-Tree blocks on highest-entropy positions.
  • Optimization (8Γ— RTX PRO 6000 Blackwell, DDP = 8): 500 warm-up steps + 4,600 temperature-calibrated multi-$T$ Hinton KL steps (5,100 total steps, ~2 epochs, 100% unique long_ctx coverage via --long-ctx-stride 2), AdamW (lr = 1.6e-4 cosine decay with 0.4Γ— differential LR on warm-started weights and 1.0Γ— on new parameters, grad_accum = 2, length-bucketed size-matched super-batches up to max_seq_len = 10240).

Reference Python Code

Full standalone Python scripts live in reference/:

Quick Start (PyTorch Reference)

pip install torch safetensors huggingface_hub transformers
python3 reference/inference_example.py --synthetic-smoke

Minimal Python Usage Snippet

import json
from pathlib import Path
import torch
import torch.nn.functional as F
from huggingface_hub import snapshot_download
from safetensors.torch import load_file

from reference.dwarp_model import DWarpConfig, DWarpV1
from reference.inference_example import (
    prefold_markov_head,
    dwarp_draft_block_top64,
    verify_shortlist_lossless,
)

# 1. Download and load DWarp-v1 BF16 weights
ckpt_dir = Path(
    snapshot_download(
        repo_id="doth4580/Inkling-2-Mini-DotH-DWarp-v1",
        allow_patterns=["dwarp.safetensors", "dwarp_config.json"],
    )
)
cfg_dict = json.loads((ckpt_dir / "dwarp_config.json").read_text())
cfg_dict["local_layer_ids"] = tuple(cfg_dict["local_layer_ids"])
cfg_dict["target_layer_ids"] = tuple(cfg_dict["target_layer_ids"])
dwarp = DWarpV1(DWarpConfig(**cfg_dict)).to("cuda", dtype=torch.bfloat16).eval()
dwarp.load_state_dict(load_file(str(ckpt_dir / "dwarp.safetensors"), device="cuda"), strict=True)

# 2. Pre-fold Markov head once using Inkling-2-Mini's frozen lm_head weight [V, 2304]
#    (Requires frozen target taps5 [L_ctx, 5, 2304] at logical visits [5, 17, 29, 41, 48]
#     and target normed embeddings embed_fn; see reference/eval_dwarp.py::InklingTeacher.)
fold_w, fold_b = prefold_markov_head(dwarp, target_lm_head_weight)

# 3. Draft up to 15 tokens in a single parallel pass + 32 KB L1 Top-64 Markov loop
draft_out = dwarp_draft_block_top64(
    dwarp=dwarp,
    taps5=taps5,                       # [L_ctx, 5, 2304] BF16
    anchor_pos=L_ctx,
    anchor_tok=last_committed_token,
    embed_fn=target_embed_normed_fn,
    lm_head_weight=target_lm_head_weight,
    fold_w=fold_w,
    fold_b=fold_b,
    num_drafts=15,
    shortlist_k=64,                    # 64 x 256 x 2B = 32 KB L1-resident
    temperature=0.85,
    top_p=0.95,
    carry_toks=prev_plausible_tail,    # Optional rejected tail if q_acc(x*) >= 0.05
)

# 4. Run target model forward over [anchor_tok] + draft_out["draft_tokens"] (16 rows)
#    and verify with 100% mathematically lossless sparse residual rejection sampling:
emitted_tokens, next_carry_tail = verify_shortlist_lossless(
    target_logits=target_verify_logits,  # [16, V] post-softcap target logits
    draft_tokens=draft_out["draft_tokens"],
    short_ids=draft_out["short_ids"],
    short_probs=draft_out["short_probs"],
    temperature=0.85,
    top_p=0.95,
    carry_plausibility_thresh=0.05,
)

Runtime Support (veloGB10)

NOT AVAILABLE YET ON VELOGB10 (PENDING THE NEXT RELEASE).

Native high-performance CUDA/Rust inference support for DWarp-v1 (zero-spill sm_121a CUDA kernels, CUDA-graphed B = 16 backbone and L1 Top-64 Markov loop, plausibility-gated Carry-Over Edit, 4/6-MSE NVFP4 backbone projections, batched multi-lane draft_multi, and zero-config TP1–TP8 cluster weight distribution) will be released in the next version of veloGB10.

Upcoming opt-in CLI usage in the next veloGB10 release (uniform with draft-model flags elsewhere in the engine):

# Single-node (TP=1) β€” automatically prefers dwarp_nvfp4.safetensors when present
gb10_inference --server \
  --model-dir /path/to/Inkling-2-Mini \
  --spec-source dwarp \
  --draft-dir /path/to/Inkling-2-Mini-DotH-DWarp-v1 \
  --port 9000

Credits, Prior Art & Acknowledgements

DWarp-v1 stands directly on the shoulders of open-weights models, peer-reviewed speculative decoding research, quantization research, and open-source prompt datasets. Every upstream component and intellectual contribution is explicitly credited below:

Component-by-Component Attribution

Component in DWarp-v1 Upstream Origin & Credit
Target Model & Warm-Start Base Weights (mtp.safetensors) Thinking Machines Lab, Inc. β€” thinkingmachines/Inkling-2-Mini (Apache 2.0, Nov 2026) and its bundled native 3-layer DSpark speculative drafter weights
Lossless Speculative Rejection Sampling Leviathan, Kalman, & Matias (Google Research, ICML 2023) and Chen et al. (DeepMind, 2023)
Tree-Based Parallel Verification & Without-Replacement Multi-Draft Verification SpecInfer (Miao et al., CMU / Catalyst, ASPLOS 2024) and Sequoia (Chen et al., CMU / Together AI, NeurIPS 2024)
Parallel Block-Diffusion Speculative Drafting DFlash β€” Jian Chen, Yesheng Liang, & Zhijian Liu (UC San Diego / z-lab, ICML 2026, arXiv:2602.06036)
Two-Tap Dynamic Convolutions (DynConv2) & Context-Gated Path Interaction (pair_gate) DFlash 2 β€” Inco AI & z-lab ("DFlash 2: Keep Drafting Parallel", Aug 2026). DWarp generalizes the two-tap dynamic convolution to tree parent pointers (parent_idx[r]) and keeps pair_gate inside $\mathbb{R}^R$ so it folds algebraically through fold_w
Layer-Wise Learnable Target Feature Fusion (dflare_norm, fuse_weight) DFlare β€” Jiebin Zhang et al. (Tencent / AngelSlim, arXiv:2606.02091)
Semi-Autoregressive Parallel Backbone + Recurrent Markov Head (markov_w1, rnn_proj, hidden_out) DSpark β€” Xin Cheng, Xingkai Yu, Chenze Shao, et al. (DeepSeek-AI & Peking University, arXiv:2607.05147)
Calibrated Draft Trees Extending DSpark TreeSpark β€” Huapeng Zhou, Huayu Wang, & Xinyu Wang (arXiv:2609.22098) and Jihao Zhao et al. (Renmin Univ. of China, Nanjing Univ., Huawei Technologies, arXiv:2610.20175)
Recycling Rejected Speculative Artifacts (Related Prior Art) Token Recycling β€” Xianzhen Luo et al. (arXiv:2408.08696); Carryover Drafting β€” Jahyun Koo, Sunghyeon Woo, et al. (Seoul National University & NAVER Cloud, arXiv:2609.14717). DWarp adapts this insight into discrete mask-slot Carry-Over Edit with a post-Markov q >= 0.05 plausibility gate
Four Over Six (4/6-MSE) Adaptive NVFP4 Block Quantization Cook, Guo, Xiao, Lin, Wyss, Nazemi, Mishra, del Mundo, Blankevoort, & Han (MIT & NVIDIA, arXiv:2512.02010, 2025)
Temperature-Scaled $T^2$ Forward KL Knowledge Distillation Hinton, Vinyals, & Dean (Google, arXiv:1503.02531, 2015)
DWarp Integration, Multi-Regime Training, Co-Trained 32 KB L1 Top-64 fold_w, Cross-Loop Delta $\Delta_{1\to 3}$, Plausibility-Gated Carry-Over Edit, & veloGB10 Co-Design Stav Katsoulis (veloGB10)

Academic References

  1. Thinking Machines Lab, Inc. (2026). Inkling 2 Mini. Hugging Face: thinkingmachines/Inkling-2-Mini | Blog: thinkingmachines.ai/news/inkling-2-mini/.
  2. Leviathan, Y., Kalman, M., & Matias, Y. (2023). Fast Inference from Transformers via Speculative Decoding. ICML 2023. arXiv:2211.17192.
  3. Chen, C., Borgeaud, S., Irving, G., Lespiau, J.-B., Sifre, L., & Jumper, J. (2023). Accelerating Large Language Model Decoding with Speculative Sampling. arXiv:2302.01318.
  4. Miao, X., Oliaro, G., Zhang, Z., Cheng, X., Wang, Z., Zhang, Z., Wong, R. Y. Y., Zhu, A., Yang, L., Shi, X., Shi, C., Chen, Z., Arfeen, D., Abhyankar, R., & Jia, Z. (2024). SpecInfer: Accelerating Generative Large Language Model Serving with Tree-based Speculative Inference and Verification. ASPLOS 2024. arXiv:2305.09781.
  5. Chen, Z., May, A., Svirschevski, R., Huang, Y., Ryabinin, M., Jia, Z., & Chen, B. (2024). Sequoia: Scalable, Robust, and Hardware-Aware Speculative Decoding. NeurIPS 2024. arXiv:2402.12374.
  6. Chen, J., Liang, Y., & Liu, Z. (2026). DFlash: Block Diffusion for Flash Speculative Decoding. ICML 2026. arXiv:2602.06036 | Code: github.com/z-lab/dflash.
  7. Inco AI & z-lab (2026). DFlash 2: Keep Drafting Parallel. Blog: inco.ai/blog/dflash2/.
  8. Zhang, J., Yu, Z., Liu, S., Yu, E. J., Li, Z., Zhu, D., Duo, J., Xiong, W., Song, Y., Yu, G., Zhu, J., & Li, S. (2026). DFlare: Scaling Up Draft Capacity for Block Diffusion Speculative Decoding. arXiv:2606.02091.
  9. Cheng, X., Yu, X., Shao, C., Li, J., Xiong, Y., Qian, Y., Zhu, J., Ma, S., Zhang, X., Ye, J., Chen, Q., Deng, C., Yu, J., Dai, D., Zhang, Z., Wei, Y., Tan, Y., Yang, W., Xu, R., Wu, Y., Xu, Z., Wang, X., et al. (2026). DSpark: Confidence-Scheduled Speculative Decoding with Semi-Autoregressive Generation. arXiv:2607.05147.
  10. Zhou, H., Wang, H., & Wang, X. (2026). TreeSpark: Calibrated, Load-Adaptive Draft Trees for Semi-Autoregressive Speculative Decoding. arXiv:2609.22098.
  11. Zhao, J., Jiang, Q., Zu, S., Li, P., Fang, G., Feng, B., Qin, B., Wang, Z., & Yang, B. (2026). TreeSpark: Learning to Draft the Trees You Verify for Speculative Decoding. arXiv:2610.20175.
  12. Luo, X., Wang, Y., Zhu, Q., Zhang, Z., Zhang, X., Yang, Q., & Xu, D. (2024). Turning Trash into Treasure: Accelerating Inference of Large Language Models with Token Recycling. arXiv:2408.08696.
  13. Koo, J., Woo, S., Kil, J., Lee, J., Lee, S., Jung, K., & Kim, M. (2026). Carryover Drafting: Recycling Rejected States for Speculative Decoding. arXiv:2609.14717.
  14. Cook, J., Guo, J., Xiao, G., Lin, Y., Wyss, K., Nazemi, M., Mishra, A., del Mundo, C. C., Blankevoort, T., & Han, S. (2025). Four Over Six: More Accurate NVFP4 Quantization with Adaptive Block Scaling. arXiv:2512.02010.
  15. Hinton, G., Vinyals, O., & Dean, J. (2015). Distilling the Knowledge in a Neural Network. arXiv:1503.02531.

Prompt Dataset Credits (On-Policy Rollout Sources)

All training targets were generated on-policy by thinkingmachines/Inkling-2-Mini from prompts drawn from the following open datasets (full credit to their respective authors and maintainers):

Regime Dataset Repository Upstream Authors / Organizations
prose euclaise/writingprompts Based on Fan, Lewis, & Dauphin (2018), Hierarchical Neural Story Generation (Meta AI / FAIR); packaged by euclaise
prose HuggingFaceH4/ultrachat_200k Hugging Face H4 & UltraChat authors (Ding et al., Tsinghua University)
prose HuggingFaceTB/smoltalk Hugging Face SmolLM team (Allal et al.)
code ise-uiuc/Magicoder-Evol-Instruct-110K UIUC ISE (Wei et al., Magicoder)
tools glaiveai/glaive-function-calling-v2 Glaive AI
math open-r1/OpenR1-Math-220k Hugging Face Open-R1 team
math AI-MO/NuminaMath-CoT Project Numina / AI-MO
long_ctx emozilla/pg19 DeepMind PG-19 (Rae et al., Compressive Transformers); packaged by emozilla
long_ctx HuggingFaceFW/fineweb-edu (sample-10BT) Hugging Face FineWeb team (Lozhkov et al.)

License & Limitations

  • License: Released under Apache License 2.0, consistent with thinkingmachines/Inkling-2-Mini. Please also respect Thinking Machines Lab's Model Acceptable Use Policy when serving Inkling-2-Mini.
  • Target Coupling: DWarp-v1 is strictly coupled to thinkingmachines/Inkling-2-Mini's vocabulary, embeddings, unembedding matrix, and 5-tap loop trajectory [5, 17, 29, 41, 48]. It cannot be applied directly to other models without training a target-specific adapter.
  • Safety & Distribution Preservation: Because speculative verification is mathematically lossless, DWarp-v1 does not alter Inkling-2-Mini's capabilities, knowledge, biases, or safety characteristics β€” it affects only decoding speed and latency.

Citation

If you use DWarp-v1, its reference code, or the DWarp methodology in your work, please cite both this release and the foundational upstream works above (Inkling-2-Mini, DFlash / DFlash 2, DFlare, DSpark, Four Over Six):

@misc{katsoulis2026dwarp,
  title  = {DWarp-v1: Hardware-Co-Designed Multi-Regime Speculative Decoding for Inkling-2-Mini},
  author = {Stav Katsoulis},
  year   = {2026},
  month  = {November},
  url    = {https://huggingface.co/doth4580/Inkling-2-Mini-DotH-DWarp-v1},
  note   = {Co-designed for veloGB10 (https://github.com/sf-stav/veloGB10)}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for doth4580/Inkling-2-Mini-DotH-DWarp-v1

Adapter
(51)
this model

Papers for doth4580/Inkling-2-Mini-DotH-DWarp-v1