Pidoku

From Paper to Production: Evaluating New Techniques

Module 31 Lesson 31.h 55 min Difficulty 4/5

Prerequisites 24.a, 31.f, 13.a


Before you start: words you need#

WordPlain meaning
TechniqueA new method from a paper, a blog or a vendor: a quantization scheme, a decoding method, a scheduler, a kernel.
UpstreamThe open-source project you build on (vLLM, SGLang, FlashInfer, PyTorch). “Waiting for upstream” means letting them implement it.
ForkYour own modified copy of an upstream project. Every change you keep only in your fork must be carried forward by hand on every upgrade.
Traffic replayRe-sending a recorded sample of real production requests to a test deployment, with their real timing and lengths.
Quality gateThe evals and output-comparison checks a change must pass before it reaches users (Module 28).
Technology radarA short list of techniques with a status for each: adopt, trial, assess, hold.
Option valueThe value of being able to decide later, with more information. Prototyping buys it.

1. What is it?#

Dozens of inference papers appear every week. 24.a teaches how to read one: the seven questions about baselines, configurations, bottlenecks, scale, quality, hidden costs and simpler alternatives. This lesson is the next step: how an organisation turns the few papers that survive that reading into production changes, and how it says no to the rest.

The pipeline:

flowchart LR
  T["Triage<br/><small>24.a's seven questions</small>"] --> MAP["Map to the fleet<br/><small>which rows, how much $</small>"]
  MAP --> UP["Upstream check<br/><small>shipped? planned?</small>"]
  UP --> PR["Prototype<br/><small>replay, at the SLO</small>"]
  PR --> G["Gates<br/><small>quality, perf, stability</small>"]
  G --> RO["Rollout<br/><small>canary, cells</small>"]
  RO --> OWN["Own it<br/><small>or upstream it</small>"]
  class T,MAP io
  class UP memory
  class PR,G compute
  class RO,OWN warn

Most techniques stop at the first or second box, and that is the pipeline working.


2. Why does it matter?#

  • Most paper gains do not transfer. Baselines are weak, batch sizes are small, models are old, and quality is measured on benchmarks that do not match your traffic (24.a). Adopting on headlines wastes quarters.
  • Some gains are large and real. Paged KV cache, continuous batching, FlashAttention, FP8, speculative decoding and disaggregation all started as papers and are now in every serious stack. An organisation that adopts them a year late pays for that year.
  • Forks are expensive. Every private patch on vLLM has to be rebased on every release, which arrive every few weeks (19.h). Teams that fork freely end up unable to upgrade.
  • Every serving technique is a quality risk. Quantization, speculative decoding with lossy acceptance, KV compression, sparse attention: each can change outputs (Module 28).

3. Simple analogy#

A hospital adopting a new treatment. A promising study is not enough. Doctors check whether the study’s patients look like theirs, whether the comparison was against the current best treatment, and what the side effects were. Then a careful trial on their own patients, with monitoring, before it becomes standard. Often the right answer is “wait until the larger trial reports”, and sometimes “this is clearly better, start now”.


4. Tiny example: three techniques on one Monday#

A  A new KV-cache compression paper: "4× less KV memory, negligible quality loss",
   measured on 8B models at batch 1, perplexity only.
B  A speculative decoding drafter (EAGLE-style), already in vLLM, with a 2× claim at batch 1.
C  A scheduler paper that cuts p99 TTFT by 40% for multi-turn agents, no code released.
  • A: Assess. Does the fleet run out of KV memory at all (22.f)? If memory is not the bottleneck, 4× less KV buys nothing. Perplexity is not a quality gate. Put it on the radar as “assess”.
  • B: Trial. It is upstream, so the cost is a config change plus a trained drafter. Benchmark at production batch sizes, where the gain shrinks (13.n), and run the quality gate.
  • C: Map to the fleet. If agent traffic is a large share and p99 TTFT is the SLO under pressure, prototype the idea in the router (21.h), which is a smaller change than modifying the engine.

5. Technical explanation#

Stage 1: triage#

Apply 24.a’s seven questions. Then answer two more that only an operator can:

  • Is this our bottleneck? A technique that removes a bottleneck you do not have is worth zero. The fleet scorecard (31.f) says which rows are memory-bound, compute-bound, prefill-heavy or latency-limited.
  • How much of the fleet does it touch? A 2× gain on 3% of GPU-hours is a 1.5% fleet gain.

