remove qwen2.py llama.py fix llama output

This commit is contained in:
hanhaowen
2025-12-31 11:31:26 +08:00
parent b3c30a3cb9
commit b015bb76fd
11 changed files with 65 additions and 1263 deletions

View File

@@ -98,7 +98,7 @@ class SiluAndMul(CustomOp):
d = x.shape[-1] // 2
output_shape = (x.shape[:-1] + (d, ))
out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
torch.ops._C.swiglu(x, out)
torch.ops._C.silu_and_mul(out, x)
return out
def forward_kunlun(self, x: torch.Tensor) -> torch.Tensor: