Frontier Foundry

Inference Serving

The Power Plant · Inference & Serving

Running models efficiently for many users: batching, scheduling, hardware use.

Also called: inference engine, inference stack, model serving, serving stack, vLLM, SGLang, tensorrt-llm, continuous batching, disaggregated. In the glossary.

Inference Serving is cooling this week (×0.36 against the eight weeks before). What is moving.

How it works, as a machineThe Serving Hall · requests

Follow one request from a typed prompt at the gateway to the last streamed word, in a serving hall, with a gateway desk in front and a GPU rack bay behind.

  1. Cut into tokens
  2. Admit, hold or refuse
  3. Weave into the batch
  4. Read the whole prompt
  5. Write one token
  6. Stream the words back
Play Inference Serving

Inference Serving in plain words

Inference serving is running a trained model for many users at once. Requests are grouped into batches, scheduled across chips and streamed back as they are generated. Good serving squeezes more answers out of the same hardware, which sets the price and the speed that users see.

An analogy

A city bus depot. One bus per passenger would be absurd, so riders heading the same way share, and dispatchers decide which bus leaves when. Fill the buses well and fares drop; hold them too long waiting for a full load and the riders complain.

How Inference Serving connects

9 typed relations in the knowledge graph

Builds on

  • KV Cache: The prompt prefill scanner fills each request's KV cache and the scheduler spends the cache that is left.
  • Quantization: Smaller weights make each decode step cheaper to load, at some risk to quality.
  • Speculative Decoding: The decode rack can have a small model guess ahead and the large one check the guesses.

Built on by

  • GPUs & AI Chips: A powered, scheduled rack is what serves the tokens that inference serving counts.
  • Fast Inference: The request’s whole trip from the gateway to its last word is the serving hall’s story; this lab clocks one token of it.
  • KV Cache: The router and the pods are the serving layer the request travels through.
  • Long Context: Prefill, the parked cache and the queue of requests are what a serving stack schedules.
  • Mixture of Experts: Decode loads the weights of every expert a batch activates, so serving has to place and route for them.

Makes possible

Often in the same sources

Speculative Decoding, Quantization, Fast Inference, KV Cache, On-Device & Local Models, Mixture of Experts

See Inference Serving in the knowledge graph

Inference Serving in the news

from the daily digests

Who is behind Inference Serving

people, labs, products and models

Named in its facts

What the sources say

2 parts · 9 sources · updated 2026-11-27

Inference serving turns a trained model into something many people can call at once. A request is admitted, tokenised, sent to a replica, folded into a batch by the scheduler, read whole (prefill), written token by token (decode) and streamed back. The scheduler, the KV cache and the batch limit set what the GPUs can carry; past that, queues grow and first-token time climbs, and the sources say to refuse early or add replicas.

The front hall: prompt in, replica chosen

A request reaches the gateway as text. It is cut into tokens, then a decision is made before any GPU memory is spent: admit, hold or refuse. A router then picks the replica, and for long prompts the one that already holds the prompt's cached prefix.

  1. The tokenizer hopper cuts the typed prompt into tokens, once per request.
  2. The admission gate admits, holds or refuses the request before it takes any GPU memory.
  3. The prefix routing board sends the request to the replica that already holds its cached prefix.
