vllm.models.deepseek_v4.common.eplb_util
¶
Shared EPLB MoE registration helpers for DeepSeek V4 family models.
Functions:
-
collect_moe_layers–Populate
MixtureOfExpertsfields from decoder layers for EPLB. -
dspark_draft_supports_eplb–Return whether a DSpark draft can share EPLB state with the target.
collect_moe_layers(moe_model, layers, config, *, decoder_layer_type, moe_type)
¶
Populate MixtureOfExperts fields from decoder layers for EPLB.
Works for both target backbones and DSpark draft stacks. Draft models pass
their shorter model.layers list; pipeline-parallel placeholder layers
are skipped via decoder_layer_type.
Source code in vllm/models/deepseek_v4/common/eplb_util.py
dspark_draft_supports_eplb(draft_model_config)
¶
Return whether a DSpark draft can share EPLB state with the target.
Only DeepSeek-V4 DSpark drafts reuse the target expert layout. V4.1 drafts use a smaller routed-expert count and cannot share EPLB state.