Add metrics for speculative decoding (acceptance rate, average acceptance length) (#11144)

This commit is contained in:
Scott Lee
2025-10-10 00:46:44 -07:00
committed by GitHub
parent f19613e6c3
commit 0babd48736
9 changed files with 74 additions and 1 deletions

View File

@@ -816,6 +816,7 @@ class BatchTokenIDOutput(BaseBatchReq):
completion_tokens: List[int]
cached_tokens: List[int]
spec_verify_ct: List[int]
spec_accepted_tokens: List[int]
# Logprobs
input_token_logprobs_val: List[float]
@@ -882,6 +883,7 @@ class BatchStrOutput(BaseBatchReq):
completion_tokens: List[int]
cached_tokens: List[int]
spec_verify_ct: List[int]
spec_accepted_tokens: List[int]
# Logprobs
input_token_logprobs_val: List[float]