vllm.utils.flashinfer_moe_ep ¶
FlashInfer moe_ep helpers for DeepSeek V4 vLLM integration.
Classes:
-
FiMoeEpBackendSpec–Static properties of one
flashinfer_moe_ep_*backend string.
Functions:
-
ensure_fi_moe_ep_runtime–Acquire the process-wide flashinfer moe_ep runtime once per worker.
-
finalize_fi_moe_ep_runtime–Release the process-wide flashinfer moe_ep runtime.
-
validate_fi_moe_ep_config–Config-time checks for the mega-MoE backends, native and flashinfer.
FiMoeEpBackendSpec dataclass ¶
Static properties of one flashinfer_moe_ep_* backend string.
The backend names the kernel family; the arch comes from the device and the weight handling from the checkpoint, so this only has to carry which megakernel to build and whether it needs NVSHMEM in the runtime set.
Source code in vllm/utils/flashinfer_moe_ep.py
_dequant_expert_weights_to_bf16(weight, scale) ¶
[E, N, K//2] fp4 + [E, N, K//32] ue8m0 -> [E, N, K] bf16 (expert loop).
Source code in vllm/utils/flashinfer_moe_ep.py
_dequant_fp4_ue8m0_gran32(packed, sf_ue8m0) ¶
[rows, K//2] packed e2m1 + [rows, K//32] ue8m0-uint8 scales -> bf16 [rows, K].
Source code in vllm/utils/flashinfer_moe_ep.py
ensure_fi_moe_ep_runtime(vllm_config) ¶
Acquire the process-wide flashinfer moe_ep runtime once per worker.
Source code in vllm/utils/flashinfer_moe_ep.py
finalize_fi_moe_ep_runtime() ¶
Release the process-wide flashinfer moe_ep runtime.
Source code in vllm/utils/flashinfer_moe_ep.py
validate_fi_moe_ep_config(vllm_config) ¶
Config-time checks for the mega-MoE backends, native and flashinfer.