server: Adding spec-decode counters to /metrics endpoint - #26389
Conversation
|
@gaugarg-nv , can you help review? |
gaugarg-nv
left a comment
There was a problem hiding this comment.
Does this change work fine with tools like AIPerf those use \metrics endpoint?
| | `llamacpp:spec_decode_num_draft_tokens` | Counter | Total draft tokens generated (0 when spec-decode is off). | | ||
| | `llamacpp:spec_decode_num_accepted_tokens` | Counter | Total draft tokens accepted by the target model (0 when spec-decode is off). | | ||
| | `llamacpp:spec_decode_num_drafts` | Counter | Total speculative decoding verification steps (0 when spec-decode is off). | | ||
| | `llamacpp:spec_decode_num_accepted_tokens_per_pos` | Counter | Accepted tokens per draft position (labeled `position="N"`; absent when spec-decode is off or before the first completed speculative request). | | ||
|
|
There was a problem hiding this comment.
vLLM adds a _total suffix, I guess we should do the same: https://github.com/vllm-project/vllm/blob/62195e9784ebec1ece42b88a861734e0702cc2d5/vllm/v1/spec_decode/metrics.py#L177-L196
|
@ggerganov, I have filed an issue #26516 for this request, can you please take a look? |
ggerganov
left a comment
There was a problem hiding this comment.
@ruixiang63 @ngxson PTAL too
|
Should we add |
It can be derived from existing counters as |
Overview
Adds speculative decoding counters to the
/metrics(Prometheus) endpoint, matching the vLLM counter schema:llamacpp:spec_decode_num_draft_tokensllamacpp:spec_decode_num_accepted_tokensllamacpp:spec_decode_num_draftsllamacpp:spec_decode_num_accepted_tokens_per_pos{position="N"}— per-draft-position labeled counter; absent beforethe first completed speculative request
Requirements