Today ainotis Join

My notis

ComputePublished ExplainedAll news from that day

How prefill and decode split a model's answer into two different jobs

Prefill reads the whole prompt and decode writes the answer token by token. Amazon's new Trainium3SR system gives each job its own chip.

Share

Check our sources · 17 facts from 6 sources
A lit server rack of stacked trays with orange fronts, standing beside darkened racks strung with blue cables, against a black background.Image: Amazon
Amazon's image of its Trainium3SR system, from the announcement of 1 December. source · The company's own image of its product, used to report on it

Key points

  1. In prefill the model reads the entire prompt and builds a working memory of the conversation; in decode it generates the response one token at a time, Amazon says.
  2. DistServe researchers write that prefill tends to be limited by computing power for longer prompts, while decode is limited by the GPU's memory bandwidth.
  3. In the authors' evaluation, DistServe can serve 7.4 times more requests than state-of-the-art systems, staying within latency limits for more than 90% of requests.

What happened

Amazon's new Trainium3SR puts two different chips to work on one answer: its Trainium3 chip reads your prompt, and a second chip writes the reply. Amazon announced the system on 1 December, available in limited preview.

The reading step is called prefill: the model takes in the whole prompt and builds a working memory of the conversation. The writing step is called decode, and it produces the answer one token, a small piece of text, at a time.

They strain a chip in different ways. Prefill is mostly limited by computing power, because the prompt's tokens are processed together. Decode handles one new token per step but still has to move about as much data, so it is limited by how fast the chip can read from memory, researchers reported in the DistServe paper.

Amazon puts it plainly: for every new token, the chip has to read all of the model's weights from memory. Its answer is a chip built around SRAM, memory on the chip itself, which Amazon says largely removes that bottleneck.

The same split matters when both jobs share ordinary graphics chips (GPUs). The DistServe authors found that a long prompt arriving mid-answer slows the replies already being written, and writing slows the reading too. Their two measures are the wait for the first token and the average time for each one after it.

Their fix was to give each job its own GPUs. The prefill side then hands the working memory, called the KV cache, to the decode side, and that handover costs something: one 512-token request on a 66-billion-parameter model made about 1.13 GB of it.

The paper's summary says their system, DistServe, can serve 7.4 times more requests than state-of-the-art systems while staying within response-time limits for more than 90% of requests. The paper dates from 2024 and tested the OPT family of models on Nvidia A100 chips.

AWS had already announced the same idea with another company: in March it said Trainium would handle prefill and Cerebras's CS-3 system decode. On Trainium3SR, Amazon says its Ergo model writes up to 2,200 output tokens per second, against more than 400 on Trainium3 alone. That is Amazon's figure for its own model.

Splitting is not free speed everywhere. The documentation for vLLM, a library for running and serving models, says plainly that separating prefill does not improve throughput; it lists separate tuning of the two delays and steadier waits between tokens as the reasons to do it.

What to check: when a provider quotes speed, ask whether it is the wait before the first word or the rate of words after it.

What it means for you

Our view

For anyone buying or running a model, the useful habit is to treat speed as two measures: the wait before the first token and the time for each token after it. A long document with a short reply leans on the first job, and a short question with a long reply leans on the second.

The research result comes from the authors' own test setup, and vLLM's documentation warns that separating prefill does not improve throughput, so a split design is no guarantee of more capacity. Run your own test with one long prompt and one long answer, and record both measures for each provider you compare.

It adds no new facts.

Share this story

Your reaction

We count reactions per story and day, never who reacted. The counts help us choose what goes in the monthly issue. If you are signed in, your own page shows yours too.

Check our sources

Every sentence above is checked against these 6 sources.

1 Amazon unveils Trainium3SR, a faster AI inference chip, plus new Trainium, Graviton, and Nitro advancementsAmazon · 1 Dec 2026 · 6 facts Open the source archived copy
  1. Amazon introduced Trainium3SR on 1 December 2026, a system that pairs Trainium3 with a new SRAM-based chip; Trainium3 handles prefill and the new chip takes over the decode step.

    It is introducing Trainium3SR, a new system that pairs Trainium3 with a new SRAM-based chip to make AI inference faster and more power efficient. ... Trainium3 handles prefill, and the new chip takes over the decode step
    cite
  2. Amazon says Trainium3SR is available today in limited preview, with more capacity to be added over the next few months.

    Trainium3SR is available today in limited preview, with more capacity to be added over the next few months.
    cite
  3. Amazon says the first phase of a model's answer is called prefill, where the model reads the entire prompt and builds a working memory of the conversation, and the second is decode, where it generates the response one token at a time.

    The first phase is called prefill, where the model reads your entire prompt and builds a working memory of the conversation. ... The second phase is called decode, where the model generates its response one token at a time.
    cite
  4. Amazon says that in decode, for every new token generated, the chip has to read all of the model's weights from memory, so speed depends on how fast data can move, and that data movement is the bottleneck.

    Decode is different: for every new token that's generated, the chip has to read all of the model's weights from memory, so its speed depends on how fast you can move data. That data movement is the bottleneck.
    cite
  5. Amazon says on-chip memory, static random-access memory (SRAM), largely removes that bottleneck, and that it built Trainium3SR with a specialized SRAM-based chip.

    On-chip memory, called static random-access memory (SRAM), largely removes that bottleneck. That's why we built Trainium3SR: a new system with a specialized SRAM-based chip that works alongside Trainium3.
    cite
  6. Amazon says its Ergo model runs at more than 400 output tokens per second on Trainium3 alone and up to 2,200 output tokens per second on Trainium3 and Trainium3SR together.

    On Trainium3 alone, it runs at more than 400 output tokens per second ... On Trainium3 and Trainium3SR together, Ergo reaches up to 2,200 output tokens per second
    cite
