Build1 distinct publisher3 min readPublished
nano-vLLM's decode cost fits in one expression, W/B plus KV(Tavg), and a batch-1 context sweep on Qwen3-0.6B shows why those two terms move in opposite directions as you add requests or lengthen prompts.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
The definition of Tavg does most of the work here. Each request in the sweep generated 1,024 output tokens [6], so the 256-token case spends the run growing from 256 to 1,280 tokens of history, averaging about 768, while the 3,072-token case grows from 3,072 to 4,096, averaging about 3,584 [3]. Measured against average history rather than prompt length, the KV term rose 4.7x, not 12x [3].
Time per output token went from 2.998 ms to 3.407 ms, a rise of 0.41 ms [2]. If per-token time tracks per-token bytes at roughly fixed bandwidth, then 4.7x on the KV term buying 13.6% more time puts the KV read near 4% of per-token traffic at 768 tokens of average history [4]. The rest is W. At batch 1 the engine reads the whole weight set to produce a single token, because the decode input is one row per active request: X is [B, H] and each linear layer is [B, H] @ [H, D] [11]. The history it attends to is the paged KV state that BlockManager tracks and ModelRunner feeds to the model [13].
That is where the two knobs separate. W/B is one fixed read divided across the tokens a batch produces, so raising B is nearly free in bytes. KV(Tavg) is charged per request and divides by nothing [3]. Longer contexts raise a floor that continuous batching cannot lower, and prefill sits on the other side of the machine entirely, judged against a local BF16 GEMM reference of 71 to 77 TFLOP/s [15].
What the reported runs establish is narrower than the model. The sweep varies context at batch 1 [5]; the amortization half of W/B comes out of the code and the algebra rather than these measurements. The 531 to 562 GB/s figure is an estimate assembled from computed KV traffic plus the weight term, and the author says it is neither a direct DRAM measurement nor a kernel bottleneck diagnosis [7][8]. The accompanying figure caption is equally careful: compute-heavy prefill and memory-heavy small-batch decode are called workload hypotheses, not labels for every shape [14].
The headline comparison deserves less weight than the sweep. nano-vLLM's official benchmark puts it about 5.3% ahead of vLLM, 1,434 against 1,362 tok/s on 256 requests, on an RTX 4070 Laptop GPU [9][5]. For that to transfer you need the same offline regime where all 256 requests are available at once, the same small model whose weight term collapses quickly as B grows, and a stated vLLM version and configuration, which the benchmark line does not give [10]. A 72 tok/s gap is small enough that an unnamed version difference could account for it [10].
Priced this way, small-batch decode on this card buys weight reads and long-context decode buys KV reads, and only the first of those gets cheaper when you add requests [3][4].
Ranked by verification strength, evidence, and original report placement.
The stated decode cost model is bytes/token approximately equal to W / B + KV(Tavg) + overhead, where W is weight size, B is the active decode batch, KV(Tavg) is the history read for a request with average context length, and overhead means additional memory traffic.
In one decode iteration with B active requests, each request supplies one token, so the input X is [B, H] and a linear layer computes [B, H] @ [H, D].
The implementation covers request scheduling, prefill/decode separation, KV cache, paged KV blocks, continuous batching, prefix caching, FlashAttention, and CUDA graphs.
The scheduler selects work, BlockManager tracks KV blocks, ModelRunner prepares tensors and executes the model, and attention uses the persistent KV state.
nano-vLLM implements an LLM serving engine in roughly 1,200 lines of Python.
The author modeled nano-vLLM's prefill and decode costs, traced the implementation, and compared the predictions with Qwen3-0.6B BF16 running on one RTX 3090 (24 GB).
Distinct publishers with included, body-backed reporting in this cluster.
1 article · September 6, 2026
Follow any of these and your For You feed starts watching them — no settings page required.
build
Dual 3090s, no NVLink: the serving stack broke long before the model did1 distinct publisher
build
Intel puts its Arc GPU operating knowledge inside the coding agent already installed1 distinct publisher
build
Shadow engines cut LLM restart from 283 seconds to 7.3, and change what headroom is for1 distinct publisher
build
Moving only the runtime slot on one G5g instance exposed five wrong performance claims1 distinct publisher
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
One author, one card, caveats attached
The sweep numbers are precise and internally consistent: 333.56 down to 293.51 tok/s maps cleanly onto 2.998 to 3.407 ms per output token, and the cost model predicts the direction of that move. Everything past the arithmetic thins out. The bandwidth figure is inferred from throughput rather than measured, the author says so himself, the vLLM comparison is the project's own line with no version or configuration, and the two cold-prefill results that carry the compute-bound reading are cited without their values appearing.
Benchmark runs only, no usage signal
Nothing here speaks to use. We have two benchmark runs, the project's own and the author's sweep, and no deployment, dependency, download or user figure of any kind, so there is no basis for scoring how far nano-vLLM has travelled beyond people reading its source.
Framing outruns the history growth
The twelvefold prompt in our headline is not the quantity the cost model blames. Averaged over 1,024 output tokens per request, the history each request actually rereads grows 4.7x, and the 12 percent throughput loss it produces is consistent with a KV term that starts at roughly 4 percent of per-token traffic. Underneath that framing the author declines the stronger claims available to him, labelling the bandwidth number an estimate and calling compute-heavy prefill a hypothesis about these shapes. The overstatement sits in the packaging rather than in the measurements.
Low, but the comparison is the project's own
A personal engineering post about somebody else's code carries little promotional weight, and no affiliation with the project is claimed. Interest enters at one point: the vLLM comparison is nano-vLLM's self-published benchmark passed through as printed, so a project's favourable number reaches readers here without the configuration anyone would need to reproduce it.
Enough to reason with, not enough to quote
As a mental model of where decode bytes go, this holds: the mechanism is well argued and the arithmetic survives checking. As a source of numbers it does not travel. One GPU, one 0.6B model, batch size 1, no replication, and a comparative benchmark whose conditions are unstated.