vllm:prompt_tokens_cached
Counter for cached prompt tokens, local plus external.
Summary
In vLLM v0.23.0, under V1 metrics published by the PrometheusStatLogger, vllm:prompt_tokens_cached is registered as a Prometheus counter. In that same v0.23.0 PrometheusStatLogger/V1 metrics context, the metric is registered with the label names model_name and engine. For v0.23.0 with the PrometheusStatLogger under V1 metrics, vllm:prompt_tokens_cached counts cached prompt tokens reused during processing, combining both local and external sources. Mechanically, in v0.23.0 (PrometheusStatLogger, V1 metrics) the counter increments from the per-iteration PromptTokenStats.cached_tokens field. Interpretively, for v0.23.0 under the PrometheusStatLogger with V1 metrics, this metric represents aggregate saved prompt-token work and is not by itself a per-request cache-hit percentage. As guidance in v0.23.0 (PrometheusStatLogger, V1 metrics), compare the metric's rate against prompt-token demand using matching labels and time windows, and separate local from external attribution when that distinction is needed.
Version history
- The only version covered here is
v0.23.0, wherevllm:prompt_tokens_cachedis registered as a Prometheus counter with the label namesmodel_nameandengineunderthePrometheusStatLoggerV1metricspublisher. - In
v0.23.0it counts cached prompt tokens reused during processing, combining local and external sources. - In
v0.23.0the counter increments from the per-iterationPromptTokenStats.cached_tokensfield. - In
v0.23.0it represents aggregate saved prompt-token work and is not by itself a per-request cache-hit percentage. - For
v0.23.0, the guidance is to compare its rate with prompt-token demand under matching labels and windows, separating local and external attribution when required.
Identity
- Prometheus type
- counter
- Labels
- model_nameengine
- Unit
- Not recorded — vLLM registration code has no structured unit field, and units are not inferred from name suffixes
Semantic coverage
Metric knowledge (6)
| Claim | Semantic layer | Verified |
|---|---|---|
In vLLM v0.23.0, vllm:prompt_tokens_cached counts cached prompt tokens reused during processing, combining local and external sources. | Measurement semantics | Sep 29 |
In vLLM v0.23.0, vllm:prompt_tokens_cached increments from the iteration PromptTokenStats.cached_tokens field. | Causal/runtime semantics | Sep 29 |
In vLLM v0.23.0, vllm:prompt_tokens_cached is aggregate saved prompt-token work and is not by itself a per-request cache-hit percentage. | Interpretation & composition | Sep 29 |
In vLLM v0.23.0, vllm:prompt_tokens_cached compare its rate with prompt-token demand under matching labels and windows; separate local/external attribution when required. | Guarded guidance | Sep 29 |
In vLLM v0.23.0, vllm:prompt_tokens_cached is registered as a Prometheus counter. | Structural identity | Sep 29 |
In vLLM v0.23.0, vllm:prompt_tokens_cached is registered with the label names model_name, engine. | Structural identity | Sep 29 |
Related Use Cases (1)
Availability
vllm:prompt_tokens_cached is registered as a Prometheus counter in vLLM v0.23.0.