Pidoku

How to Read an Inference Paper

Module 24 Lesson 24.a 1h Difficulty 3/5

Prerequisites 13.a, 22.b, 22.g


Before you start: words you need#

WordPlain meaning
BaselineThe system a paper compares itself against. “3x faster” always means “3x faster than this”.
RooflineThe rule that a step can go no faster than its bytes ÷ memory bandwidth or its FLOPs ÷ compute peak, whichever is larger (22.b).
Batch sizeHow many requests the GPU works on in one step. Results at batch 1 often vanish at batch 64.
Closed loop / open loopClosed loop: the load generator sends a new request only when one finishes, which hides queueing. Open loop: requests arrive on a schedule, as real users do (22.g).
GoodputRequests per second that meet their latency target. Throughput that misses the target does not count.
AblationTurning off one part of a system at a time to see what each part contributes.
Amdahl’s lawIf a technique speeds up a part that is 10% of the time, the whole thing can get at most about 10% faster (13.a).
Status labelsThis module tags ideas ESTABLISHED (on by default or routine in major engines), EMERGING (shipping, but not yet standard or not yet proven at scale), or SPECULATIVE (papers and prototypes only).

1. What is it?#

A method for judging an inference paper, a blog post or a vendor claim in about ten minutes, before you spend hours on its method section. It is seven questions, asked in order. Lessons 24.b–24.j apply them to each research area.

Almost every inference claim has this shape:

"We achieve N x [speedup / memory saving / throughput] over [baseline]
 on [model] at [configuration] with [quality impact]."

Every bracket is a place where the claim can be true and still irrelevant to you.


2. Why does it matter?#

  • Volume. arXiv gets dozens of new LLM-serving papers every week in 2026; the daily paper lists for early November 2026 alone include several new sparse-attention and diffusion-LLM serving methods. Nobody can read them all.
  • Most speedups shrink. Many large reported numbers are against a weak baseline. Building a strong baseline is itself a lot of work, so this is usually not dishonesty.
  • Vendor and team blogs are now primary sources. Much of 2026’s frontier (parallel drafters, attention–FFN disaggregation, FP4 KV caches) appeared first as engine blog posts written by the people who built the feature. They are valuable and they are not independent.

3. Simple analogy#

A used-car advert says “does 0–100 km/h in 4 seconds”. You ask: downhill? With a tailwind? Compared with what? The seven questions are the same habit: ask under which conditions the number was measured, before you get excited about the number.


4. Tiny example: one claim, three minutes#

“SparseKV evicts 75% of the KV cache and gives 3.1x throughput on a 7B model.” Baseline: Hugging Face generate(). Setting: batch 1, 4k context.

Decode is memory-bound, so a step takes about as long as reading its bytes. At batch 1 and 4k context, the KV cache is about 0.5 GB and the weights are 14 GB. Removing 75% of 0.5 GB saves about 2.6% of the bytes. A 3.1x gain cannot come from that, so it comes from the baseline: generate() has no continuous batching and no paged KV cache.

The same idea at batch 16 and 32k context, where the cache is 64 GB, could give up to 2.6x. So the technique may be worth something, just not in the setting the paper measured. Section 6 does this arithmetic in code.


5. Technical explanation: the seven questions#

Q1. What is the baseline?#

The most important question.

Weak baseline (be suspicious)Strong baseline
Hugging Face generate(): no continuous batching, no paged KVvLLM, SGLang or TensorRT-LLM, tuned, at a stated version
The authors’ own unoptimised reimplementationThe current best method for this exact problem
An engine with default, untuned flagsSeveral baselines, including the obvious simple one
An engine version a year oldThe release current when the paper was written

Red flag: the paper does not say which version and flags the baseline used. Engines move fast: vLLM shipped about one minor release a month in 2026 (v0.32.0 on 18 October 2026), so a “vLLM baseline” from six releases ago may be missing features that close most of the gap.

Q2. What was the configuration?#

Check batch size (the most important), sequence lengths, arrival pattern, hardware, model size and precision.

Red flags: batch 1 only; fixed prompt and output lengths; one model on one GPU; no sweep of arrival rate for a serving claim; throughput reported without the latency it was measured at.

