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
7b261092
Unverified
Commit
7b261092
authored
Aug 07, 2024
by
Atilla Akkuş
Committed by
GitHub
Aug 07, 2024
Browse files
[BUGFIX]: top_k is expected to be an integer. (#7227)
parent
2385c8f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
vllm/sampling_params.py
vllm/sampling_params.py
+3
-0
No files found.
vllm/sampling_params.py
View file @
7b261092
...
...
@@ -224,6 +224,9 @@ class SamplingParams:
if
self
.
top_k
<
-
1
or
self
.
top_k
==
0
:
raise
ValueError
(
f
"top_k must be -1 (disable), or at least 1, "
f
"got
{
self
.
top_k
}
."
)
if
not
isinstance
(
self
.
top_k
,
int
):
raise
TypeError
(
f
"top_k must be an integer, got
{
type
(
self
.
top_k
).
__name__
}
"
)
if
not
0.0
<=
self
.
min_p
<=
1.0
:
raise
ValueError
(
"min_p must be in [0, 1], got "
f
"
{
self
.
min_p
}
."
)
...
...
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