@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / fbb13a2c15
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 08:30 UTC

Revert "[V1] [Bugfix] eagle bugfix and enable correct lm_head for multimodal (#18034)" (#18600)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>

Cyrus Leung committed May 23, 2025 at 17:18 UTC fbb13a2c15bf505914667ae5db9d5cde0847c7b8
2 files changed +3 -6
vllm/transformers_utils/configs/eagle.py
+2 -1
@@ -70,7 +70,8 @@ class EAGLEConfig(PretrainedConfig):
70
71 if self.model is not None:
72 for k, v in self.model.to_dict().items():
73 - setattr(self, k, v)
73 + if not hasattr(self, k):
74 + setattr(self, k, v)
75
76 @classmethod
77 def from_pretrained(
vllm/v1/spec_decode/eagle.py
+1 -5
@@ -9,7 +9,6 @@ from vllm.distributed.parallel_state import get_pp_group
9 from vllm.forward_context import set_forward_context
10 from vllm.logger import init_logger
11 from vllm.model_executor.model_loader import get_model
12 -from vllm.model_executor.models import supports_multimodal
12 from vllm.model_executor.models.llama_eagle3 import Eagle3LlamaForCausalLM
13 from vllm.triton_utils import tl, triton
14 from vllm.v1.attention.backends.flash_attn import FlashAttentionMetadata
@@ -311,10 +310,7 @@ class EagleProposer:
310 if self.vllm_config.speculative_config.method != "eagle3" and \
311 hasattr(target_model, "lm_head"):
312 logger.info("Loading EAGLE LM head weights from the target model.")
314 - if supports_multimodal(target_model):
315 - self.model.lm_head = target_model.get_language_model().lm_head
316 - else:
317 - self.model.lm_head = target_model.lm_head
313 + self.model.lm_head = target_model.lm_head
314
315 @torch.inference_mode()
316 def dummy_run(