2 DistServe, full text (v3)arXiv · 6 Jun 2024 · 5 facts Open the source archived copy
  1. The DistServe authors write that a prefill step processes a new sequence's tokens concurrently and tends to be compute-bound for prompts that are not brief.

    The prefill step deals with a new sequence, often comprising many tokens, and processes these tokens concurrently. ... When dealing with user prompts that are not brief, the prefill step tends to be compute-bound.
    cite
  2. The DistServe authors write that a decoding step processes only one new token yet incurs a similar level of I/O to the prefill phase, making it constrained by the GPU's memory bandwidth.

    In contrast, despite processing only one new token per step, the decoding phase incurs a similar level of I/O to the prefill phase, making it constrained by the GPU's memory bandwidth.
    cite
  3. The DistServe authors report that batching a prefill job with decoding jobs slows both: decoding tasks wait for lengthier prefill jobs, extending time per output token, and adding decoding jobs increases the time to complete the prefill.

    Specifically, the decoding tasks in the batch must wait for lengthier prefill jobs to complete, thus extending TPOT ... Adding decoding jobs to prefill also increases the time to complete the prefill task, particularly when the GPU is already at capacity
    cite
  4. The DistServe authors write that the prefill instance sends the intermediate results, mainly KV caches, to a decoding instance, and that the KV cache of a single 512-token request on OPT-66B is about 1.13 GB.

    Transferring KV caches from prefill to decoding instances incurs notable overheads. For example, the KV cache size of a single 512-token request on OPT-66B is approximately 1.13GB.
    cite
  5. DistServe's authors evaluated it on OPT models, on a cluster of 4 nodes with 32 NVIDIA A100-80GB GPUs.

    We deploy DistServe on a cluster with 4 nodes and 32 GPUs. Each node has 8 NVIDIA SXM A100-80GB GPUs connected with NVLINK. ... (a) OPT-13B (b) OPT-66B (C) OPT-175B
    cite
3 DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model ServingarXiv · 18 Jan 2024 · 3 facts Open the source archived copy
  1. The DistServe paper measures latency as time to first token (TTFT) for the prefill phase and time per output token (TPOT) for the decoding phase.

    time to first token (TTFT) for the prefill phase and time per output token (TPOT) of each request for the decoding phase
    cite
  2. DistServe, a paper by Yinmin Zhong and seven co-authors first submitted in January 2024 and presented at OSDI 2024, assigns prefill and decoding computation to different GPUs, removing interference between them.

    [Submitted on 18 Jan 2024 (v1), last revised 6 Jun 2024 (this version, v3)] ... Authors: Yinmin Zhong, Shengyu Liu, Junda Chen, Jianbo Hu, Yibo Zhu, Xuanzhe Liu, Xin Jin, Hao Zhang ... DistServe assigns prefill and decoding computation to different GPUs, hence eliminating prefill-decoding interferences. ... Comments: OSDI 2024
    cite
  3. The DistServe abstract says it can serve 7.4x more requests or meet 12.6x tighter service targets than state-of-the-art systems, while staying within latency constraints for more than 90% of requests.

    DistServe can serve 7.4x more requests or 12.6x tighter SLO, compared to state-of-the-art systems, while staying within latency constraints for > 90% of requests.
    cite
4 AWS and Cerebras collaboration for disaggregated AI inferenceAmazon · 13 Mar 2026 · 1 fact Open the source archived copy
  1. AWS and Cerebras Systems announced on 13 March 2026 a collaboration on Amazon Bedrock with AWS Trainium optimized for prefill and the Cerebras CS-3 optimized for decode.

    cite
5 Disaggregated Prefilling (experimental)vLLM · 1 fact Open the source archived copy
  1. vLLM's documentation for disaggregated prefilling, marked experimental, gives two reasons for it, tuning time-to-first-token and inter-token latency separately and controlling tail inter-token latency, and notes: "Disaggregated prefill DOES NOT improve throughput."

    cite
6 vLLM documentationvLLM · 1 fact Open the source archived copy
  1. vLLM's documentation describes vLLM as a fast and easy-to-use library for LLM inference and serving.

    cite

Topics

The morning email

On the mornings we publish: the three top stories and up to four short ones. Free.

We email you a link to confirm. An issue may include one sponsor, always labelled Sponsored · Advertisement. Our emails count opens and clicks, not who made them. Unsubscribe in one click. What we keep