Skip to content

vllm.model_executor.layers.quantization.online.moe_base

Classes:

OnlineMoEMethodBase

Bases: OnlineRequantizationMixin, FusedMoEMethodBase

Base for MoE methods that load full-precision weights on meta device and quantize them after loading via the QeRL layerwise processing system.

Methods:

get_weights_for_quantization(layer)

Return the high precision (w13, w2) of all local experts.

iter_weights_for_quantization(layer)

Yield (experts, w13, w2) for groups of experts to quantize.

The source dequantizes in chunks to bound staging memory. Without a source, all routed experts are yielded at once. Fused shared experts come last.

quantize_weights(layer, quantize)

Quantize the layer's weights one group of experts at a time.

Parameters:

Returns:

  • tuple[Tensor, ...] –

    The quantize outputs for all local experts.