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)
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_configfrom. 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.
- huggingface_config (AutoConfig) – The config to read
-
Returns:
-
The resolved quantization config, or
Nonewhen the checkpoint declares no quantization. -
Return type: