Update llms/mlx_lm/models/gemma3_text.py

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>
This commit is contained in:
Prince Canuma 2025-03-12 15:00:49 +01:00 committed by GitHub
parent 92b06ddcad
commit bbadd1d5af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,7 +116,6 @@ class MLP(nn.Module):
self.up_proj = nn.Linear(dim, hidden_dim, bias=False) self.up_proj = nn.Linear(dim, hidden_dim, bias=False)
def __call__(self, x) -> mx.array: def __call__(self, x) -> mx.array:
# This should not be GELU approx, jax.nn.gelu
return self.down_proj(nn.gelu_approx(self.gate_proj(x)) * self.up_proj(x)) return self.down_proj(nn.gelu_approx(self.gate_proj(x)) * self.up_proj(x))