What is mixed-precision quantisation?

Mixed-precision quantisation is a quantisation approach that, rather than lowering all layers or tensors to one bit width, keeps the parts most sensitive to accuracy at higher precision and the rest lower, balancing memory saving and accuracy better.

Unlike uniform quantisation, where every weight drops to the same bit width, bit width here varies by layer, tensor or channel. Mixed precision training is a separate technique speeding up computation during training; it does not quantise the model permanently.

Topic
Machine learning, models and training
Also known as
Mixed-precision quantization

How mixed-precision quantisation works

  1. Each layer's or tensor's sensitivity to quantisation is found with a small calibration set or error measurements.
  2. Sensitive parts, such as certain layers or feature dimensions carrying outlier values, stay at a higher bit width.
  3. The rest drop to a lower bit width; the overall memory target is met through this assignment.
  4. The result is compared with the uniformly quantised version on the same evaluation set.

In more detail

Granularity and block-scaled formats

Mixed-precision quantisation operates at multiple levels of granularity: layer-wise (keeping embedding, lm_head or attention output projections at 6 to 8 bits while compressing MLP layers to 4 bits), channel- or group-wise and modern block-wise microscaling formats (such as GGUF K-quants like Q4_K_M or OCP MXFP8 and MXFP4). Finer granularity lowers quantisation error at a modest metadata overhead for scaling factors.

Measuring sensitivity and calibration data bias

Sensitivity estimation typically uses second-order curvature metrics (such as Hessian trace or Fisher information in HAWQ), activation magnitudes (as in AWQ) or iterative perplexity or KL-divergence checks on a domain-representative calibration dataset. Importantly, calibration data should mirror the target deployment language and domain; using only English web text can miscalibrate sensitivity for Turkish enterprise documents.

Mixed precision beyond weights: KV cache and activations

In long-context LLM serving, weights are not the only bottleneck: the KV cache grows linearly with context length and batch size. Modern mixed-precision setups therefore quantise weights (such as INT4 or FP8) separately from activations and KV caches (e.g., keeping early layers or attention sinks at FP16 or FP8 while compressing remaining KV entries to INT4), preventing memory exhaustion under high concurrency.

Memory bandwidth and fused dequantisation kernels

Because LLM token generation is usually memory-bandwidth bound rather than compute bound, reducing average bits per weight directly speeds up single-request decoding, provided fused dequantisation kernels exist for the chosen bit widths. Without hardware-native or fused kernels (such as Marlin, TensorRT-LLM or FP8 Tensor Cores), mixed bit widths introduce unpacking overhead that can negate theoretical speedups.

Commonly confused terms

TermHow it differs
Quantisation-aware trainingQuantisation-Aware Training (QAT) simulates quantisation noise during training or fine-tuning so weights adapt to low precision, whereas mixed-precision quantisation is a bit-allocation strategy that can be applied via either post-training quantisation (PTQ) or QAT.

Why mixed-precision quantisation matters for on-premises AI

Within the same memory budget, mixed-precision quantisation can cost less accuracy than uniform quantisation on limited in-house GPUs. It matters especially for large language models, where a few dimensions carrying outlier values can sharply cut performance if degraded at low precision. The cost is complexity: the inference engine and hardware kernels must support mixed bit widths efficiently, or the expected speed may not come.

ON-PREMISES EXAMPLE

To fit a language model on one GPU, a public body quantises it with one bit width for all weights, then with sensitive layers kept at high precision, choosing the mixed version after testing both on its Turkish evaluation set.

Common questions

How does mixed-precision quantisation differ from mixed precision training?

Mixed precision training uses low-precision computation to speed up training. Mixed-precision quantisation permanently stores different parts of a trained model at different bit widths.

Which parts stay at high precision?

The most sensitive to quantisation: often some layers, normalisation layers and feature dimensions carrying outliers. Sensitivity is measured by calibration.

Sources

In the glossary: Glossary, M to Q

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.