Low-latency inference: speculative decoding and serving.

A language model writes one word at a time. Two things decide how that feels: how fast the first word arrives, and how fast each word comes after. This is the field that works on both.

Low-latency inference is the set of techniques that make a large language model reply quickly and keep the words flowing, for many conversations at once. We walk it the way the field is built: what it is, why it is hard, how a modern serving stack does it, what it makes possible, and where it is heading. The papers behind each idea are linked, so you can read the source yourself.

Two parts of the wait
Time to first tokenUntil the reply begins
Read the promptThe
Time between tokensAs the reply streams
quoteisready.

Start sooner. Keep the rest flowing.

Serving optimizations work on both the initial wait and the gaps that follow. The words here illustrate the flow; they are not a tokenizer breakdown or a latency benchmark.

Two clocks a listener can feel.

A language model generates autoregressively: one token at a time, each one conditioned on every token before it. That single fact shapes the whole field.

Because words come out one at a time, two timings decide how a reply lands. The first is time to first token, or TTFT: how long after the prompt until the first word appears. It is dominated by the one-time prefill pass, where the model reads the whole prompt. The second is time per output token, or TPOT, also called inter-token latency: how fast each word comes after the first, during the decode phase.

There is a third axis the server cares about: throughput, the total tokens per second produced across all conversations at once. Throughput trades against per-user latency, and that tension runs through everything here. The plain goal: produce the first word quickly, keep the words flowing smoothly, and do it for many conversations on the same hardware. In a spoken setting those clocks decide whether a reply begins inside the window people expect in conversation, a budget the sibling Low-latency voice page owns end to end.

Latency and throughput measure different things
Time to first token
Delay until generation produces the first output token.
Time per output token
Pace of subsequent decoding steps.
Throughput
Total work completed across requests per unit time.
A server can improve aggregate throughput while making an individual request wait longer. Report the measures separately.

The slow part is usually moving the model, not the math.

For a single reply the bottleneck is memory movement, and the work the model remembers keeps growing. Both shape every technique on this page.

Memory-bound, not compute-bound

Most of each step is data movement.

To write one token, the machine streams the whole model and its running memory across the chip. For a single reply the time goes to moving that data, not to arithmetic, a point the Databricks engineering guide makes plainly. Adding raw compute does not help much; moving less does.

The KV cache grows

The model's memory expands with the conversation.

A transformer stores a key and value for every token it has seen so it does not recompute them. That store, the KV cache, grows with context length. Managed naively it gets wasted by fragmentation and duplication, which caps how many conversations fit in memory at once.

Latency vs throughput

The two pull against each other.

Batching more conversations together raises tokens per second but can delay any single user. Sizing the model up improves answers but slows every token. Tuning a serving stack is largely about where to sit on that trade.

You pay per token

Cost is per trip across memory.

Work is per token and per trip across memory, in time and in money. Every technique here is really about getting more value out of each trip: writing more useful tokens, moving fewer bits, or sharing each trip across more conversations.

A serving stack works the problem in layers.

Write more tokens per step, reuse work already done, move fewer bits, and keep the hardware full. These layers stack into a system.

1Write more tokens per step

Speculative decoding.

A small, fast draft model proposes several tokens ahead. The large model then verifies them in a single parallel pass and keeps the longest run that matches what it would have produced anyway. You get several tokens per step with the same output distribution as the large model alone, and no retraining. The foundational result, Leviathan et al. (2023), reports roughly 2x to 3x faster decoding as an industry figure for that work.

A draft-free variant skips the second model entirely. Instead of hosting a separate draft model, Medusa (Cai et al., 2024) adds a few extra prediction heads so the model proposes multiple next tokens itself, then verifies candidates together with tree attention. That removes the cost of training and hosting a second model.

Draft several tokens, then verify them

Small-model draft

thequoteissent

Target-model verification

thequoteisready
Keep the accepted prefix

Continue from the target model’s correction at the first rejected token.

Speculative decoding verifies a draft under the target model’s acceptance procedure. The example is schematic.

2Reuse work already done

The KV cache.

The reason the second token is cheaper than the first is reuse. Rather than recomputing the whole context every step, the model keeps the keys and values it already computed for earlier tokens and reads them back. That cache is what makes streaming generation affordable in the first place. How it is stored then decides how many conversations a single server can hold, which is exactly where the next layer comes in.

The mechanics of the cache, and the broader voice budget it sits inside, are picked up in Low-latency voice. Here it is enough to hold one idea: the model remembers its own work, and managing that memory well is half the serving problem.

Reuse earlier keys and values
Decode stepReuseCompute
Token 1Prompt cacheToken 1 K/V
Token 2Prompt + token 1Token 2 K/V
Token 3Prompt + tokens 1–2Token 3 K/V
The cache avoids recomputing earlier keys and values. New tokens still attend to relevant cached positions.

3Hold many conversations at once

PagedAttention.

