Skip to content

TandemEngine 0.18.2

Choose a tag to compare

@0xBakeer 0xBakeer released this 03 Dec 15:13
· 15 commits to main since this release

TandemEngine v0.18.2: Hy4-flash up to 6x faster

TandemEngine 0.18.2 brings a major speed upgrade for Hy4-flash on one NVIDIA DGX Spark with 100 % identical outputs across every default target kernel (self_check(graphs=True) 48 of 48 bit-exact, 430 of 430 prompt-order weights exact). You do not need to re-download weights: it runs on the same hy4-3.56 pack and DFly2-B6 EXL3 3.5 drafter.

Upgrading a box

  • Re-run the installer at the new tag: curl -fsSLO https://raw.githubusercontent.com/TandemLLM/TandemEngine/v0.18.2/install.sh && bash install.sh.
  • On a box already running hy4-3.56, weights stay on disk and nothing downloads twice.

Prompt reading (prefill)

Hy4-flash prompt processing speed: Release v0.18.1 vs v0.18.2

  • Single-chat 8k cold prompt reading climbs from 903 to 1,351 tok/s (+50 %, direct), and 8k warm reading climbs from 945 to 1,350 tok/s (+43 %, direct).
  • 32k prompt reading reaches 1,354 tok/s (~+42 % over v0.18.1).
  • Fused sparse indexer logits remove up to 412 GB of temporary per-chunk writes and 20 to 32 GB of allocator fragmentation at long context. Full 128k reading jumps from ~221 to 1,300 tok/s (~5.9x, cutting wait time from ~10 min down to 1.7 min), and 256k reading jumps from ~206 to 1,233 tok/s (~6.0x, cutting ~21 min down to 3.5 min).
  • Multi-chat 256k prompt reading reaches 1,117 to 1,150 tok/s across 2 to 8 concurrent chats (~2.0x to 2.1x over v0.18.1).

Text generation (decode)

Hy4-flash text generation speed: Release v0.18.1 vs v0.18.2

  • Single-chat speculative decode at 4k context moves from 38.1 to 48.8 tok/s (+28 % at 3.37 accepted tokens per round), while 40k plain decode drops from 45.3 to 38.8 ms per token (+17 %, direct).
  • Concurrent bare-engine speculative generation reaches 65.2 tok/s across 2 chats (8k), 97.8 tok/s across 4 chats (8k), and 122.5 to 144.0 tok/s across 8 simultaneous chats from 1k all the way out to 256k context.
  • With 8 chats active at 256k tokens each (2M active tokens in memory), total speed holds at 123.8 tok/s (~1.9x over v0.18.1), reaching 226.8 GB/s out of ~245 GB/s sustained GB10 LPDDR5X bandwidth (92.6 %).

Direct single-chat latency and full speedup overview

Hy4-flash direct single-chat verify latency and overall speedups: Release v0.18.1 vs v0.18.2

  • Direct 4k speculative verification latency drops from 80.8 to 61.9 ms at 6 tokens (+31 %) and from 92.8 to 66.1 ms at 8 tokens (+40 %), with step_ms down from 7.11 to 5.01 ms (+42 %) and DFly2 draft down from 8.58 to 7.12 ms (+21 %).

What changed under the hood

  • Added 8k layer-major prefill windows (HY4_PF_WINDOW=8192) so all 512 routed experts per MoE layer decode once per 8k window instead of twice, alongside specialized 3.5-bit prefill MoE, 3-launch fused Engram (IEEE sqrt_rn), hb16x2 sparse MLA, fused EXL3 input rotations, and 4 KiB coalesced whole-chunk Engram AIO.
  • Fused BF16 sparse indexer score GEMM, head-weighted ReLU sum, and masking into native CUDA kernels for both prefill and multi-lane decode (hy4_zmat.cu).
  • Added wide cluster-folded EXL3 dense and 4-CTA/SM 3.5-bit MoE decode kernels, zero-materialization decode attention, TN=2 exact GEMV, fused router, group-keys, top-k select, ckv norm/rotate/store, division-free hyper-connections, single-launch multi-lane commit, and DFly2 Flash-MLA with packed 3.5-bit kv_b_proj.
  • Enabled side-slot vision (Hy4VisionTower.side_images) with refcounted fp32 ops and a locked embed cache so concurrent image chats run side by side without queuing, alongside multimodal end re-read, pend_offer, larger suffix cache history, and pre-GC token flushes.

Every entry is in CHANGELOG.md, and the full Hy4-flash measurements live in docs/hy4-flash.md.