Skip to content

vllm.model_executor.hw_agnostic.layers.activation

Classes:

  • SiluAndMul –

    SwiGLU: x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2.

Functions:

SiluAndMul

Bases: CustomOp

SwiGLU: x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2.

get_act_and_mul_fn(act_fn_name)

Build the hw-agnostic activation-and-mul op named act_fn_name.