Skip to content

vllm.model_executor.layers.fused_moe.hpc_moe

Classes:

HPCExperts

Bases: FusedMoEExpertsModular

MoE implementation powered by HPC.

Only supported on NVIDIA Hopper GPUs (e.g. H20, H200), and currently limited to FP8 models such as Hy3-FP8, Qwen3-235B-A22B-FP8, etc.

Methods:

  • workspace_shapes –

    Compute the shapes for the temporary and final outputs of the two gemms

workspace_shapes(M, N, K, topk, global_num_experts, local_num_experts, expert_tokens_meta, activation)

Compute the shapes for the temporary and final outputs of the two gemms and activation in the fused expert function. Since the gemms are independent, the workspace for the first gemm can be shared with the workspace for the last gemm.

Returns a tuple of: - workspace13 shape tuple: must be large enough to hold the result of either expert gemm. - workspace2 shape tuple: must be large enough to hold the result of the activation function. - output shape tuple: must be exact size of the final gemm output. - Workspace type: The dtype to use for the workspace tensors. - Note: in order for activation chunking to work, the first dimension of each tuple must be the number of tokens.