Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
dd1a50a8
Unverified
Commit
dd1a50a8
authored
May 01, 2024
by
Li, Jiang
Committed by
GitHub
Apr 30, 2024
Browse files
[Bugfix][Minor] Make ignore_eos effective (#4468)
parent
715c2d85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
vllm/sampling_params.py
vllm/sampling_params.py
+2
-1
No files found.
vllm/sampling_params.py
View file @
dd1a50a8
...
@@ -275,7 +275,8 @@ class SamplingParams:
...
@@ -275,7 +275,8 @@ class SamplingParams:
self
,
generation_config
:
Dict
[
str
,
Any
])
->
None
:
self
,
generation_config
:
Dict
[
str
,
Any
])
->
None
:
"""Update if there are non-default values from generation_config"""
"""Update if there are non-default values from generation_config"""
# Update eos_token_id for generation
# 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
# it can be either int or list of int
if
isinstance
(
eos_ids
,
int
):
if
isinstance
(
eos_ids
,
int
):
eos_ids
=
[
eos_ids
]
eos_ids
=
[
eos_ids
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment