mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-29 16:58:45 +08:00
revert to act_fn to silu
This commit is contained in:
parent
d7c64c621a
commit
5d8b36ce7c
@ -115,7 +115,7 @@ class MLP(nn.Module):
|
|||||||
self.down_proj = nn.Linear(hidden_dim, dim, bias=False)
|
self.down_proj = nn.Linear(hidden_dim, dim, bias=False)
|
||||||
|
|
||||||
def __call__(self, x):
|
def __call__(self, x):
|
||||||
return self.down_proj(nn.gelu(self.gate_proj(x)) * self.up_proj(x))
|
return self.down_proj(nn.silu(self.gate_proj(x)) * self.up_proj(x))
|
||||||
|
|
||||||
|
|
||||||
class TransformerBlock(nn.Module):
|
class TransformerBlock(nn.Module):
|
||||||
|
Loading…
Reference in New Issue
Block a user