vllm.model_executor.layers.mamba.linear.bailing_linear_attn
¶
Classes:
-
BailingGroupRMSNormGate– -
BailingMoELinearAttention–Pluggable Bailing MoE Linear Attention layer which allows OOT backends
BailingGroupRMSNormGate
¶
Bases: RMSNormGated
_weight_loader(param, loaded_weight)
staticmethod
¶
Load weight with TP sharding.
BailingMoELinearAttention
¶
Bases: LinearAttention
Pluggable Bailing MoE Linear Attention layer which allows OOT backends to add custom implementations.
This implements the linear attention mechanism from sglang, adapted for vLLM's v1 engine with MambaBase interface support.
Methods:
-
forward–Forward method called by torch.ops.vllm.linear_attention.
_decode_infer(q, k, v, kv_cache, state_indices_tensor, attn_metadata)
¶
Handle decode (single token per sequence).
_forward(hidden_states, output, positions)
¶
Actual forward implementation.
_prefill_and_mix_infer(q, k, v, kv_cache, state_indices_tensor, attn_metadata)
¶
Handle prefill (mixed with decode if any).
forward(hidden_states, output, positions)
¶
Forward method called by torch.ops.vllm.linear_attention.