vllm.model_executor.models.bailing_moe_v3
¶
vLLM implementation for BailingMoeV3ForCausalLM.
The HuggingFace reference model mixes MLA full-attention layers with Kimi Delta Attention linear layers and Bailing MoE blocks. This file keeps the V3 module/weight names aligned with the reference implementation while reusing vLLM's parallel linear layers, MLA kernel, KDA kernel and fused MoE loader.
Functions:
-
bailing_v3_kda_attention–Run Bailing V3's KDA state update outside the compiled graph.
_get_block_fp8_mlp_padded_intermediate_size(quant_config, intermediate_size, prefix)
¶
Pad a block-FP8 MLP so each TP shard contains whole quant blocks.
_is_fp8_module_excluded(quant_config, prefix)
¶
Match Ling's abbreviated FP8 exclusions against mapped vLLM prefixes.
_maybe_remap_ling_mxfp4_weight_names(weights, quant_config)
¶
Map Ling's MXFP4 expert scales to Mxfp4MoEMethod parameters.
_pad_block_fp8_mlp_checkpoint_tensor(quant_config, name, loaded_weight, intermediate_size, padded_intermediate_size)
¶
Zero-pad an MLP checkpoint tensor on its intermediate dimension.
bailing_v3_kda_attention(q_proj_states, k_proj_states, v_proj_states, g1, beta, core_attn_out, layer_name)
¶
Run Bailing V3's KDA state update outside the compiled graph.