Record the result on a technology radar so the same paper is not triaged five times:

RingMeaningMatches 24.x status
Adoptdefault for new deploymentsESTABLISHED
Trialin production on some rows, gatedEMERGING, proven for us
Assessprototype or watchEMERGING
Holdnot now; reason recordedSPECULATIVE, or not our bottleneck

Stage 2: upstream check#

Before writing code, find out whether vLLM, SGLang, TensorRT-LLM, FlashInfer or the model’s authors have shipped it, have an open pull request, or have it on their roadmap (19.h). Then choose:

OptionWhen
Use upstreamit is shipped; your work is configuration, testing and gates
Contribute upstreamit is not shipped, you need it, and it is general enough to be accepted
Waitupstream will likely ship it soon and the value of having it early is small
Private fork / pluginunique to your models or hardware, and worth the permanent maintenance

Prefer extension points (vLLM’s plugins and custom ops, 19.f) over a fork when you must keep something private.

Stage 3: prototype on your traffic#

  • Replay real traffic at real arrival rates, prompt lengths and session structure (22.g).
  • Measure at the SLO: goodput, p95/p99 TTFT and ITL. Not batch-1 speed.
  • Measure on your models, at your precision, on your hardware.
  • Time-box it. Two weeks is usually enough to learn whether the gain is real. That information is worth more than an early start on the full build (section 6).

Stage 4: gates#

The same gates as every fleet change (31.f), with extra weight on quality:

  • Evals on tasks that matter to your users, not only perplexity.
  • Output and logprob comparison against the current configuration; KL thresholds (Module 28).
  • Long-context and edge cases: the p99 prompt, unusual languages, tool calls, structured output.
  • A soak test for stability and memory leaks.

Stage 5: rollout and ownership#

  • Roll out by cell and region with a canary (23.g, 31.g), behind a flag that can switch it off.
  • Name an owner for the technique in production. If it is a private change, the owner rebases it on every engine upgrade.
  • After 90 days, compare realized with projected gains and update the realization ledger (31.f).

Saying no well#

Most of the job is declining. A good “no” is short, written and re-openable: “Hold: our fleet is compute-bound on prefill; this saves KV memory. Revisit if long-context traffic exceeds 30% of GPU-hours.” Engineers who brought the paper learn the reasoning, and the radar keeps the decision.


6. Under the hood: build now, prototype first, or wait?#

For a technique that applies to a given share of a $40M-a-year fleet, the program compares the expected value over 12 months of building it now, spending two weeks on a prototype first, or waiting for upstream to ship it. Probabilities and effort are illustrative; take them from your own history.

Go
// adoptev.go — build a new technique now, prototype first, or wait for upstream?
package main

import "fmt"

func main() {
	const (
		fleet     = 40e6 / 12 // $ per month
		pWorks    = 0.6       // chance it passes our quality and performance gates (31.f history)
		weekCost  = 5000.0    // one engineer-week, fully loaded
		buildWks  = 16.0      // our own implementation, ready in month 4
		maintWks  = 2.0       // per month: rebasing on engine upgrades, fixing breakage
		protoWks  = 2.0       // a prototype on traffic replay that tells us whether it works
		pUpstream = 0.7       // chance the engine ships it within 6 months (else not this year)
		horizon   = 12.0      // months we evaluate over
	)
	fmt.Printf("%-6s %-6s %12s %12s %12s   %s\n", "share", "gain", "build now", "proto first", "wait", "best")
	for _, share := range []float64{0.05, 0.40} {
		for _, gain := range []float64{0.10, 0.25, 0.50} {
			save := fleet * share * (1 - 1/(1+gain)) // $ per month once deployed
			// Build now: pay for the build whether or not it works; benefit from month 4.
			build := pWorks*(save-maintWks*weekCost)*(horizon-4) - buildWks*weekCost
			// Prototype first: 2 weeks to learn; build only if it works; benefit from month 4.5.
			proto := -protoWks*weekCost + pWorks*((save-maintWks*weekCost)*(horizon-4.5)-buildWks*weekCost)
			// Wait: no build or maintenance cost; benefit from month 7 if upstream ships it.
			wait := pUpstream * pWorks * save * (horizon - 7)
			best := "build now"
			if proto > build && proto > wait {
				best = "prototype first"
			} else if wait > build && wait > proto {
				best = "wait"
			}
			fmt.Printf("%-6s %-6s %11.0fk %11.0fk %11.0fk   %s\n", fmt.Sprintf("%.0f%%", share*100),
				fmt.Sprintf("+%.0f%%", gain*100), build/1e3, proto/1e3, wait/1e3, best)
		}
	}
}

