[Bugfix][2/n] Fix speculative decoding CI - Fix test_ngram_e2e_greedy_correctness (#19644)

This commit is contained in:
Lu Fang
2025-06-14 21:15:41 -07:00
committed by GitHub
parent e13945f9dd
commit ee1531bc38
5 changed files with 50 additions and 3 deletions
+2 -1
View File
@@ -74,6 +74,7 @@ class EAGLE(nn.Module):
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
super().__init__()
config = vllm_config.model_config.hf_config
self.dtype = vllm_config.model_config.dtype
self.config = config
architectures = getattr(self.config.model, "architectures", [])
@@ -250,7 +251,7 @@ class EAGLE(nn.Module):
lm_head_weight = torch.zeros(
self.lm_head.org_vocab_size,
self.lm_head.embedding_dim,
dtype=self.config.torch_dtype,
dtype=self.dtype,
)
weight_loader = getattr(self.lm_head.weight, "weight_loader",