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
513f0747
Unverified
Commit
513f0747
authored
Apr 25, 2025
by
Woosuk Kwon
Committed by
GitHub
Apr 25, 2025
Browse files
[CI/test] Fix Eagle Correctness Test (#17209)
Signed-off-by:
Woosuk Kwon
<
woosuk.kwon@berkeley.edu
>
parent
b07bf83c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
tests/v1/e2e/test_spec_decode.py
tests/v1/e2e/test_spec_decode.py
+2
-2
vllm/config.py
vllm/config.py
+3
-2
No files found.
tests/v1/e2e/test_spec_decode.py
View file @
513f0747
...
@@ -148,7 +148,7 @@ def test_eagle_correctness(
...
@@ -148,7 +148,7 @@ def test_eagle_correctness(
print
(
f
"ref_output:
{
ref_output
.
outputs
[
0
].
text
}
"
)
print
(
f
"ref_output:
{
ref_output
.
outputs
[
0
].
text
}
"
)
print
(
f
"spec_output:
{
spec_output
.
outputs
[
0
].
text
}
"
)
print
(
f
"spec_output:
{
spec_output
.
outputs
[
0
].
text
}
"
)
# Heuristic: expect at least
70
% of the prompts to match exactly
# Heuristic: expect at least
66
% of the prompts to match exactly
# Upon failure, inspect the outputs to check for inaccuracy.
# Upon failure, inspect the outputs to check for inaccuracy.
assert
matches
>
int
(
0.
7
*
len
(
ref_outputs
))
assert
matches
>
int
(
0.
66
*
len
(
ref_outputs
))
del
spec_llm
del
spec_llm
vllm/config.py
View file @
513f0747
...
@@ -2220,9 +2220,10 @@ class SpeculativeConfig:
...
@@ -2220,9 +2220,10 @@ class SpeculativeConfig:
excluding anything before input ids/embeddings and after
excluding anything before input ids/embeddings and after
the final hidden states.
the final hidden states.
"""
"""
# no factors to consider.
# spec decode does not use `torch.compile` yet.
factors
:
list
[
Any
]
=
[]
factors
:
list
[
Any
]
=
[]
# Eagle3 affects the computation graph because it returns intermediate
# hidden states in addition to the final hidden state.
factors
.
append
(
self
.
method
==
"eagle3"
)
hash_str
=
hashlib
.
md5
(
str
(
factors
).
encode
(),
hash_str
=
hashlib
.
md5
(
str
(
factors
).
encode
(),
usedforsecurity
=
False
).
hexdigest
()
usedforsecurity
=
False
).
hexdigest
()
return
hash_str
return
hash_str
...
...
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