Skip to content

vllm.model_executor.layers.fused_moe.experts.trtllm_fp8_moe

Classes:

Functions:

TrtLlmFp8ExpertsBase

Fp8 TRTLLM-Gen MoE kernels. Shared base for modular and monolithic interfaces.

_supports_activation(activation) staticmethod

Supports SiLU, SwiGLU-OAI (uninterleaved), and RELU^2 non-gated.

_supports_current_device() staticmethod

Supports only Blackwell-family GPUs.

_supports_no_act_and_mul() staticmethod

Does not support non-gated MoE (i.e. Nanotron-3-Nano).

_supports_parallel_config(moe_parallel_config) staticmethod

Monolithic kernel so only use with naive DP/EP and TP.

TrtLlmFp8ExpertsModular

Bases: TrtLlmFp8ExpertsBase, FusedMoEExpertsModular

Fp8 TRTLLM-Gen MoE kernels. Supports modular interface.

The TRTLLM-Gen kernel skips padding rows at tile granularity, so it can consume the padded contiguous layout produced by DeepEP v2.

Methods:

  • moe_problem_size –

    Override to handle 4D BlockMajorK weights (E, K/bk, Mn, bk).

_supports_quant_scheme(weight_key, activation_key) staticmethod

Supports Fp8 block and MXFP8.

moe_problem_size(a1, w1, w2, topk_ids)

Override to handle 4D BlockMajorK weights (E, K/bk, Mn, bk).

TrtLlmFp8ExpertsMonolithic

Bases: TrtLlmFp8ExpertsBase, FusedMoEExpertsMonolithic

Fp8 TRTLLM-Gen MoE kernels. Supports monolithic interface.

_block_scale_kwargs(hidden_states, w1, w2, activation, a1q_scale)

Arguments shared by the logits- and topk-routed block-scale calls.

_supports_quant_scheme(weight_key, activation_key) staticmethod

Supports Fp8 per-tensor, Fp8 block, and MXFP8.

_supports_routing_method(routing_method, weight_key, activation_key) staticmethod

Monolithic kernels need to express router support.

prepare_deepseek_fp8_x_sf(x, x_sf)

Validate DeepSeek Blockwise FP8 tensors and return TRTLLM layout.