Many techniques that look transformative at batch 1 give little at batch 64: speculative decoding, CUDA graphs and most memory-traffic tricks. “At batch size 1” is the most common hidden qualifier.

Q3. Which bottleneck does it remove, and does the arithmetic hold?#

A real speedup must reduce one of four things: bytes moved, FLOPs computed, serial dependency (steps that must wait for each other), or overhead (kernel launches, synchronisation, CPU work).

Apply the roofline (22.b). A 3x faster decode on a memory-bound workload must move about a third of the bytes, or do three times the work per byte. If the paper cannot say which, ask how.

Q4. What breaks at scale?#

Ask what happens at batch 128, at 128k context, with 100 tenants, when the technique’s assumption is false (a prefix cache when nothing is shared), and in the worst case rather than the average. Many papers improve one regime and hurt another. That is fine if they say so; check whether your regime is the one that gets worse.

Q5. What is the quality impact, and how was it measured?#

For anything that approximates (lower precision, sparsity, eviction, approximate caching):

EvidenceValue
PerplexityNecessary, far from enough
Standard short benchmarksBetter; check which ones and whether they were picked after seeing results
Long generations and reasoning tasksUsually missing; errors compound per token and reasoning degrades first
A test built to trigger the method’s failureThe one that matters most, and the one most often absent

KV eviction papers are the textbook case: strong benchmark numbers, while the failure (the model later needs a token that was evicted) is rarely tested directly (24.c).

Q6. What does it cost that is not reported?#

Training or fine-tuning; extra memory (draft model, extra heads, codebooks); a custom kernel that exists only in the paper’s repository; interaction with continuous batching, prefix caching, CUDA graphs and tensor parallelism; hardware needs (Blackwell only? RDMA?); ongoing upkeep, such as retraining a draft head every time the base model changes (13.o).

Q7. Is there a simpler thing that gets most of the benefit?#

SophisticatedSimple alternative
Learned KV evictionFP8 KV cache: 2x, one flag, almost no quality risk (13.h)
Learned request routerRoute by prompt length
Disaggregated prefill/decodeChunked prefill (12.k)
A cluster-wide KV storePrefix-aware routing (21.h)
A trained draft modelN-gram or suffix lookup drafting

In each pair the simple option often gets most of the benefit for a fraction of the effort. This is the most valuable question and the least often asked.


6. Under the hood: checking a claim with arithmetic#

The best speedup a KV-cache reduction can give on memory-bound decode is total bytes before ÷ total bytes after.

Go
// claimcheck.go — can a KV-cache trick deliver the speedup a paper claims?
// Decode is memory-bound, so step time ≈ bytes read per step.
package main

import "fmt"

func main() {
	const weightsGB = 14.0     // 7B model at BF16
	const kvPerTokenMB = 0.125 // 7B MHA model at BF16: 32 layers × 4096 × 2 × 2 bytes
	const cut = 0.75           // the paper evicts 75% of the KV cache

	for _, c := range []struct {
		batch, context int
	}{{1, 4096}, {8, 8192}, {16, 32768}} {
		kvGB := float64(c.batch*c.context) * kvPerTokenMB / 1024
		before := weightsGB + kvGB
		after := weightsGB + kvGB*(1-cut)
		fmt.Printf("batch %3d, context %6d: KV %5.1f GB of %5.1f GB read → best possible speedup %.2fx\n",
			c.batch, c.context, kvGB, before, before/after)
	}
}

Output:

batch   1, context   4096: KV   0.5 GB of  14.5 GB read → best possible speedup 1.03x
batch   8, context   8192: KV   8.0 GB of  22.0 GB read → best possible speedup 1.38x
batch  16, context  32768: KV  64.0 GB of  78.0 GB read → best possible speedup 2.60x

The paper’s 3.1x at batch 1 is above what its own mechanism allows (1.03x), so the gain is coming from somewhere else, almost certainly the baseline. And the setting where the idea would help most (large batch, long context) is the one the paper did not test. Verdict: interesting idea, wrongly measured; try FP8 KV first and measure whether you still need more.

Where to find the work#

