vllm.ir.ops
¶
Modules:
-
activation– -
layernorm– -
rotary_embedding–vLLM IR ops for rotary positional embedding (RoPE).
Functions:
-
fused_add_rms_norm–Fused add and weighted root-mean-square layer normalization.
-
gelu_and_mul_sparse–Apply Gaussian sparsification, GELU, and gated multiplication.
-
rms_norm–Weighted root-mean-square layer normalization.
-
rotary_embedding_query_only–RoPE over query only, for layers that reuse another layer's KV cache.
fused_add_rms_norm(x, x_residual, weight, epsilon, variance_size=None)
¶
Fused add and weighted root-mean-square layer normalization.
Source code in vllm/ir/ops/layernorm.py
gelu_and_mul_sparse(x, std_multiplier, approximate='none')
¶
Apply Gaussian sparsification, GELU, and gated multiplication.
Source code in vllm/ir/ops/activation.py
rms_norm(x, weight, epsilon, variance_size=None)
¶
Weighted root-mean-square layer normalization.
Source code in vllm/ir/ops/layernorm.py
rotary_embedding_query_only(positions, query, head_size, cos_sin_cache, is_neox)
¶
RoPE over query only, for layers that reuse another layer's KV cache.