Pushed Inkling 2 Mini on a 7900xtx. 180tps single stream. 250tps prose. 326.6 tok/s on coding with 507.9 tok/s 1s bursts. 7900xtx fork for nib
Hello, human here.
huge shoutout to Chromadera for his nib project! This is a fork from that one!
I wanted to get inkling 2 Mini really fast for some lighter multi-stream work and Gemini did just that. The secret was using multiple Dflash2 modules loaded in a very clever way to get more tps.
This should work on any rdna3 card and probably rdna4, but it's untested. The numbers right now are made for exactly the 7900xtx. Smaller quants and different context sizes should allow 20gb or 16gb cards as well.
Have fun with it!
nib-7900xtx — Multi-Slot Fused DFlash 2 Speculative Decoding for RX 7900 XTX
Branch: https://github.com/BesnikDev/nib/tree/nib-7900xtx
Copy-Paste Post (Reddit / Discord / GitHub / X)
nib-7900xtx: Multi-slot fusedDFlash 2speculative decoding across 2–8 parallel slots on RX 7900 XTX (268.5 tok/ssteady on 1 card, up to326.6 tok/ssteady /507.9 tok/sburst on code;>1,000 tok/speak across 2× XTX)Upstream
nib(v0.4.1) runsDFlash 2/DSparkspeculative decoding only when a single slot (B = 1) is active — as soon as 2+ parallel requests decode together, it falls back to standard1 tok/slotbatched decode.We built an RX 7900 XTX (
gfx1100) optimization branch —BesnikDev/nib(nib-7900xtx) — that keepsDFlash 2speculative decoding active across all2..8parallel slots simultaneously in a single1×weight-stream pass per step, with zero SGPR/VGPR/private-segment register spills across all 22 kernel objects (spill_audit.shclean) and bit-identical (md == 0.0) greedy verification parity.What's Inside
- Per-slot SWA-2048 BF16
DFlash 2KV rings (41.1 MiB/slot) synchronized continuously across prefill,B >= 2decode, and solo decode via a slot tap hook — zero cache invalidation when streams join or finish early.- WMMA
16×16×16draft_nslot(1..8): Fuses all active slots' 8-tokenDFlash 2block drafts into a single weight-stream pass (0.46 ms/slotat 8 slots) + block-isolated conv/RoPE/SWA-attention/Top-16/selector kernels.- 32-row
verify_step_nslot(1..8)+verify_rollback_nslot(1..8): Verifies heterogeneous per-slot draft lengths (m_s in [1..8], up toMAX_VERIFY_TOKENS = 32total rows) in one MoE + DeltaNet + GQA pass, withT_CHUNK = 16MoE tiling, K-tiledlm_headGEMV (m = 1..32), and 2-level{m_lo, m_hi}HIP graph-key quantization so 8-slot heterogeneous batches never thrash the HIP graph cache.- Hardware-calibrated
m_tot = 16default: Keeping total verify rows<= 16stays inside a singleT_CHUNK = 16MoE pass and2-row-per-lanelm_headfast path — beating wider verify budgets on diverse reasoning workloads, whileNIB_VERIFY_MAX_ROWS=32unlocks8×4verification for ultra-predictable HTML/JS generation.Benchmarks (
Inkling-2-Mini-NVFP4-Mixed+DFlash 2+mmproj Q8_0,--kv-type q8_0 --sparse-pages 224 --ubatch 1024 --cpu-embd, ROCm 10.2)
Setup Context Pool ( -c)1× RX 7900 XTX Wall / Steady Per-Stream 2× RX 7900 XTX (Independent Instances) 2×slots/card (diverse code/vision)262,848(131kmin/slot)156.3/164.3 tok/s~80 tok/s300.3wall /301.8 tok/speak (4streams)4×slots/card (sweet-spot context)262,848(65.7kmin/slot)213.3/241.2 tok/s~60 tok/s~426wall /~482 tok/ssteady (8streams)6×slots/card (throughput/ctx balance)212,992(35.5kmin/slot)241.9/268.2 tok/s~45 tok/s486.5wall /531.5 tok/ssteady (12streams)8×slots/card (diverse prompts)196,608(24.6kmin/slot)254.5/268.5 tok/s~34 tok/s508.7wall /537.7 tok/ssteady (16streams)8×slots/card (HTML5 Snake,m_tot=32)196,608(24.6kmin/slot)318.1wall /326.6steady /507.91s burst40.8steady (68.0peak)631.0wall /651.2steady /921.51s burst (1,031.6 tok/ssum of stream peaks)Build & Run
# Recommended 4-slot 262k setup (all 4 slots get fused DFlash 2; solo requests still expand up to 262k):Optional tuning env vars for 6–8 slots on high-acceptance code:
NIB_VERIFY_MAX_ROWS=32 NIB_NSLOT_HI_M=4with--spec-threshold 0.55.