AI Engineer World's Fair 2026
How Inference Keeps Up with Our Insatiable Need for Tokens — Cerebras & Gimlet Labs
Read the talk
How Inference Keeps Up with Our Insatiable Need for Tokens — Cerebras & Gimlet Labs
From continuous batching and KV caches to specialized hardware and agent-written kernels, Daniel Kim and Michelle explain how inference systems turn scarce memory, compute and power into more usable tokens.
From a talk by Daniel Kim
At a glance
Ideas worth remembering
Batching shares weight reads across requests; continuous batching replaces completed requests so shorter outputs do not leave capacity idle.
Paged KV allocation reduces unused memory reservations, prompt caching reuses computed state, and chunked prefill gives other requests opportunities to run.
Disaggregation can separate phases, model roles or attention and FFN work. The right division depends on workload shape, hardware strengths, communication costs and serving goals.
Speculative decoding saves full-model passes by drafting candidate tokens cheaply and verifying them with the full model.
Gimlet reports a 33% end-to-end speedup for GPT-OSS 120B on AMD hardware through agent-assisted kernel optimization. Uptime, model bring-up, custom software and silicon design offer further ways to increase usable inference capacity.
Faster tokens begin with moving the weights
Token demand keeps rising even as inference gets cheaper and faster. Daniel Kim of Cerebras opens with Google's reported jump from 480 trillion to 3.2 quadrillion tokens per month. Alongside Michelle, a Gimlet Labs co-founder, he follows the engineering needed to serve that appetite: first inside an inference worker, then across workers and different kinds of silicon.
The first obstacle is the autoregressive loop. A model generates a token, then uses the growing sequence to generate the next one. In Daniel's simplified account, each step streams the model's weights from memory into the compute units. Arithmetic can finish faster than memory supplies its inputs, leaving the compute units waiting. He describes cases with up to 90% idle time: the bottleneck is moving data, even when plenty of arithmetic capacity is available.
Splitting the model across four GPUs reduces the weights each GPU must read to roughly a quarter. Ideally, that would cut token latency by four. But the GPUs must combine their partial calculations through an all-reduce after the attention block and again after the feed-forward network, or FFN, in every layer. That repeated communication consumes part of the gain. Daniel's example gets only twice the speed from four times the compute.
This creates the speed–throughput tradeoff that organizes the rest of the talk. Assigning more hardware to one request can make its tokens arrive faster while leaving less capacity to serve everyone else. A Pareto frontier marks the best available combinations of individual-request speed and aggregate throughput. The useful engineering question is how to move that frontier outward, so a provider can improve one without paying as much in the other.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Share the weight read, then confront the cache
Batching starts with a cost already paid: reading the weights. Instead of using that read to advance one request, a worker advances several requests together. More useful work happens for the same movement of model weights.
What happens to capacity after a short request finishes? In a fixed batch, its slot can remain unused while a longer request continues. Continuous batching admits a new request into that opening. Replacing completed requests keeps the shared weight reads useful to more users instead of letting those slots sit idle.
The catch is that each active request brings its own memory demand. Attention retains key and value vectors—the KV cache—for tokens already processed. Daniel's rule of thumb for the 70-billion-parameter example is about one gigabyte per 3,000 tokens, or roughly 42 gigabytes for a single 128K-token context. Those figures depend on the model and cache representation; they are not a universal per-token cost. Run eight requests together and their caches accumulate, so batching can exhaust memory before it exhausts compute.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Waste less cache memory and reuse work already done
Where does reserved cache memory go unused? Paged KV cache addresses that allocation problem. In the earlier scheme described here, a request reserves physical memory for its cache, but may never use all of it. Paging separates the request's logical cache from where its contents sit in physical memory, allowing cache data to occupy available blocks. The allocation comparison is reserved-but-empty space versus blocks holding actual KV data. Daniel reports capacity for three times as many requests in the comparison he presents; the mechanism is recovering wasted space, rather than making each stored vector smaller.
Prompt caching saves a different resource: repeated computation. A coding agent or chat application may send the same long system prompt on successive requests. If the corresponding KV state is reusable, the next request can start from that cached work instead of recomputing it. Paging improves how memory is occupied; prompt caching avoids rebuilding state for a repeated prompt portion.
That distinction becomes clearer when inference is split into its two phases:
- Prefill: Process the input prompt, calculate its key and value vectors, and produce the first output token. Much of this work can run in parallel, making compute capacity especially important.
- Decode: Produce subsequent tokens one at a time while reusing the cache built during prefill. Repeated memory access makes bandwidth especially important.
The familiar pause before a chat response begins corresponds to prefill; the stream afterward corresponds to decode. Reusing a cached prompt portion removes some of the work behind that initial pause.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Keep one enormous prompt from blocking other users
Long-context coding agents turn prefill into a scheduling problem. Daniel gives contexts of 200K, 500K or a million tokens. In the blocking execution pattern he describes, a long prefill occupies the worker while other prefill and decode requests wait. Someone asking a short math question can therefore inherit the delay caused by another user's enormous coding context.
Where can those waiting requests make progress? Chunked prefill divides the long prompt-processing job into smaller pieces. Between chunks, the scheduler can run other requests' prefill or decode work. The openings appear between chunks that previously formed one uninterrupted block. The large request still needs processing, but it no longer has to monopolize the worker until all of its prefill finishes.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Different requests need different worker pools
Michelle moves from optimizing a worker to distributing work across a system. The starting point is the shape of a request: input length and output length change which resources matter most.
- Document summarization: Many documents go in, and one short answer comes out. The long prompt makes prefill and compute capacity dominant.
- Writing a book from a few themes: Little text goes in, but a long answer comes out. Repeated decode steps make memory bandwidth dominant.
- Long input and long output: Both phases contribute substantial work, so both compute and memory resources matter.
Prefill–decode disaggregation puts the two phases in separate worker pools. That makes their capacity independently adjustable. For document summarization, the system can add prefill workers to handle the documents while keeping a smaller decode pool for the brief answers. It avoids allocating equal resources to two phases that have very unequal amounts of work.
The split can also follow hardware strengths. Prefill offers substantial parallel computation across prompt tokens. Decode repeatedly steps through tokens and accesses the existing KV cache, adding to its memory demands. Once those phases have separate homes, they no longer have to use the same kind of machine.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Move the KV cache between machines with different strengths
Cerebras makes the bandwidth case through its SRAM-based architecture. Daniel cites 3.35 terabytes per second for an H100 and 21,000 terabytes per second for Cerebras, then gives a decode comparison of 600 versus 3,000 tokens per second. These are presented hardware and performance figures, not a proportional conversion from bandwidth into token speed; the recording does not specify the full model and serving conditions for that comparison.
The proposed AWS partnership gives phase disaggregation a concrete data path. Trainium chips perform prefill, AWS EFA transfers the resulting KV cache, and Cerebras CS-3 systems perform decode. What crosses between the two hardware pools? The cache carries the prompt's computed attention state into the machines that will generate subsequent tokens. Daniel projects five times the high-speed token capacity in the same footprint from this arrangement.
Gimlet generalizes the placement problem across Nvidia, AMD, Trainium, Cerebras, d-Matrix and Intel Gaudi. Its multi-silicon inference cloud breaks workloads into smaller pieces, characterizes their resource needs and maps those pieces to suitable hardware. Michelle reports three to ten times faster inference than homogeneous systems at the same power budget. That is a reported result for Gimlet's comparisons, rather than a promise for every workload; the rest of the talk explains finer divisions of work that can make such placement useful.
The cache connects specialized prefill and decode pools
Read the diagram as text
- AWS Trainium. Prefill — Process the prompt during prefill and build its KV cache.
- AWS EFA. Transfer — Transfer the KV cache to the decode systems.
- Cerebras CS-3. Decode — Use the transferred state to serve decode tokens.
- AWS Trainium → AWS EFA: KV cache from prefill.
- AWS EFA → Cerebras CS-3: Transfer cache for decode.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Let a small model draft and the full model verify
Speculative decoding divides work by model role. Ordinary autoregressive decoding runs a full-model forward pass for each output token. A smaller draft model can propose candidate tokens more quickly and with fewer resources, leaving the full model to verify them.
The draft is useful because it approximates the full model, sometimes through training or fine-tuning based on it. Approximate agreement is not enough to emit its output unchecked. Candidate tokens go through a verification stage on the full model, which determines which tokens can be accepted. Drafting and verification continue until the output has been produced.
Which expensive operations disappear in the nine-token example? Standard decoding needs nine forward passes on the full model. In Michelle's speculative example, producing those nine tokens needs only three full-model passes, plus the smaller model's drafting work. Several full-model passes are replaced by cheaper proposals and fewer verification passes. The speedup therefore depends on making the draft fast enough and having enough of its candidates accepted; the example does not establish a fixed threefold gain.
This offers two successive ways to move the speed–throughput frontier. First, speculative decoding on the same GPUs reduces how often the full model runs. Second, placing the small model on hardware that runs it especially quickly further reduces drafting time. Michelle points to d-Matrix and Cerebras for that role and reports ten times the interactivity at the same throughput in the comparison shown, relative to homogeneous machines.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Split the work inside a model layer
Attention–FFN disaggregation takes the division inside the model itself. Michelle motivates it with models as large as three trillion parameters, where even one layer can demand substantial resources. The layer's two major kinds of work have different characteristics:
- Attention: Frequent KV-cache accesses make memory bandwidth valuable.
- Feed-forward network: Dense matrix multiplications make fast matrix computation valuable.
The system can place attention on a bandwidth-oriented machine and the FFN on a machine suited to matrix multiplication. Execution then “ping-pongs” across machines within the model, rather than changing machines only between prefill and decode. This makes placement more precise while introducing repeated cross-machine movement—the same general communication cost that already limited the four-GPU example near the start.
There is no universally best disaggregation strategy or hardware choice. A useful design must account for the model, input and output shapes, latency requirements and throughput guarantees. Splitting more finely creates more opportunities to match work to hardware, but the resulting arrangement still has to serve the workload's actual goals.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Use agents to search for faster kernels
Agents intensify token demand, but they can also help improve the machinery serving it. Daniel calls the frontier “really getting yeeted to the right”; Michelle replies, “I told Daniel not to say that.” The engineering problem underneath the joke is substantial: supporting many kinds of silicon multiplies the kernel-optimization work.
A kernel implements a computational operation on the target hardware. Hand-tuning one is sensitive to the model, hardware family, hardware generation and workload shape. Gimlet's KForge agent takes hardware profiles, workload profiles and other optimization information as inputs, then treats kernel generation as a brute-force search problem. Those profiles matter because an implementation that suits one combination may be a poor choice for another.
What changes when KForge optimizes a forward pass? Michelle presents the original computation alongside the generated kernel, then reports a 33% end-to-end speedup for GPT-OSS 120B on AMD hardware after less than a week of running the agent, starting from kernels that had already been optimized. The recording does not explain the specific code transformation or evaluation procedure, so the result supports the practical value of the search without identifying which kernel choices produced the gain.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
More usable tokens also come from uptime, compilers and deployment
The next proposal extends agent assistance into custom silicon. Agents could help design chips tuned to particular models or workloads; those chips could train better AI, which could help design the next generation of chips. Michelle presents this as a recursive direction for future work, including faster tape-out, rather than a demonstrated result from the kernel experiment.
Several nearer operational opportunities broaden what counts as inference optimization:
- Incident response: More reliable systems and greater uptime create more time in which the installed hardware can serve tokens.
- Model bring-up: Agents could help a newly released model run across different hardware on day one, reducing the delay before available machines become useful for it.
- Custom compilers and inference stacks: Software tailored to a particular model, workload and hardware combination could expose optimizations that a general stack misses. Daniel cites Anthropic's two-week compiler effort as motivation, while framing workload-specific stacks as an opportunity.
Procurement, legal work and other back-office processes also affect what it takes to serve inference, and Daniel includes them among the candidates for agent assistance. The ending expands the unit of optimization from a token-generation step to the organization keeping that step available. Faster kernels improve the machine while it runs; faster deployment and better uptime help it spend more of its life doing useful work.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
Related talks
- Beating RL With Reflection: GEPA and Optimize Anything
Explains a complementary approach to agent-driven optimization: represent kernels or programs as editable text and return compiler or profiler diagnostics alongside a score.
Read the transcript and explore slides
Loading transcript and slides…