pub fn detect_quant_format(
config: &ModelConfig,
store: &WeightStore,
) -> Result<Box<dyn QuantFormat>>Expand description
2026-09-25: Pick the QuantFormat for a checkpoint.
- A
quantization_configwhosequant_methodismodelopt,compressed-tensorsorfp8selects that layout directly. Thequant_algoandformatare logged or stored, not used to choose. - Otherwise the layout comes from
weight_map::detect_nvfp4_variant(an unrecognised method is warned about first). - When that finds no quantized weights (
Bf16Raw), it warns and returns aModeloptFormat.
The ignore list is the config’s ignore_modules, or empty without a
config.