Output:

share  gain      build now  proto first         wait   best
5%     +10%           -55k         -35k          32k   wait
5%     +25%            32k          47k          70k   wait
5%     +50%           139k         147k         117k   prototype first
40%    +10%           454k         442k         255k   build now
40%    +25%          1152k        1097k         560k   build now
40%    +50%          2005k        1897k         933k   build now

How to read it:

  • Fleet share decides most of it. On 40% of the fleet, every gain is worth building now: each month of waiting costs more than the engineering. On 5%, waiting for upstream wins unless the gain is large.
  • Prototyping first is the cheap insurance. It loses a little against “build now” here because it delays the benefit by two weeks, but it never sinks 16 engineer-weeks into a technique that fails the gate. With a lower chance of success (exercise 1), it wins.
  • “Wait” is a real option, not laziness. Upstream implementations are maintained by others, tested on more hardware, and do not need rebasing.
  • Maintenance is the hidden cost. Two engineer-weeks a month for a private change is $120k a year; it is why small gains on small shares lose money when built in-house.

7. Performance implications#

  • Measure at production batch size. Many decoding and attention techniques shine at batch 1 and fade at batch 64 (13.n, 22.g).
  • Techniques interact. FP4 weights change the arithmetic intensity that speculative decoding relies on; KV compression changes which attention kernels apply. Re-benchmark combinations, not each technique alone.
  • The bottleneck moves. After a large win, the next technique’s value changes. Re-triage the radar after each major adoption.

8. Production implications#

  • Keep the radar public inside the company, with a reason for every “hold”.
  • Budget for upstream work. Contributing is usually cheaper than maintaining a fork, and builds relationships with the projects you depend on.
  • Require a quality gate for every adoption, even “lossless” ones; implementations have bugs even when the maths is exact.
  • Track private patches as a cost line: number of patches, rebase time per upgrade.
  • Close the loop: projected vs realized for every adoption (31.f).

9. Common mistakes#

  1. Adopting on headlines measured at batch 1 on someone else’s model.
  2. Solving a bottleneck you do not have.
  3. Forking upstream for a small gain, then being unable to upgrade.
  4. Perplexity as the quality gate.
  5. No time box on prototypes. Exploration becomes a quarter.
  6. Saying no without writing why. The paper comes back next month.
  7. Waiting too long on large, upstreamed wins. Every month costs real money at fleet scale.

10. Hands-on exercise#

  1. Run adoptev.go. Set pWorks to 0.3. When does “prototype first” become the best choice?
  2. Set pUpstream to 0.2 (a niche technique upstream will not prioritise). How does the 5% row change?
  3. Pick a recent paper from 24.b–24.h. Write its radar entry: ring, reason, the fleet rows it would touch, and the trigger to revisit.
  4. Write the prototype plan for one technique: traffic replay, metrics, quality checks, time box and the decision rule at the end.

11. Interview questions#

  1. A paper claims 3× faster decoding. Walk through how you decide whether to adopt it.
  2. When should you contribute a technique upstream rather than keep it private?
  3. Why can a technique that is “lossless” in theory still need a quality gate?
  4. How do you decide between building now and waiting for the engine to ship it?
  5. What goes on a technology radar, and why record the reasons for “hold”?
  6. Name two techniques that went from paper to standard in under two years, and one that did not. Why the difference?

12. Further reading#

Checked on 13 November 2026.

  • 24.a (how to read an inference paper), 24.j (the frontier in 2026, with status labels), Module 30 (landmark papers and what held up), 28.d (evaluating serving changes: the quality gate).
  • vLLM blog — what upstream is shipping; check here before building.
  • SemiAnalysis InferenceX — independent numbers to compare against vendor and paper claims.
  • Technology Radar (Thoughtworks) — the adopt/trial/assess/hold format this lesson borrows.
  • 19.f (vLLM plugins and extension points), 31.f (the realization ledger), 13.a (optimization methodology).

↑↓ navigate↵ openesc close

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