[Core] Support min_tokens with speculative decoding (#32642)

Signed-off-by: qianlihuang <yiliu.dong@qq.com>
Co-authored-by: qianlihuang <yiliu.dong@qq.com>
This commit is contained in:
Yiliu Dong
2026-02-27 01:31:28 +08:00
committed by GitHub
parent 99c7892c5b
commit d940607629
7 changed files with 75 additions and 11 deletions

View File

@@ -678,9 +678,9 @@ class SamplingParams(
return
# Some sampling parameters are not yet compatible with spec decoding.
if self.min_tokens > 1 or self.min_p > _SAMPLING_EPS or self.logit_bias:
if self.min_p > _SAMPLING_EPS or self.logit_bias:
raise ValueError(
"The min_tokens, min_p, and logit_bias sampling parameters "
"The min_p and logit_bias sampling parameters "
"are not yet supported with speculative decoding."
)