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
4c611348
Unverified
Commit
4c611348
authored
May 23, 2025
by
RonaldBXu
Committed by
GitHub
May 23, 2025
Browse files
[V1] [Bugfix] eagle bugfix and enable correct lm_head for multimodal (#18034)
Signed-off-by:
Ronald Xu
<
ronaldxu@amazon.com
>
parent
60cad94b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
vllm/transformers_utils/configs/eagle.py
vllm/transformers_utils/configs/eagle.py
+1
-2
vllm/v1/spec_decode/eagle.py
vllm/v1/spec_decode/eagle.py
+5
-1
No files found.
vllm/transformers_utils/configs/eagle.py
View file @
4c611348
...
...
@@ -70,8 +70,7 @@ class EAGLEConfig(PretrainedConfig):
if
self
.
model
is
not
None
:
for
k
,
v
in
self
.
model
.
to_dict
().
items
():
if
not
hasattr
(
self
,
k
):
setattr
(
self
,
k
,
v
)
setattr
(
self
,
k
,
v
)
@
classmethod
def
from_pretrained
(
...
...
vllm/v1/spec_decode/eagle.py
View file @
4c611348
...
...
@@ -9,6 +9,7 @@ from vllm.distributed.parallel_state import get_pp_group
from
vllm.forward_context
import
set_forward_context
from
vllm.logger
import
init_logger
from
vllm.model_executor.model_loader
import
get_model
from
vllm.model_executor.models
import
supports_multimodal
from
vllm.model_executor.models.llama_eagle3
import
Eagle3LlamaForCausalLM
from
vllm.triton_utils
import
tl
,
triton
from
vllm.v1.attention.backends.flash_attn
import
FlashAttentionMetadata
...
...
@@ -310,7 +311,10 @@ class EagleProposer:
if
self
.
vllm_config
.
speculative_config
.
method
!=
"eagle3"
and
\
hasattr
(
target_model
,
"lm_head"
):
logger
.
info
(
"Loading EAGLE LM head weights from the target model."
)
self
.
model
.
lm_head
=
target_model
.
lm_head
if
supports_multimodal
(
target_model
):
self
.
model
.
lm_head
=
target_model
.
get_language_model
().
lm_head
else
:
self
.
model
.
lm_head
=
target_model
.
lm_head
@
torch
.
inference_mode
()
def
dummy_run
(
...
...
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