[Spec] Fix ngram metric off-by-1 in num_accepted_drafts_per_req_cpu (#24965)
This commit is contained in:
@@ -328,8 +328,9 @@ class NGRAMWorker:
|
|||||||
)
|
)
|
||||||
req.time_stats.set_spec_verify_end_time(accepted_tokens=accepted)
|
req.time_stats.set_spec_verify_end_time(accepted_tokens=accepted)
|
||||||
|
|
||||||
# Store accept_lens for per-request metrics
|
# Store accept_lens (with bonus) for per-request metrics; downstream
|
||||||
accept_lens = verify_input.num_accepted_drafts
|
# subtracts 1 to recover drafts-only counts.
|
||||||
|
accept_lens = verify_input.num_accepted_tokens
|
||||||
if batch.return_logprob:
|
if batch.return_logprob:
|
||||||
add_output_logprobs_for_spec_v1(batch, verify_input, logits_output)
|
add_output_logprobs_for_spec_v1(batch, verify_input, logits_output)
|
||||||
self._update_ngram_corpus(batch)
|
self._update_ngram_corpus(batch)
|
||||||
|
|||||||
Reference in New Issue
Block a user