prefill

Prefill is the stage in which a large language model processes the entire input prompt at once before it starts generating a response.

5 articlesLast mentioned

During prefill, the model computes all prompt tokens in parallel and builds the KV cache used for later generation. Unlike the following decode stage, which produces tokens one at a time, prefill is compute-heavy and depends largely on processing power. Its speed is usually expressed in tokens processed per second.

This entry is based on AIPOST articles and widely known facts. If something is wrong, please send us a correction request.

Articles covering this entry

  • Gyro-M vs. Gyro-S on a 16GB GPU: Higher Scores, Similar Coding ResultsAI Performance ·

    Speed: prefill and decode

    Read article
  • Temperature, Attention and Context Rot: Model Mechanics Behind Agent DesignAI in Practice ·

    In prefill, all prompt tokens pass through the model at once, with dense matrix multiplications of high arithmetic intensity; under the Roofline performance mod…

    Read article
  • ShapeLearn Qwen3.8-27B on a 16GB GPU: Agent Tests Pass 4 of 5 at 128k ContextAI Performance ·

    One limit of that card surfaced during setup: raising the prefill batch size failed for lack of memory headroom.

    Read article
  • DeepSeek Opens DeepInfer Serving Engine Alongside MIT-Licensed V4.1-FlashAI News ·

    DeepSeek's own benchmark setup dedicated 4 GPUs to prefill (processing the prompt) and 64 GPUs to decode (generating tokens).

    Read article
  • 2-bit Qwen 27B on a 16GB GPU: Strong at Apps and Games, Weaker in 3DAI Performance ·

    Uncached prefill 235.1 tokens per second at 512 tokens, 295.1 at 8k, 271.2 at 32k

    Read article

Found a mistake or missing an entry?

Wiki entries are based on AIPOST articles and widely known facts. If an entry is wrong, send us a correction request and we will check and fix it. Names from new articles are added to the wiki after the article is published.