init
This commit is contained in:
8
vllm_vacc/vllm/model_executor/layers/activation.py
Normal file
8
vllm_vacc/vllm/model_executor/layers/activation.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import torch
|
||||
|
||||
def SiluAndMul_forward_vacc(self, x: torch.Tensor) -> torch.Tensor:
|
||||
return torch.vacc.swiglu(x)
|
||||
|
||||
def QuickGELU_forward_vacc(self, x: torch.Tensor) -> torch.Tensor:
|
||||
"""PyTorch-native implementation equivalent to forward()."""
|
||||
return x * torch.sigmoid(1.702 * x)
|
||||
Reference in New Issue
Block a user