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
656fd729
Unverified
Commit
656fd729
authored
Apr 01, 2025
by
shangmingc
Committed by
GitHub
Apr 01, 2025
Browse files
[Misc] Fix speculative config repr string (#15860)
Signed-off-by:
Shangming Cai
<
caishangming@linux.alibaba.com
>
parent
79455cf4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
vllm/config.py
vllm/config.py
+3
-5
No files found.
vllm/config.py
View file @
656fd729
...
@@ -2359,12 +2359,10 @@ class SpeculativeConfig:
...
@@ -2359,12 +2359,10 @@ class SpeculativeConfig:
return
self
.
num_speculative_tokens
return
self
.
num_speculative_tokens
def
__repr__
(
self
)
->
str
:
def
__repr__
(
self
)
->
str
:
if
self
.
prompt_lookup_max
is
not
None
and
self
.
prompt_lookup_max
>
0
:
method
=
self
.
method
draft_model
=
"ngram"
model
=
None
if
method
==
"ngram"
else
self
.
draft_model_config
.
model
else
:
draft_model
=
self
.
draft_model_config
.
model
num_spec_tokens
=
self
.
num_speculative_tokens
num_spec_tokens
=
self
.
num_speculative_tokens
return
f
"SpeculativeConfig(
{
draft_
model
=
}
,
{
num_spec_tokens
=
}
)"
return
f
"SpeculativeConfig(
{
method
=
}
,
{
model
=
}
,
{
num_spec_tokens
=
}
)"
@
dataclass
@
dataclass
...
...
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