This commit is contained in:
GeeeekExplorer
2025-06-15 13:09:05 +08:00
parent 326b121fad
commit 7e42fa6f63
3 changed files with 7 additions and 5 deletions

View File

@@ -11,4 +11,4 @@ class SiluAndMul(nn.Module):
@torch.compile
def forward(self, x: torch.Tensor) -> torch.Tensor:
x, y = x.chunk(2, -1)
return y.mul_(F.silu(x))
return F.silu(x) * y