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 function

resolve_hf_quant_config

resolve_hf_quant_config()

max.pipelines.weights.resolve_hf_quant_config(huggingface_config, state_dict)

source

Resolves a checkpoint’s Hugging Face quantization config.

Tries, in order: the config’s own quantization_config field, a standalone hf_quant_config.json beside the weights, and finally a sniff of the state dict for modelopt NVFP4’s weight_scale_2 tensors.

Parameters:

  • huggingface_config (AutoConfig) – The config to read quantization_config from. For a nested multimodal config this must be the top-level one – the sub-config does not carry the field.
  • state_dict (Mapping[str, WeightData]) – The checkpoint weights, used only by the final sniff.

Returns:

The resolved quantization config, or None when the checkpoint declares no quantization.

Return type:

dict[str, Any] | None