The KV cache grows and shrinks per request, so a naive layout leaves ragged gaps that waste memory. Kwon et al. (2023), the work behind vLLM, stores the cache in fixed-size blocks and pages them like an operating system pages virtual memory. Fragmentation drops to near zero and blocks can be shared across requests, so one server holds many live conversations without waste. The paper reports roughly 2x to 4x higher serving throughput at the same latency as an industry figure for that system. The vLLM project write-up has the memory-layout intuition in pictures.

Map logical sequences onto reusable blocks
SequenceLogical blocksPhysical blocks
A0 · 1 · 24 · 9 · 2
B0 · 17 · 1
Allocate blocks as needed

Free finished sequences’ blocks for other requests.

PagedAttention manages KV memory in blocks, reducing waste from reserving a large contiguous region per request.

4Move fewer bits

Quantization.

Since decoding is memory-bound, shrinking what gets moved speeds it up directly. Quantization stores the model's weights in lower precision, for example 4 bits instead of 16, using second-order information to keep accuracy close to the original. GPTQ (Frantar et al., 2022) reports end-to-end speedups around 3x to 4.5x over full precision in its own results, with negligible accuracy loss, as an industry figure for that work. Related ideas shrink the KV cache the same way: grouped-query and multi-query attention keep fewer keys and values, so less data moves per token.

Use fewer bits to store weights
One weight16 bitsHigher-precision representation
Quantized4 bitsLower-precision representation
Potential benefit
Less memory and data movement.
Check
Accuracy, quantization overhead, and hardware support.
The stored representation is smaller. Actual speed and quality depend on the quantization method and runtime.

5Keep the hardware full

Continuous batching.

Instead of running a fixed batch of requests to completion, the server schedules at the granularity of a single token step. It slots new requests in and retires finished ones every iteration, so the hardware stays full and throughput rises sharply, without making any one user wait for a whole batch to finish. The idea comes from Orca (Yu et al., 2022), which introduced iteration-level scheduling and selective batching, the basis for continuous batching in modern servers.

Admit new work between decode steps
RequestStep 1Step 2Step 3
ADecodeDecodeDecode
BFinishesDoneDone
CWaitingJoinsDecode
Continuous batching fills available capacity as requests finish, rather than waiting for a whole fixed batch to end.

6It composes

Low-latency serving is a system, not one trick.

These layers stack. A quantized model, served with a paged KV cache and continuous batching, generating tokens via speculative decoding, is a single design where the gains compound. The takeaway to carry off this page: no one technique makes a reply fast on its own. They are tuned together, and the result is a serving stack that produces a first word quickly and keeps the words flowing for many conversations at once.

Optimize the actual serving bottleneck
TechniquePrimary target
Speculative decodingTarget-model generation work
KV cache managementReuse and memory allocation
QuantizationWeight storage and movement
Continuous batchingScheduling and utilization
These techniques interact. Benchmark the complete workload rather than multiplying isolated speedup claims.

Fast inference is what makes responsive assistance practical at scale.

At the field level: a first word that arrives quickly, words that keep flowing, many conversations at once, and headroom for bigger models within the same budget.

For a sales co-pilot, the bridge is at the outcome level. Responsiveness in a live conversation is a research problem the field has been steadily solving, and the techniques above are why a spoken assistant can answer quickly and keep answering smoothly while many people use it at once. The end-to-end voice budget that sits on top of all this is the subject of Low-latency voice.

A first word that arrives quickly.

Work on time to first token is what lets a spoken reply begin inside the window people expect in conversation, instead of a beat too late.

Words that keep flowing.

Steady time per output token is why a long answer does not slow down or stutter as it goes, so a back-and-forth feels natural.

Many conversations at once.

Paged memory and continuous batching are what make responsive assistance practical at scale, rather than a demo for one user. Lower cost per conversation is the same coin.

Headroom for better answers.

When each token costs less to produce, there is room for a larger or smarter model within the same latency budget, so quality and speed stop fighting.

This explainer covers published research. To see how AI REV Voice helps with sales conversations, explore Prism.

The direction the field is heading.

We describe the direction, not a roadmap of our own.

Speculation everywhere

Guessing ahead becomes routine.

Longer draft windows, self-drafting and parallel-head variants, and tree-structured verification are becoming a normal part of the decode loop rather than an add-on.

Disaggregated serving

Split prefill from decode.

Running the one-time prefill stage and the ongoing decode stage on different hardware, so each is tuned for its own bottleneck instead of sharing a compromise.

Lower-bit precision

Fewer bits, quality held.

Toward 4-bit and below for weights, and increasingly for the KV cache itself, while holding answer quality close to the full-precision model.

Smarter cache handling

Share, compress, page.

Sharing common prefixes across conversations, compressing or evicting old context, and paging to keep long sessions cheap as they grow.

Co-design

Scheduling and decoding together.

Batching, scheduling, and decoding tricks developed as one system rather than bolted on, since the gains compound only when they are designed together.

The papers behind this page.

Keep reading.

Sibling explainers in the Research section.

Talk. Done.

The payoff of all this work is simple: you talk, the reply comes back without a wait, and clean notes are waiting. See it on a real call.

No app required. Just your phone number.