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

This commit is contained in:
Scott Lee
2025-10-13 11:24:27 -07:00
committed by GitHub
parent f4aa78801e
commit b6fb5d7666
9 changed files with 70 additions and 1 deletions

View File

@@ -823,6 +823,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]
@@ -896,6 +897,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]