From bfb118c01e38fb7865742dcd9cf9075270283e9e Mon Sep 17 00:00:00 2001 From: Minho Ryu Date: Thu, 24 Jul 2025 15:18:47 +0900 Subject: [PATCH] fix bug when eos_ids==0 (#8315) --- python/sglang/srt/configs/model_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/configs/model_config.py b/python/sglang/srt/configs/model_config.py index 84c96d91d..cea455a24 100644 --- a/python/sglang/srt/configs/model_config.py +++ b/python/sglang/srt/configs/model_config.py @@ -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: