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
4059adc3
Unverified
Commit
4059adc3
authored
Mar 13, 2025
by
Nick Hill
Committed by
GitHub
Mar 14, 2025
Browse files
[Misc][Minor] Simplify `SamplingParams.__post_init__()` (#14772)
Signed-off-by:
Nick Hill
<
nhill@redhat.com
>
parent
f1f632d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
vllm/sampling_params.py
vllm/sampling_params.py
+5
-11
No files found.
vllm/sampling_params.py
View file @
4059adc3
...
...
@@ -338,29 +338,23 @@ class SamplingParams(
if
self
.
seed
==
-
1
:
self
.
seed
=
None
else
:
self
.
seed
=
self
.
seed
if
self
.
stop
is
None
:
self
.
stop
=
[]
elif
isinstance
(
self
.
stop
,
str
):
self
.
stop
=
[
self
.
stop
]
else
:
self
.
stop
=
list
(
self
.
stop
)
if
self
.
stop_token_ids
is
None
:
self
.
stop_token_ids
=
[]
else
:
self
.
stop_token_ids
=
list
(
self
.
stop_token_ids
)
if
self
.
bad_words
is
None
:
self
.
bad_words
=
[]
else
:
self
.
bad_words
=
list
(
self
.
bad_words
)
self
.
logprobs
=
1
if
self
.
logprobs
is
True
else
self
.
logprobs
self
.
prompt_logprobs
=
(
1
if
self
.
prompt_logprobs
is
True
else
self
.
prompt_logprobs
)
if
self
.
logprobs
is
True
:
self
.
logprobs
=
1
if
self
.
prompt_logprobs
is
True
:
self
.
prompt_logprobs
=
1
# Number of characters to hold back for stop string evaluation
# until sequence is finished.
...
...
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