Dev builds LLM inference engine from scratch, hits 2143 tok/s on RTX 3060 (~98% of vLLM)
udmrzn · x · 2026-12-03
A developer wrote an LLM inference engine from scratch to understand where vLLM and SGLang's speed comes from, recording every optimization in its own git commit so readers can follow the exact path.
Starting from 150 tok/s, the engine reached 2143 tok/s on a single RTX 3060 — about 98% of vLLM and SGLang's max throughput. An architecture diagram lays out the key optimizations: continuous batching with prefix caching and preemption, overlap scheduling, chunked prefill, ragged (CSR) batching, paged KV cache, FlashAttention, torch.compile, and decode-only CUDA graphs.
More from Infra
- Jensen Huang confirms Nvidia chips smuggled into China as $250B wiped from NVDA — nima_owji · 2026-12-03
- UK model Flint 1.1 lands on "His Majesty's Token Service" via Doubleword deal — _rockt · 2026-12-03
- Google shows Gemma 4 running fully offline in Flutter via LiteRT-LM — no Wi-Fi, no API bills — rseroter · 2026-12-03
- 528KB pure-assembly UEFI file boots Qwen3.6-35B on bare-metal RTX 3090, up to 46% faster than llama.cpp CUDA — HankYeomans · 2026-12-03
- Space solar math: 150 Starship flights could deliver 1 GW in orbit by 2029 — JOBhakdi · 2026-12-03
- Hugging Face engineer explains file deduplication that cuts storage costs — lhoestq · 2026-12-03