Repository navigation
Releases
Releases · shanedertrain/inkling-cmp-engine
v1.4.0 — Hardware-Adaptive CMP 170HX (40–96 GiB, 70–128+ SMs) & 180 W FF-Unlock Benchmarks
Hardware-adaptive release for heterogeneous FF-unlocked CMP 170HX silicon lotteries (40–96 GiB, 70–128+ SMs) — 100% lossless (0 differing bits).
What's new in v1.4.0
- Dynamic SM scheduling (
ink-model,ink-runtime): QueriesCU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNTat startup and scales launch grids, SWA ring slots, global split-KV decode workers, andRustDFlash2global splits (GLOBAL_ATTN_SPLITS=128) automatically (−14.0%latency on4×45Kdecode attention at 124 SMs,0diff bits). - Auto-sized KV pool (
PAGES=autoinstart.sh): Probes each GPU's live VRAM & ECC state to size--kv-pagesautomatically (40 GiB -> 288,48 GiB -> 512,64 GiB -> 960,80 GiB -> 1,408,96 GiB -> 1,856BF16 pages;512–3,328FP8) and setsCUDA_DEVICE_ORDER=PCI_BUS_IDfor mixed-SM hosts. - Hardware-keyed cuBLASLt pin cache + safe
ink-tunedefaults:start.shcaches pins per(SM, VRAM, CHUNK)profile underflock;ink-tunenow defaults to--prefill-m 8192+ G164,4608,decode,32,2split-K (--no-default-split-kopts out). - Deterministic A/B runner (
engine/rust/scripts/bench-ab.sh): Warm A/Bink-benchrunner and JSONL summarizer. - 8× FF-unlocked CMP 170HX benchmarks & charts (
140 Wvs180 W): Up to474 tok/ssingle-user,1,751 tok/ssingle-card (n=8),13,638 / 8,076 / 7,242 tok/sacross 8 cards (64streams),11,827 → 7,657 tok/scold prefill (4K → 120K,2.32×Config B), and10.62Mlossless BF16 KV tokens (19.07MFP8) at180 W/≤ 58 °C— beating140 Won both speed andtok/J.
v1.3.0 — 1.04M BF16 / 1.83M FP8 KV, 262K Paged Speculation, Multi-Prefill Batching & Zero-Spill FAR Prefill
Highlights (100% Lossless, kpack 46748cf1c41d, 393 launchers, 0 new spills)
- 2× BF16 KV capacity &
CHUNK=8K/12Kunlocked: Compactconvxcommit tails (78 MiB fixed), decoupled 2-page persistent SWA rings + shared per-visit scratch (pglue::swa_ring_copy_kernel), exact arena sizing, tightenedWEIGHTS_BYTES_ESTIMATE, and 4 lifetime-disjoint scratch overlays free 8.9–32.7 GiB of non-KV VRAM — lifting 64 GB CMP 170HX capacity to1,015BF16 pages (1.04Mtokens) with out-of-the-boxDSpark 262K(996/1.02MBF16 withDFlash2-Global,1,789/1.83Mwith--kv-fp8,7.0×@262K). - Full
262,144-token speculation (zero>102.4Kcliff): Paged E4M3 global KV forDFlash2-Global(3.97 GiBarena) and pooled E4M3 global L1 + 4K SWA rings forDSpark(4.42 GiB,-8.1 GiBvsv1.2.1) sharingEngine::slotspage tables lazily viapage_gen(). Doubles246Kdecode (68 -> 135.5 tok/son6D,62 -> 133.1 tok/son67at 180 W). - Multi-prefill batching & fused decode QKV post-op:
ink-schedpacks multiple prefill segments per step with a parked-KV free-page guard preserving96%multi-turn prefix reuse — cutting8uTTFT-45% to -51%(315–350 ms -> 168–207 ms), whilefused_qkv_decremoves 48proj_splitlaunches per decode step. - Zero-spill pure-FAR global prefill attention & retuned Mixed GEMM pins:
prefill_attn_far_kernel/prefill_attn_fp8_far_kernel(0spills,2 CTAs/SM) +CHUNK=12288deliver8,905–8,986 tok/scold8K,8,242–8,28932K,6,156–6,203131K, and4,723–4,768246Kat 180 W (~15 scold boot,0runtime JIT stalls), plus+8.0% to +11.7%on--kv-fp8prefill.
Verified 180 W Head-to-Head vs snailbrainx/inkling-2-mini-sm80 (v3) (Same 6D & 67 Cards)
v1.3.0(DFlash2-Global s3_l13, 950K BF16 KV): Wins 24/24 MiaAI-Lab throughput cells (+6.3%to+40.7%) and 24/24 TTFT cells —1u396.0 / 250.0 / 214.7 tok/s,4u1,081.8 / 608.2 / 577.6,8u1,575.3 / 852.9 / 835.7 tok/s(dec 1,823.1,169–204 msTTFT),246Kdec135.5 tok/s.v1.3.0(DSpark-E4M3 262Kout-of-the-box, 967K–1.04M BF16 KV):8Kprefill8,986 tok/s,246Kdec133.1 tok/s,8u lists1,394.6 tok/s,8uTTFT168–207 ms.- Lossless gates:
E0385/390unchanged SASS bit-identical +0new spills;ink-invBF168K/12K& FP812K0diff bits (includingmulti_prefill_vs_single);ink-specgreedy0/8,000,sampled20/20,sdist0zero-prob draws.
Optional Pre-Trained Drafter Weights (Apache-2.0, 945 MB)
- Stage-3
DFlash2-Global (s3_l13): https://huggingface.co/cambash23/Inkling-2-Mini-DFlash2-Global-L13 (hf download cambash23/Inkling-2-Mini-DFlash2-Global-L13 --local-dir ./Inkling-2-Mini-DFlash2-Global-L13, thenDFLASH2_DIR=... ./start.sh restart). Basethinkingmachines/Inkling-2-Miniweights are never modified.
v1.2.1
Highlights (100% Lossless, sm_80, 140 W Verified)
- Eliminated
N=8T=65..128decode glue/router cliff (kpack 8c5c60dd42ee,390kernels,0new spills):- Under
--lookup 8,N=8multi-user speculative decode steps average~77–88rows, previously crossing hardcoded64-row cutoffs into SM-starved prefill glue (glue_end3.44–3.53 ms,glue_mid3.00–3.29 ms) and double-launched routers (1.77–2.10 ms). - Raised
PGLUE_ROWS& decode glue cutoffs64 → 128, instantiatedMT=8router_gemm_dec_kernel<8>+mg_down_dec_kernel<8>for65..=128rows, raisedrlogfloor (9 * 128 * NEXP), and bumpedink-servert_max = max_chunk + 128. - Decode microbenchmarks (
6D,140 W):glue_end5.7×faster (3.44–3.53 → 0.60–0.69 ms),router1.46×faster (1.77–2.10 → 1.21–1.27 ms),8×9..8×16decode steps−1.61%to−3.22%(dec-8x9-16k55.49 → 53.71 ms,dec-8x10-45k69.05 → 67.94 ms). - Canonical same-card
B1 → V2 → B2M1 Replay (140 W, DSpark +--lookup 8,CHUNK=3072,504pages):67(recorded):rec-t1-n8371.91 →375.78 tok/s(+1.04%, beats bothB1&B2), decode step47.65 → 46.8 ms(−1.78%), p99 TTFT5.50 → 5.19 s(−5.6%),0.371 J/tok.6D(self):self-t1-n8376.24 →382.23 tok/s(+1.59%, beats bothB1&B2),0.365 J/tok, p995.73 → 5.61 s.
- Under
- Stage-3
DFlash2-Globalbenchmarks (--draft-dflash2, zero Rust/CUDA changes for 2 or 3 global layers):L1+L3hits532.89 tok/s(+28.3%vs DSpark,+13.5%vs Stock DFlash2) on4×45Ktf-agent-120k.L1+L3+L4hits5.238 tok/rd(223.96 tok/s,+18.4%vs Stock, beating gated DSpark) at1×75K,4.428 tok/rdlive sampled on held-out45K+val_long, and380.3 / 328.6–335.0 / 372.5 tok/son6DM1 while saving~4.5–6.4 GiBVRAM (100Kdraft ctx).
- Lossless verification (
6D,140 W):ink-invBF16 (1,055/1,055) &--kv-fp8(1,054/1,054)0diff bits;greedy --lookup 80/8,000(gap 0.0);sampled --lookup 820/20(flags_or=0);sdist --lookup 84/4PASS (65,536draws,0zero-prob);cargo fmt,cargo clippy --locked --workspace --all-targets -- -D warnings, and workspace unit tests PASS.
v1.2.0 — Longest-Back Lookup & Hybrid Global-Attention DFlash2
Highlights (100% Lossless, sm_80, 140 W Verified)
- Longest-back n-gram lookup (
MAX_CHAIN=32) & SWA far-anchor rescue:- Deep chain walk (
MAX_CHAIN=32) selects the longest backward verbatim match (+1.45%DSparkself-t1-n4,+1.30%self-t1-n8on6D140 W, lowerJ/tok). Drafter::is_swa_only()enables far-anchor verbatim rescue (dist > 2048) strictly for SWA-2048 drafters (+1.92%Stock DFlash2self-t0-n4) while keeping global drafters (DSpark andDFlash2-Global) on post-draft lookup (+3.16%over anchor override onDFlash2-Global).
- Deep chain walk (
- Hybrid
full_attentionE4M3RustDFlash2CUDA kernel & runtime (388kernels,0new spills):- Config-driven
layer_types(sliding_attention/full_attention) andglobal_rope_theta(1e6) fromconfig.json. - Design-A
df2::global_attn_e4m3_split_kernel(REG: 239,0spills,646–715 GB/sE4M3):2.653 msat4×45K(1 global layer),3.214 ms(2 global layers),3.447 msat4×100K,~8–9 GiBlower VRAM than DSpark (52.8 GiBused /12.1 GiBfree at8 slots / 504 pages / 100K ctx). - Stock
5× SWAcheckpoints stay 100% bit-identical (0.00 msregression). - With a Stage-2 frozen-SWA 2-global-layer (
L1+L3)DFlash2-Globalcheckpoint:526.05 tok/s(5.738 tok/rd,+26.7%over DSpark,+12.1%over Stock DFlash2) on4×45Ktf-agent-120k,3.851 tok/rd(+20.8%over DSpark) at75K, and327.8 tok/s(-0.63%vs DSpark,+1.33%over Stock DFlash2) on6DN=4, T=1.0M1.
- Config-driven
- Target-tap extractor (
ink-taps):- Streams native
[5, 23, 41, 48]BF16 target features at~6K tok/sper GPU for distilling custom lossless drafters.
- Streams native
- Lossless verification:
ink-inv0diff bits;greedy0/8,000bad argmax;sampled20/20exact (flags_or=0);sdist0zero-prob draws;cargo fmt,cargo clippy -- -D warnings, and workspace tests PASS.
v1.1.0 — Virtual-Message Prefill Fusion & Zero-Stall Spec Round
Highlights (100% Lossless, 0 Diff Bits, 140 W Verified)
- Prefill virtual messages & glue fusion:
vmsg_weights_kernelcutsmsgs7.50× (eliminating ~87 GB HBM traffic per 32K prefill), fused multi-query AttnRes (−25.2%), fast__match_any_syncprefillmoe_build, and fixed--prefill-chunkclamping with defaultchunk=3072.- Cold 32K prefill (140 W,
6D): 7,009 tok/s (+8.0% vsv1.0.0, +43.6% vs vLLM Config B). - Cold 120K prefill (140 W,
6D): 5,248 tok/s (+58.7% vs vLLM Config B).
- Cold 32K prefill (140 W,
- Zero-stall spec round, fast graph retargeting & single-pass decode
moe_build:- Single-pass
__match_any_syncdecodemoe_build: −41.9% (4×8) and −50.1% (4×16). - Cached
CUgraphExecretargeting: cutsverify_us >= 200 µsstalls from 36.0% → 3.5% (p90 −70%). - Coalesced 1-sync
verify_widths_and_drafts, lazy lookup H2D upload, vectorizedsoftcap, and opt-in early-exit Markov drafting (INK_DSPARK_EARLY_TAU=0.70forN=1/ragged).
- Single-pass
- Canonical M1 Agent Replay (140 W, 343 reqs, 0 errors):
6Dcard:N=4 T=1.0328.0 tok/s (+27.2% vs Config B, TTFT p99 −15.3%),N=4 T=0373.3 tok/s (+23.2%),N=8 T=1.0360.9 tok/s (TTFT p99 −23.7%).67card:N=4 T=1.0338.1 tok/s (+3.90% vsv1.0.0, +26.8% vs Config B, TTFT p99 −25.1%),N=4 T=0355.4 tok/s (+21.0%),N=8 T=1.0366.9 tok/s (+4.10% vsv1.0.0, TTFT p99 −26.8%).
- Lossless verification (
kpack 9af3241f6232, 386 launchers, 0 new spills):ink-invBF16 &--kv-fp80 diff bits,ink-specgreedy 0/8,000, sampled 20/20,sdist4/4 (0 zero-prob draws).
v1.0.0 — Pure-Rust + CUDA sm_80 Inkling-2-Mini Engine for CMP 170HX
Initial open-source release of inkling-cmp-engine (v1.0.0, Apache-2.0) — a custom pure-Rust + CUDA (sm_80) single-model inference engine serving Thinking Machines Lab's Inkling-2-Mini on 1–8× NVIDIA CMP 170HX (64 GB, fixed 140 W power cap).
Highlights
- 100% lossless by default (
+25%over vLLM Config B on multi-turn agent workloads):323.8–333.7 tok/s(N=4, T=1.0,~45Kmedian context, TTFT p992.94–3.56 s),347.6–360.6 tok/satT=0, and358.9–380.2 tok/satN=8on a single 140 W card. - MiaAI-Lab decode & cold prefill wins across the board:
+25.8%to+32.2%single-user decode, up to1,026.9 tok/saggregate at 8 users, and+33.4%(7,665 tok/sat 4K) to+52.8%(5,052 tok/sat 120K) cold prefill vs Config B. - Zero weight modification: native NVFP4 + MXFP8 weights mounted read-only (
18.98 GBon GPU via 1-byteNVFP4_N1S1scales), leaving504BF16 global KV pages (516Ktokens/card;4.13Macross 8 cards). - Exact speculative decoding: fused DSpark Markov drafter (
top_p=0.90) + lossless verbatim lookup (--lookup 8 --lookup-min 8) + 128-bit exact Leviathan rejection/residual sampling (0/8,000greedy mismatches,13/13sdistpass). - Opt-in switches:
--kv-fp8(KV_FP8=1,2×global KV capacity:1.03M+tokens/card,4×8 120Kdecode−16.6%) and--draft-dflash2(Inco AI DFlash2 parallel drafter,−3.3 GiBVRAM). - One-command setup:
cp scripts/local.sh.example scripts/local.sh && ./start.sh(includes standaloneDockerfileand pure-PyTorchscripts/fold-dspark.py).