Cerebras reports a five times increase in inference throughput using disaggregation with the same number of systems and no reduction in token generation speed. The approach combines multiple chip types in one inference system, assigning different hardware to the segments of inference that are memory- or compute-bound. This is the first article in a series exploring heterogeneous disaggregation from the ground up.
How accelerators balance compute and memory movement
An accelerator is hardware built to speed up particular kinds of computation. GPUs are one example. We can think of accelerators as two parts working together to execute a program. Compute units perform the arithmetic themselves—operations such as addition, multiplication, and bitwise logic. Memory stores data. These are typically user inputs, model weights, intermediate values, and results. Arithmetic only happens in an accelerator's compute units, not in memory. So, data movement is necessary for every computation. To use an accelerator efficiently, engineers try to get as much arithmetic as possible from each transfer: once data has been moved from memory, how many calculations can we perform before moving more? Arithmetic intensity is the measure of that efficiency. It is the amount of computational work for the amount of data moved. More precisely, the number of floating-point operations divided by the number of bytes transferred. Arithmetic intensity tells us how much calculation we do for each byte moved; it does not directly tell us how fast an operation runs. When the processor spends much of its time waiting for data, memory bandwidth matters most. When it stays busy calculating, compute capacity matters more.
Arithmetic intensity with simple matrix examples
Consider a simple matrix addition. To perform it on an accelerator, we need to read two matrices from memory, do the addition in the compute cores, and save the result back. Here we load two numbers from memory (2 bytes each), execute a single FLOP to add them, then write the 2-byte result back to memory. This gives us 1 FLOP over 6 transferred bytes, for an arithmetic intensity of 0.167 FLOPs per byte. Notice that as you increase the matrix size with the slider, both the calculation count and the bytes transferred grow in proportion. So in this example, although the total number of FLOPs increases for larger matrices, the relative arithmetic intensity stays the same.
Matrix multiplication follows the same basic path: load two input matrices from memory, multiply and add their values in the compute units, then save the result matrix back to memory. But unlike addition, each output value is built from an entire row of the first matrix and an entire column of the second. Every loaded value can now contribute to more output values. The amount of data moved grows with the number of matrix entries, but the amount of arithmetic grows faster. With matrix multiplications, we can increase arithmetic intensity even if only one of the input matrices changes. Even with one changing input, arithmetic intensity grows with input size! This relationship between input size and arithmetic intensity is key to understanding inference's different phases.
Inference is two phases with different profiles
Inference is a chain of many matrix multiplications. Generating a token from a language model is basically a matrix operation between a model's weights and input tokens. The left input matrix represents the model's weights. These are learned values that are fixed during inference. The right input matrix represents the input tokens that the model needs to process. Each column is some numerical representation of a token.
To generate a single output token, the accelerator moves both the weights and inputs from memory into compute and performs a chain of matrix multiplications. What looks like one continuous generation process is actually two distinct phases. First, the model processes the entire prompt and produces the first response token. Then it generates the rest of the response one token at a time. These phases are called prefill and decode, and they have very different arithmetic intensity profiles.
Prefill processes the entire prompt in parallel
During prefill, the entire prompt is processed in parallel. Real-world prompts can contain thousands or even hundreds of thousands of tokens. Uploading a 100-page PDF to a chatbot essentially generates a massive matrix calculation that needs to be processed. This is why prefill has relatively high arithmetic intensity. It is a large matrix operation.
Decode generates one token at a time
During decode, tokens are generated one after another. At first, it may seem like the model needs to run the entire growing sequence through the same large matrix multiplication every time. But language models avoid that with the KV cache. The KV cache stores keys and values computed for earlier tokens, so we do not have to calculate them again. As the context grows, reading and using the cache takes more work. Thanks to the cache, we avoid recomputing earlier tokens' keys and values. The accelerator still reads cached keys and values from memory and uses them in attention. We show only the new token moving into compute to emphasize that earlier tokens' keys and values are reused rather than recomputed.
Prefill and decode have different computational workloads
In both phases, all of the model's weights must be brought to compute. That can mean moving hundreds of gigabytes or even terabytes of data. All of this has to be transferred to generate a single token, regardless of whether it is processing a million-token prompt during prefill or processing a single new input token during decode. This is why prefill and decode have such different computational workloads despite having similar memory movement. The Shared Scheduling Problem
So far we have followed a single request through the system. In production, an inference server typically handles many requests concurrently. Some requests may be in the prefill stage, while others are already generating tokens in the decode stage. When prefill and decode run on the same hardware, they can interfere with one another. Prefill is highly compute-intensive, which can stall ongoing decode requests. A scheduler determines how requests are assigned and prioritized. Prioritizing prefill helps new requests begin sooner, but can interrupt users whose responses are already streaming. Prioritizing decode helps existing responses stream smoothly, but can cause new prompts to wait for a long time before any response. These decisions genuinely affect end-user experience.
Disaggregation separates workloads onto different hardware
Disaggregation is a systems design pattern. It identifies work with different resource needs, then operates those workloads separately rather than forcing them to share a single pool of hardware. A disaggregated system uses two separate hardware pools: one for prefill and one for decode. In a shared pool, time to first token and inter-token latency are directly coupled. Starting a new prompt can delay active responses; protecting active responses can leave new prompts waiting. Disaggregation is a lot more than smoother streaming. More fundamentally, disaggregation changes the control interface for the serving system.
More control over trade-offs
In a shared pool, capacity, batching, and scheduling decisions affect prefill and decode together. Once the stages are separated, operators can tune each one independently—allocating hardware, setting batching policies, and prioritizing latency or throughput according to the product's requirements. For example, a system with strict time-to-first-token targets can reserve more capacity for prefill, so incoming prompts start promptly without consuming decode capacity. A system that prioritizes a smooth streaming experience can give decode a larger or more tightly scheduled pool, keeping active responses moving even when prompt traffic spikes. The point is that these pools can be scaled individually.
Transferring the KV cache between pools
After prefill builds the KV cache, the system transfers that state to the decode pool, where it is loaded into memory before generation can continue. Unlike the model weights, which are already loaded in both pools, the KV cache is request-specific data. Handoff adds some network and coordination overhead, which is why disaggregation is most compelling at scale: with enough concurrent work, the gains from independently sizing and scheduling prefill and decode can outweigh the cost of transferring state and operating separate pools. Once prefill has processed a prompt, decode needs the request-specific state that prefill created. Both pools already have the model weights, so the state that must cross the boundary is the KV cache. Separating the phases adds costs too. The KV cache must travel between pools, and either pool can sit idle if their capacities do not match demand. Latency also depends on whether the cache is sent across colocated machines or across regions. Ultimately the operator must decide whether the latency addition is acceptable.
Heterogeneous disaggregation with different chip types
Disaggregation is even more powerful when introducing heterogeneous hardware combinations. The question is no longer simply which accelerator should run the model, but which combination of accelerators best serves this workload. If each pool can be assigned to different hardware, it makes specialized hardware compelling: an accelerator that is exceptional at one dimension—such as prompt processing, memory bandwidth, token speed, or cost efficiency—can boost performance beyond disaggregating with a single type of chip. Cerebras has exceptionally high aggregate on-chip memory bandwidth. Its wafer-scale architecture is designed around fast access to local memory, making it particularly well suited to the token-by-token portion of inference.
Why some accelerators are better at decode
Remember what makes decode different: we move a lot of data to produce just one new token. Its arithmetic intensity is relatively low, so adding more raw FLOP capacity does not necessarily make tokens arrive faster. The compute needs to be fed with more data from memory. On a GPU, model data resides primarily in high-bandwidth memory. Before compute units can use it, data is staged through smaller, faster on-chip memories and caches, including SRAM. This memory hierarchy provides large capacity alongside fast local storage, but data still has to travel from shared external memory toward the compute cores. Cerebras takes a different approach: it distributes SRAM alongside compute across the entire wafer. That gives compute fast access to nearby memory. This wafer-scale design gives Cerebras exceptionally high aggregate memory bandwidth. SRAM figures sum local memory contributions across the entire device, producing a bandwidth number far higher than what a GPU can achieve with its partitioned design. For the token-by-token portion of inference, this matters because the compute needs a steady stream of data to keep producing tokens at the desired rate.