fix sampling_seed handling when deterministic is enabled (#11096)

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi Z
2025-10-03 23:41:46 -04:00
committed by GitHub
parent c70e58e837
commit d01b921482
2 changed files with 13 additions and 3 deletions

View File

@@ -142,6 +142,9 @@ class SamplingParams:
f"logit_bias must has keys in [0, {vocab_size - 1}], got "
f"{token_id}."
)
if self.sampling_seed is None:
raise ValueError("sampling_seed should not be None")
grammars = [
self.json_schema,
self.regex,