Fix: add missing get_embed_and_head in MiniMax M2 for Eagle3 (#13297)

This commit is contained in:
Charles Chen
2025-11-15 01:36:03 -08:00
committed by GitHub
parent d52d992a90
commit b051d76dab

View File

@@ -821,6 +821,9 @@ class MiniMaxM2ForCausalLM(nn.Module):
else:
self.model.layers_to_capture = [val + 1 for val in layer_ids]
def get_embed_and_head(self):
return self.model.embed_tokens.weight, self.lm_head.weight
@torch.no_grad()
def forward(
self,