Fix accessing hidden_act from model config (#32686)

Signed-off-by: Grzegorz Karch <gkarch@nvidia.com>
This commit is contained in:
Grzegorz K. Karch
2026-02-02 11:11:33 +00:00
committed by GitHub
parent 528b3076af
commit 78061ef584
+6 -1
View File
@@ -177,10 +177,15 @@ class DeciLMDecoderLayer(nn.Module):
else:
intermediate_size = block_config.ffn.intermediate_size
if hasattr(block_config.ffn, "hidden_act"):
hidden_act = block_config.ffn.hidden_act
else:
hidden_act = config.hidden_act
self.mlp = LlamaMLP(
hidden_size=self.hidden_size,
intermediate_size=intermediate_size,
hidden_act=config.hidden_act,
hidden_act=hidden_act,
quant_config=quant_config,
bias=getattr(config, "mlp_bias", False),
prefix=f"{prefix}.mlp",