chore: update torch v2.5.1 (#1849)

This commit is contained in:
Yineng Zhang
2024-11-18 00:06:00 +08:00
committed by GitHub
parent f719d9aebc
commit 3b878863f7
10 changed files with 174 additions and 37 deletions

View File

@@ -38,6 +38,7 @@ from sglang.srt.utils import set_weight_attrs
logger = logging.getLogger(__name__)
@CustomOp.register("silu_and_mul")
class SiluAndMul(CustomOp):
def forward_native(self, x: torch.Tensor) -> torch.Tensor:
d = x.shape[-1] // 2
@@ -51,6 +52,7 @@ class SiluAndMul(CustomOp):
return out
@CustomOp.register("gelu_and_mul")
class GeluAndMul(CustomOp):
def __init__(self, approximate="tanh"):
super().__init__()