Huggingface.js documentation
Interface: QuantizationConfig
Interface: QuantizationConfig
Hierarchy
QuantizationConfig
Properties
bits
• Optional bits: number
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:934
config _ groups
• Optional config_groups: Record<string, { format?: string ; targets?: string[] ; weights?: { num_bits?: number } }>
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:939
expert _ dtype
• Optional expert_dtype: string
Routed expert precision when it differs from the main quantizer (e.g. FP4 experts with FP8 attention).
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:924
format
• Optional format: string
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:938
group _ size
• Optional group_size: number
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:932
ignore
• Optional ignore: string[]
compressed-tensors names its exclusion list ignore rather than modules_to_not_convert,
using the same re:-prefixed target syntax as config_groups[].targets.
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:944
load _ in _ 4bit
• Optional load_in_4bit: boolean
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:935
load _ in _ 8bit
• Optional load_in_8bit: boolean
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:936
mode
• Optional mode: string
MLX quantization mode (e.g. affine); MLX configs do not declare quant_method.
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:931
modules _ to _ not _ convert
• Optional modules_to_not_convert: string[]
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:933
quant _ algo
• Optional quant_algo: string
NVIDIA ModelOpt (quant_method: "modelopt") algorithm, e.g. "NVFP4", "W4A16_NVFP4", "FP8",
or "MIXED_PRECISION" — in which case the per-module algorithm is in quantized_layers.
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:949
quant _ method
• Optional quant_method: string
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:922
quantized _ layers
• Optional quantized_layers: Record<string, { quant_algo?: string }>
ModelOpt mixed-precision: module name (or a parent module, e.g. …mlp.experts) -> its algorithm.
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:951
store _ dtype
• Optional store_dtype: string
Same role as expert_dtype under another name: MiMo-V2.6 is quant_method: "fp8" for its
dense layers but stores the routed experts as store_dtype: "mxfp4", packed two per U8.
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:929
Update on GitHub