A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 2, 09:45 UTC
[Metrics] Exclude KV transfer tokens from iteration_tokens_total (#43346)
Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tyler Michael Smith committed
May 29, 2026 at 15:56 UTC
38b864d81d8bc42d6d7d892a0931f4c4c2517735
1 file changed
+2
-1
vllm/v1/metrics/loggers.py
+2
-1
@@ -1161,7 +1161,8 @@ class PrometheusStatLogger(AggregateStatLoggerBase):
1161
iteration_stats.num_generation_tokens
1162
)
1163
self.histogram_iteration_tokens[engine_idx].observe(
1164
- iteration_stats.num_prompt_tokens + iteration_stats.num_generation_tokens
1164
+ iteration_stats.prompt_token_stats.computed
1165
+ + iteration_stats.num_generation_tokens
1166
)
1167
1168
for max_gen_tokens in iteration_stats.max_num_generation_tokens_iter: