Canonical: https://weaveos.com/glossary/prefill-phase

[Home](https://weaveos.com/)/[Glossary](https://weaveos.com/glossary)/[Inference performance](https://weaveos.com/glossary/category/inference-performance)/Prefill phase

[Inference performance](https://weaveos.com/glossary/category/inference-performance)

# Prefill phase

Also known as Prefill phase, AI Prefill phase

By WeavePublished September 10, 20261 min read

## Definition

Prefill phase is the serving concept concerned with prefill phase during AI inference.

On this page

1. [Definition](https://weaveos.com/glossary/prefill-phase#definition)
2. [What prefill phase means](https://weaveos.com/glossary/prefill-phase#article-what-prefill-phase-means)
3. [How it appears in a workload](https://weaveos.com/glossary/prefill-phase#article-how-it-appears-in-a-workload)
4. [Limitations and tradeoffs](https://weaveos.com/glossary/prefill-phase#article-limitations-and-tradeoffs)
5. [The result depends on prompt shape, output length, concurrency, batching, and hardware. Use it with p50 and tail latency, useful token throughput, errors, memory pressure, and cost. The best configuration is the one that meets the application's reliability and responsiveness requirements under representative traffic.](https://weaveos.com/glossary/prefill-phase#article-the-result-depends-on-prompt-shape-output-length-concurrency-batching-and-hardware-use-it-with-p50-and-tail-latency-useful-token-throughput-errors-memory-pressure-and-cost-the-best-configuration-is-the-one-that-meets-the-application-s-reliability-and-responsiveness-requirements-under-representative-traffic)
6. [How this relates to Weave](https://weaveos.com/glossary/prefill-phase#weave)
7. [Sources](https://weaveos.com/glossary/prefill-phase#sources)
8. [Related terms](https://weaveos.com/glossary/prefill-phase#related)

## What prefill phase means

Prefill phase is the serving concept concerned with prefill phase during AI inference. In a serving system, define the measurement boundary before collecting data. State whether the worker is warm, which model and precision are active, how batching is configured, and whether the request is streamed. These details determine whether two similar measurements describe the same operating condition.

## How it appears in a workload

An interactive coding request can record prefill phase together with prompt size, output size, route, and timestamps. Record relevant timestamps and runtime signals with the request rather than relying on one dashboard aggregate. A useful comparison includes request mix, arrival pattern, concurrency, and output limits. For routed traffic, retain the selected route so a change can be investigated rather than attributed to prefill phase without evidence.

## Limitations and tradeoffs

## The result depends on prompt shape, output length, concurrency, batching, and hardware. Use it with p50 and tail latency, useful token throughput, errors, memory pressure, and cost. The best configuration is the one that meets the application's reliability and responsiveness requirements under representative traffic.

## How this relates to Weave

Weave Router comparisons can record prefill phase beside model, provider, workload, and request outcome. That context helps explain whether a routing change altered prefill phase, but Weave does not make an inference runtime faster by itself. Keep serving conditions visible when using these observations to compare complete AI tasks.

[Explore Router](https://weaveos.com/products/router)

## Sources and further reading

1. [vLLM serving metrics documentation](https://docs.vllm.ai/en/latest/serving/metrics.html)

## Related terms

### [LLM inference](https://weaveos.com/glossary/llm-inference)

[Understand LLM inference, how a trained model generates a response, and why input length and output length affect serving costs.](https://weaveos.com/glossary/llm-inference)

### [Inference throughput](https://weaveos.com/glossary/inference-throughput)

[How inference throughput measures model serving capacity, how tokens per second differs from request throughput, and why workload shape matters.](https://weaveos.com/glossary/inference-throughput)

### [Time to first token](https://weaveos.com/glossary/time-to-first-token)

[What time to first token measures in streaming AI responses and why it matters for user experience and routing.](https://weaveos.com/glossary/time-to-first-token)
