[Bugfix] Pass drafter quant_config to ParallelLMHead in Eagle3 (#37280)
Signed-off-by: Matthias Gehre <matthias.gehre@amd.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user