SourceWhat it is good for
OSDI, SOSP, NSDI, EuroSysServing systems (Orca at OSDI 2022, PagedAttention at SOSP 2023; OSDI 2026 had papers on hierarchical KV caching, multi-model serving and scheduling)
MLSysML systems (FlashAttention-4 appeared at MLSys 2026)
ASPLOS, ISCA, MICRO, HPCAHardware and architecture
NeurIPS, ICML, ICLRAlgorithms: attention, quantization, decoding
arXiv cs.LG, cs.CL, cs.DCEverything, first, unreviewed
Engine blogs and release notes (vLLM, SGLang, TensorRT-LLM, LMSYS)What actually shipped, with the builders’ own numbers
Model technical reports (DeepSeek, Qwen, Kimi, NVIDIA Nemotron)Architecture choices made for inference
Independent benchmarks (MLPerf Inference, SemiAnalysis InferenceX)Cross-vendor numbers at stated settings

A technique that lands in a major engine has passed a test a paper has not: someone made it work with continuous batching, paged attention, CUDA graphs and everything else.


7. Performance implications: how fast ideas get adopted#

StageTypical time
Paper, reference code, headline numbers0–6 months
Independent replication; numbers revised down; first engine integration finds the interactions6–12 months
A flag in a major engine, off by default12–18 months
On by default, or abandoned18–30 months

The pattern that predicts speed: exact techniques with no downside are adopted fast; approximations whose quality cost depends on the task are adopted slowly or never.

  • FlashAttention (2022): exact, adopted within about a year.
  • PagedAttention (2023): the vLLM release was the adoption.
  • Speculative decoding (2022–23 papers): lossless but load-dependent; routine in 2026 only after draft heads, model-native MTP heads and verification that adapts to load arrived (24.e).
  • KV eviction (2023 papers): still not a default in late 2026, because the quality risk is hard to bound.

The 2026 cycle is faster for one reason: model makers now ship the feature with the model (MTP heads, FP4 checkpoints, sparse-attention indexers), and engines add day-0 support. The adoption decision moves from the serving team to the model maker.


8. Production implications: what to do with a compelling paper#

  1. Ask the seven questions. Ten minutes.
  2. If it survives, compute what it would give you: your batch, context and traffic, your measured bottleneck (22.a), and Amdahl (13.a). Often the answer is “2% for me”, and you stop.
  3. Check whether an engine already has it. If yes, try the flag and measure. If not, weigh the cost of maintaining a fork.
  4. If you implement it, measure against your own tuned baseline, on your own traffic, including quality.
  5. Write up what you found, including when it did not work. A negative result saves the next team months.

9. Common mistakes#

  1. Believing the headline number without reading the baseline.
  2. Not checking the batch size.
  3. Not doing the roofline arithmetic. A claim that breaks it is a claim about the baseline.
  4. Adopting before trying the simple alternative.
  5. Trusting quality claims that never test the failure the approximation should cause.
  6. Treating a paper’s code as production quality. It usually is not, and does not need to be.
  7. Treating an engine team’s blog benchmark as independent. It is a strong signal, measured by the people who built the feature.
  8. Reading the method section before evaluating the claim.

10. Hands-on exercise#

  1. Run claimcheck.go. Change the model to a GQA model with 8 KV heads (KV per token ÷ 4). At what batch and context does a 75% KV cut first give 1.5x?
  2. Pick three inference papers from the last month on arXiv. Spend at most 15 minutes on each with the seven questions and write a one-paragraph verdict.
  3. Pick one 2026 vLLM blog post with a benchmark. List what it states (hardware, model, batch, concurrency, lengths, version) and what it leaves out.
  4. Take one paper’s baseline and rerun it properly in a current engine, tuned. How much of the reported gain is left?
  5. Trace one technique from 2024 (for example chunked prefill or EAGLE drafting): paper, reference code, engine flag, default. How long did each stage take?

11. Interview questions#

  1. How do you evaluate an inference research claim quickly?
  2. Why is the baseline the most important question?
  3. Use the roofline to check a claimed 3x decode speedup from a KV-cache technique.
  4. A paper reports 3x at batch 1. What do you ask?
  5. Why are exact techniques adopted faster than approximations?
  6. How has the paper-to-production path changed now that model makers ship features with the model?
  7. What would you do before putting a technique from a paper into production?

12. Further reading#

Checked on 12 November 2026.

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in