IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python module

max.nn.moe

Mixture of Experts (MoE) module.

Mixture of expertsโ€‹

GatedActivationThe gated activation between an MoE's gate-up and down projections.
SigmoidTopKRouterMoE gate with sigmoid scores and a correction bias (noaux_tc).
StackedMoEStacked Mixture of Experts layer with configurable components.

Quantization strategiesโ€‹

Fp8StrategyFP8 quantization for MoE.
GateUpFormatSpecifies the format of the combined gate/up projection weights.
Nvfp4ScalesBundled scales for NVFP4 quantization.
NvMxf4f8StrategyNVIDIA NVFP4/MXFP4/MXFP8 quantization for MoE.
QuantStrategyQuantization strategy for MoE layers.

Functionsโ€‹

interleaved_block_scales_shapeReturns the SM100 interleaved layout's shape for [rows, cols] scales.
make_concatenated_gated_activation_fnBuilds a gated activation for concatenated [gate | up] projections.
make_interleaved_gated_activation_fnBuilds a gated activation for interleaved [g0, u0, g1, u1, ...] projections.
make_stacked_gated_activation_fnBuilds a gated activation for split (gate, up) projections.