feat(metrics): read what vLLM already knows, instead of inferring it #12
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/vllm-metrics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Inference on the Tenstorrent host runs vllm + the tt-metal plugin, and that
endpoint publishes far more than the harness was reading. Four things vLLM
already knew and we were either estimating or calling unknown.
Everything below is verified against a live scrape from cfx-llm2 (two p150a,
Qwen3.8-27B-FP8), committed unedited as the test fixture.
1. Queueing has a stated reason
vllm:num_requests_waiting_by_reasonsplits intocapacityanddeferred.They are indistinguishable from the client and mean opposite things: capacity
is the level being past what the pool holds at once, so added load is becoming
queue instead of throughput. That is precisely the ceiling this sweep exists to
find, and it is now read rather than inferred from a bend in a curve. Measured
mid-run:
{capacity: 2.0, deferred: 0.0}. The report prints it above thenumbers.
2. Computed prefill is published
vllm:request_prefill_kv_computed_tokensis the KV actually pushed throughattention — the quantity our nominal/computed bracket estimates from outside.
Over
vllm:request_prefill_time_seconds, both histograms over completedrequests and therefore the same population: 802,418 tokens / 294.7 s ≈ 2,723
tok/s per prefilling stream.
Recorded explicitly as per-stream, not aggregate: concurrent prefill spans
overlap, so the summed time exceeds the wall time the box spent prefilling.
For the same reason these are not aliased onto llama.cpp's
prompt_seconds,which is wall time — that would silently understate a concurrent engine.
3. A zero cached fraction is no longer an unknown
vllm:cache_config_infocarriesenable_prefix_caching="False"on thisdeployment. Nothing could have been served from a prefix cache, so the nominal
prefill rate is the computed one. Reporting "cached fraction unknown" there
understated what the engine had already told us.
4. A FLOPs counter of zero is not zero work
The plugin publishes
vllm:estimated_flops_per_gpu_totaland leaves it at0.0. Dividing that by the joules #10/#11 now measure would report anaccelerator that did no floating-point work. It is recorded as unimplemented
and withheld from the efficiency figures.
Fixture
An unedited
/metricsscrape from that host, so a plugin or vLLM upgrade thatrenames a series fails here rather than quietly reducing the harness to
client-side estimates. It also confirms the KV pool reader against real output:
16,392 blocks × 64 = 1,049,088 tokens.
8 new tests, 309 total.
nix flake checkgreen.🤖 Generated with Claude Code