Skip to content

Quantization types

ISQ (in-situ quantization) types supported by mistral.rs. For format selection guidance and underlying tradeoffs, see the quantization guide.

For run, serve, and bench:

  • --quant N selects a matching pre-quantized artifact. For safetensors sources, a missing UQFF falls back to runtime ISQ.
  • --isq N forces runtime ISQ and skips the UQFF (Universal Quantized File Format) lookup.

For a GGUF repository, --quant selects a matching published file. To requantize GGUF weights instead, select an exact file with -f and pass --isq. See GGUF support for the accepted file formats. GGUF selection requires an explicit bit width or format name; --quant auto is not supported.

mistral.rs resolves N to a format based on the detected backend (see table). This happens when --quant falls back to runtime ISQ, or when you pass --isq N directly.

ShorthandMetal resolves toCUDA / CPU resolves to
2AFQ2Q2K
3AFQ3Q3K
4AFQ4Q4K
5Q5KQ5K
6AFQ6Q6K
8AFQ8Q8_0

Token embeddings and output heads use a higher-precision default than the rest of an aggressively quantized model:

Default model typeEffective embedding and output-head type
AFQ2, AFQ3, AFQ4AFQ6
AFQ6, AFQ8AFQ8
Q2K, Q3K, Q4K, Q4_0, Q4_1Q6K
Q5K, Q6K, Q8K, Q5_0, Q5_1, Q8_0, Q8_1Q8_0

Q8_0 is the common high-precision Q target because quantized embedding kernels support it across CPU, CUDA, and Metal. This policy applies to token embeddings, quantized per-layer token embeddings, lm_head, and the top-level output head. Gemma 4 applies it to the PLE token-embedding table while keeping PLE projections at the model default and norms dense. Gemma 3n applies it to the PLE token-embedding table in the default full configuration; explicit MatFormer slices keep that table dense.

Each supported model loader declares the exact language embedding and output-head paths that receive this policy. A similarly named tensor in a vision, audio, or auxiliary subtree is not promoted merely because its name ends in embed_tokens, word_embeddings, or lm_head.

A tied output head reuses the effective embedding instead of storing a second copy. An explicit per-tensor ISQ type in a topology takes precedence over these defaults.

Affine quantization, optimized for Apple Silicon. Runs on Metal (native kernels), CUDA (dedicated backend), and CPU (fallback).

TypeBits
afq22
afq33
afq44
afq66
afq88

GGML K-quant formats. Q2K through Q6K are supported on all backends; Q8K is available where the backend supports it.

TypeBits
q2k2
q3k3
q4k4
q5k5
q6k6
q8k8

Supported for GGUF compatibility:

TypeBits
q4_0, q4_14
q5_0, q5_15
q8_0, q8_18

E4M3 FP8 has native acceleration on NVIDIA Ada/Hopper (compute 8.9+). F8Q8 is CPU-only.

TypeBitsLayout
fp88E4M3 (4-bit exponent, 3-bit mantissa)
f8q88CPU-only F8Q8 weights

4-bit microscaling format for CUDA and Metal. CPU is not supported; CUDA kernel availability depends on the build and GPU.

TypeBits
mxfp44

Half-quadratic quantization.

TypeBits
hqq44
hqq88

Not ISQ types, pre-quantized formats. Load directly when a Hugging Face model is available as GPTQ or AWQ:

Terminal window
mistralrs run --format plain -m <gptq-or-awq-repo>

mistral.rs detects the quantization from the model’s config. No --quant or --isq required.

See the quantization guide for format selection.