fix bug when eos_ids==0 (#8315)

This commit is contained in:
Minho Ryu
2025-07-23 23:18:47 -07:00
committed by GitHub
parent f6e07f2796
commit bfb118c01e
+1 -1
View File
@@ -475,7 +475,7 @@ class ModelConfig:
def get_hf_eos_token_id(self) -> Optional[Set[int]]:
eos_ids = getattr(self.hf_config, "eos_token_id", None)
if eos_ids:
if eos_ids is not None:
# it can be either int or list of int
eos_ids = {eos_ids} if isinstance(eos_ids, int) else set(eos_ids)
if eos_ids is None: