Fix EAGLE3 for llama3.3 70b (#4716)

This commit is contained in:
Ke Bao
2025-03-25 08:31:19 +08:00
committed by GitHub
parent 8154de5a32
commit 77cf771ebe
2 changed files with 10 additions and 1 deletions

View File

@@ -105,7 +105,10 @@ class LlamaModel(nn.Module):
prefix=add_prefix("embed_tokens", prefix),
)
self.midlayer = LlamaDecoderLayer(config, 0, quant_config, prefix)
self.fc = torch.nn.Linear(config.hidden_size * 3, config.hidden_size)
if hasattr(config, "target_hidden_size"):
self.fc = torch.nn.Linear(config.target_hidden_size * 3, config.hidden_size)
else:
self.fc = torch.nn.Linear(config.hidden_size * 3, config.hidden_size)
self.norm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps)