LMSYS hand-writes a CUDA megakernel, pushing decoding to 1,109 tok/s on Blackwell
pranjalssh · x · 2026-11-20
LMSYS published a deep technical post on Muse Spark Open Ultrafast: the team wrote a megakernel from scratch in CUDA C++ and PTX, lifting decoding from 517 to 1,109 tok/s on 8×GB300 Blackwell GPUs.
- What a megakernel is: instead of serving a model as a chain of small kernels (one per matmul/attention), each layer (attention + MoE) runs as a single kernel with extreme latency hiding, so every memory load overlaps other work and the GPU stays busy.
- New tensor parallelism: expert weights use two all-gathers (fp4 + bf16) instead of one all-reduce.
- Other techniques: speculative decoding with faster drafting, prefetching weights into all caches, working around the instruction-cache curse of big kernels, multiple thread synchronization schemes, and 12 warps with distinct roles, one launch per layer.
- Up next: larger batches and moving toward "an operating system for the GPU".
Related event: LMSYS Hand-Written CUDA Megakernel Hits 1109 tok/s on Blackwell(2 posts)→
More from Infra
- 79% of AI GPUs Sit Idle as Firms Hoard Billions in Dark Compute — Glittering_Depth_722 · 2026-11-29
- Betelgeuse v0.8 hits 50.3 tok/s on RTX 3060 with a CPU expert-prefetch oracle, bit-exact — zyxciss · 2026-11-29
- GGUF-Radar gets a Windows UI: single-exe scanner for malware in GGUF models — Electronic-Metal2391 · 2026-11-29
- Baseten's 'Inference Engineering' book back in print, free copies at re:Invent — philipkiely · 2026-11-29
- Debate: inference demand makes H100s more valuable while NVDA stock heads south — teortaxesTex · 2026-11-29
- Prefetching MoE experts 2 layers ahead boosts V100 decode speed 29.9% — WaroftanksPro · 2026-11-29