[KongchangAI]
ConceptPrefilling / 预填充阶段

Prefill

One of the two main phases of large language model inference, responsible for simultaneously computing attention across all tokens in the input prompt. Computational cost scales quadratically with sequence length, making this a compute-intensive operation.

Core Facts

Timeline (last 90 days)

Oct 29

The original configuration's prefill speed was below 200 tokens/second, partly because the micro-batch size was set to 128; after raising the micro-batch to 1024 and moving some expert layers back to the GPU, prefill speed increased to about 800 tokens/second.

Unverified50%
Oct 27

Prefilling refers to when, in using a large language model API, the caller pre-provides a piece of text (or token sequence) for the model to continue generating from, rather than starting from an empty context.

Unverified50%
Oct 27

Prefilling refers to pre-filling the beginning of the assistant's reply in a conversation to guide the model to continue in a particular direction.

Unverified50%
Oct 27

Without prefilling, this abnormal behavior is rare, but it can be reliably reproduced with a specific prompt combined with prefilling.

Unverified50%
Oct 23

The prefill stage is compute-intensive and the decode stage is memory-intensive, and running them together causes mutual interference, leading to latency jitter and wasted resources.

Unverified50%
Oct 21

Prefill is the first stage of large language model inference, in which the model reads the entire prompt entered by the user in one pass and computes key-value vectors for each token and stores them in VRAM.

Unverified50%
Oct 20

Prompt caching can reuse computation results for long contexts that recur, significantly reducing duplicate billing.

Unverified50%
Oct 19

When prefill and decode run on the same engine, a long prompt arriving mid-flight causes every sequence in the decode batch to experience an ITL spike whose duration roughly equals the time taken by that prefill step.

Unverified50%
Oct 14

A machine without a dedicated GPU cannot ingest large prompts in a reasonable time, so a second host with a GPU is needed to solve the prefill problem.

Unverified50%
Oct 12

When multiple models show anomalies at the same time, it is more likely that the routing, scheduling, authentication, or rate-limiting components they share experienced fluctuations, rather than that a single model's weights or inference logic failed individually.

Unverified50%

4 more timeline events

All Facts (16)

Verified

Time to First Token (TTFT) refers to the time interval between a user sending a request and the model outputting the first token, and is primarily constrained by the duration of the prefill stage.

90%
Verified

The KV Cache mechanism can cache repeated prefix content, and the more concise the system prompt, the higher the cache hit rate.

80%
Partially Verified

LLM 推理分为预填充阶段(Prefill,计算密集型)和解码阶段(Decode,内存带宽密集型)两个阶段

65%
Unverified

The original configuration's prefill speed was below 200 tokens/second, partly because the micro-batch size was set to 128; after raising the micro-batch to 1024 and moving some expert layers back to the GPU, prefill speed increased to about 800 tokens/second.

50%
Unverified

Prefilling refers to when, in using a large language model API, the caller pre-provides a piece of text (or token sequence) for the model to continue generating from, rather than starting from an empty context.

50%
Unverified

Prefilling refers to pre-filling the beginning of the assistant's reply in a conversation to guide the model to continue in a particular direction.

50%
Unverified

Without prefilling, this abnormal behavior is rare, but it can be reliably reproduced with a specific prompt combined with prefilling.

50%
Unverified

The prefill stage is compute-intensive and the decode stage is memory-intensive, and running them together causes mutual interference, leading to latency jitter and wasted resources.

50%
Unverified

Prefill is the first stage of large language model inference, in which the model reads the entire prompt entered by the user in one pass and computes key-value vectors for each token and stores them in VRAM.

50%
Unverified

Prompt caching can reuse computation results for long contexts that recur, significantly reducing duplicate billing.

50%
Unverified

When prefill and decode run on the same engine, a long prompt arriving mid-flight causes every sequence in the decode batch to experience an ITL spike whose duration roughly equals the time taken by that prefill step.

50%
Unverified

A machine without a dedicated GPU cannot ingest large prompts in a reasonable time, so a second host with a GPU is needed to solve the prefill problem.

50%
Unverified

When multiple models show anomalies at the same time, it is more likely that the routing, scheduling, authentication, or rate-limiting components they share experienced fluctuations, rather than that a single model's weights or inference logic failed individually.

50%
Unverified

Prefill is a compute-intensive operation where computation grows quadratically with sequence length; decoding is a memory-bandwidth-intensive operation that can reuse the KV Cache.

50%
Unverified

The prefill stage is a compute-intensive operation primarily limited by GPU compute, while the decode stage is a memory-bandwidth-intensive operation primarily limited by VRAM bandwidth.

50%
Unverified

LLM inference requests are divided into two phases—Prefill (input) and Decode (output); Prefill can read inputs in parallel with extremely high throughput, while Decode requires token-by-token serial inference and occupies significantly more GPU time.

50%

Source Articles