vllm.model_executor.layers.quantization.inc.schemes ¶
Modules:
Classes:
-
INCMxfp4Scheme–MXFP4 (W4A4) scheme for AutoRound checkpoints.
-
INCScheme–One class per quant type. Single registration point for the factory.
INCMxfp4Scheme ¶
Bases: INCScheme
MXFP4 (W4A4) scheme for AutoRound checkpoints.
Dispatches to :class:INCMxfp4LinearMethod for linear layers and :class:INCMxfp4MoEMethod for fused MoE layers; see those classes for the per-module weight layout and kernel-selection details.
Source code in vllm/model_executor/layers/quantization/inc/schemes/inc_mxfp4_scheme.py
INCScheme ¶
Bases: ABC
One class per quant type. Single registration point for the factory.
Each subclass defines
- can_handle(): when does this scheme apply?
- get_linear_method(): required — how to quantize Linear layers
- get_moe_method(): optional — how to quantize MoE layers
- get_kvcache_method(): optional — how to quantize KV cache
Schemes that don't support MoE/KVCache inherit the default raise.
Methods:
-
get_kvcache_method–Optional. Override if this scheme supports KV cache quantization.
-
get_moe_method–Optional. Override if this scheme supports MoE.
Source code in vllm/model_executor/layers/quantization/inc/schemes/inc_scheme.py
get_kvcache_method(config, layer, prefix, layer_config) ¶
Optional. Override if this scheme supports KV cache quantization. Default raises NotImplementedError.
Source code in vllm/model_executor/layers/quantization/inc/schemes/inc_scheme.py
get_moe_method(config, layer, prefix, layer_config) ¶
Optional. Override if this scheme supports MoE. Default raises NotImplementedError.