fix bug when eos_ids==0 (#8315)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user