This commit is contained in:
GeeeekExplorer
2025-06-15 10:31:48 +08:00
parent c1fd4ea3c2
commit fc778a4da9
10 changed files with 19 additions and 22 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 F.silu(x) * y
return y.mul_(F.silu(x))