[Bugfix] Pass drafter quant_config to ParallelLMHead in Eagle3 (#37280)

Signed-off-by: Matthias Gehre <matthias.gehre@amd.com>
This commit is contained in:
Matthias Gehre
2026-03-25 11:42:58 +00:00
committed by GitHub
parent ba2910f73a
commit a889b7f584
3 changed files with 48 additions and 0 deletions
@@ -294,6 +294,7 @@ class Eagle3LlamaForCausalLM(LlamaForCausalLM):
self.lm_head = ParallelLMHead(
self.config.draft_vocab_size,
self.config.hidden_size,
quant_config=get_draft_quant_config(vllm_config),
prefix=maybe_prefix(prefix, "lm_head"),
)
self.logits_processor = LogitsProcessor(
+2
View File
@@ -1390,6 +1390,8 @@ class SpecDecodeBaseProposer:
)
elif (
hasattr(target_language_model, "lm_head")
and hasattr(target_language_model.lm_head, "weight")
and hasattr(self.model.lm_head, "weight")
and isinstance(target_language_model.lm_head.weight, torch.Tensor)
and isinstance(self.model.lm_head.weight, torch.Tensor)
# TODO: Offload to CPU for comparison to avoid extra GPU memory