63% admitted, 2.5 s to about 1 s
In one benchmark with the engine held to four requests at a time, a policy that let at most two wait admitted 63% of requests and cut the 95th-percentile time to first token from about 2.5 seconds to about 1 second (the talk's own runs) Harshul Jain
40 requests in 2 s vs 8 at once
The talk's worked example: a deployment that holds eight requests at once, meeting forty arriving in the same two seconds (an illustration, not a measurement) Harshul Jain
72 hours
How long one lab keeps the KV caches of its users so that cached prompt prefixes can be reused, as the YC Paper Club speaker read from that lab's published numbers Y Combinator
  • A request arrives as a Unicode string, an image or a video; it is preprocessed into tokens and mapped to tensors on the GPU before the model runs. Charles Frye
  • Tokenizing takes a millisecond or less and happens once per request; for models of roughly twenty billion parameters and up it rarely shows as a bottleneck, though a small model with a very large input can show it. Charles Frye
  • On a new model release the tokenizer and chat template are often slightly buggy; log the token IDs so such bugs can be found from the logs. Charles Frye

When it breaksSlow first, then errors. Two public post-mortems two years apart: a day of unusually heavy traffic ran one lab's routing servers out of memory, and another lab's mid-tier model got slow, then returned errors for about 90 minutes, with too little compute for the demand. Neither follow-up asked for a faster engine; they asked for load shedding and earlier detection of capacity limits. Harshul Jain

Open questionWhen requests outrun what the engine can serve, add replicas or say no at the door?

  • Add replicas: a traffic spike shows up as queueing and slower tokens, and new replicas bring the queue back to baseline; scale up resources to solve congestion. Charles Frye
  • Say no early: neither big outage follow-up asked for a faster engine; both asked which request gets in. Decide at the front door, before the request takes memory. Harshul Jain

The rack bay: batch, read, write, stream

The scheduler is single-threaded and gates the GPU: it folds requests into one batch, over and over. Each request is read whole once (prefill, compute-bound) and then written one token at a time (decode, memory-bound), each token going back through the batch until the model stops.

  1. The batch scheduler board folds waiting requests into the running batch, up to a limit.
  2. The prefill rack reads the whole prompt in one pass and builds the request's KV cache.
  3. The decode rack writes one token per step, loading the weights each time.
  4. The token stream window turns tokens back into words and streams them to the client.
32 requests at once
The starting max-sequences setting of the workshop vLLM server: it told the engine it could only process 32 requests at a time Du’An Lightfoot
800 to 1,100 tokens/s; 2,000 to 800 ms
At 64 concurrent requests on the workshop server, aggregate throughput and latency before and after the limit was raised, as the presenters read them Du’An Lightfoot
about 50% vs about 5%
Share of the GPU's peak arithmetic used in training and prefill (about 50%) against decode (maybe 5%), as the speaker put it Y Combinator
14,000 tokens/s per GPU
Decode throughput per GPU in one lab's published figures, against 60,000 tokens a second for prefill without cache hits Y Combinator
5.9-13.9%
Reduction in median time per output token from a decode router that routes by expert locality, over the best of four load-balancing baselines, on up to 40 GPUs (the paper's result) Hugging Face
about 9 minutes
Cold start of one large model on a rented GPU pod, as the speaker described it; the time to bring up one more replica Chris Vela
  • The scheduler is semantically single-threaded and defines the work on the GPU; though it does far less arithmetic than the GPU it can become the bottleneck, the gatekeeper to the GPU. Charles Frye
  • The scheduler runs a core loop that builds batches of requests for the model runners, because GPUs do much better on many requests at once; tokens and logits come back and go round again. Charles Frye
  • Batch construction is where engines differ: one queue can mix prefill and decode or keep them apart; in an ideal server there is no queue, and a growing queue is a problem. Charles Frye

When it breaksDecode before prefill: one in a thousand answers is gibberish. A hybrid model served by a popular engine returned gibberish for about one request in a thousand, only under load and only in that engine, with no crash or warning. The scheduler had sent a request to decode before its prompt was read, so the kernels used another request's stale state. The fix marked a request with no computed tokens as prefill. Asaf Gardin

Sources

9 in all

More in Inference & Serving

The Power Plant: the whole area
  • Speculative DecodingA small model drafts tokens and the big model checks them in one pass, for faster output.
  • QuantizationStoring weights in fewer bits to make models smaller and faster.
  • KV CacheMemory of past tokens' attention keys and values, the main memory cost of long contexts.
  • On-Device & Local ModelsRunning models on phones and laptops instead of in the cloud.
  • Token Economics & PricingWhat tokens cost, how fast prices fall, and how that shapes products.
  • Fast InferenceVery high tokens-per-second serving (Cerebras, Groq, fast modes).