mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-23 11:46:14 +08:00
[Bugfix][Minor] Make ignore_eos effective (#4468)
This commit is contained in:
parent
715c2d854d
commit
dd1a50a8bc
@ -275,7 +275,8 @@ class SamplingParams:
|
||||
self, generation_config: Dict[str, Any]) -> None:
|
||||
"""Update if there are non-default values from generation_config"""
|
||||
# Update eos_token_id for generation
|
||||
if eos_ids := generation_config.get("eos_token_id"):
|
||||
if (not self.ignore_eos) and (eos_ids :=
|
||||
generation_config.get("eos_token_id")):
|
||||
# it can be either int or list of int
|
||||
if isinstance(eos_ids, int):
|
||||
eos_ids = [eos_ids]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user