What is AI 4-bit integer (INT4)?
INT4 is a format representing numbers in 4 bits, meaning 16 integer levels; in large language models it is mostly used to compress weights, which are usually expanded to higher precision during computation.
Unlike 8-bit integer, INT4 halves memory again but 16 levels raise representation error, so techniques such as group-wise scaling and careful evaluation are needed. INT4 is usually applied as weight-only quantisation.
- Topic
- Infrastructure and runtime
- Also known as
- 4-bit quantisation
How AI 4-bit integer (INT4) works
- Weights are split into small groups, each with a scale and possibly a zero point.
- Values are rounded to one of 16 levels; methods using second-order information reduce error.
- At inference, weights are expanded to higher precision before computation.
- The model is compared with the full-precision version on an internal evaluation set.
In more detail
Weight-only (W4A16) bandwidth gains and the large batch limit
In weight-only INT4 (W4A16), weights are stored in 4 bits and dequantised on the fly inside GPU registers to FP16/BF16 before matrix multiplication. Because single-user or low-batch LLM decoding is memory-bandwidth bound, W4A16 can yield substantial speedups (2 to 3x), whereas in compute-bound large-batch prefill the dequantisation overhead can reduce or eliminate speed gains.
AWQ, calibration sensitivity and current 4-bit formats
Activation-aware Weight Quantisation (AWQ) protects the small fraction (~1%) of salient weight channels that correspond to large activation magnitudes by scaling them prior to rounding, often matching or surpassing GPTQ without overfitting to a calibration set. In open-source serving, Marlin kernels, GGUF K-quants and QuaRot/SpinQuant (for W4A4) are widely used alongside GPTQ.
Software-unpacked INT4 versus native hardware FP4
On newer data centre GPUs (such as NVIDIA Blackwell), hardware Tensor Cores natively accelerate 4-bit floating-point formats like MXFP4 and NVFP4 without needing to dequantise weights back to 16 bits. Distinguishing software-dequantised INT4 from hardware-native FP4 helps infrastructure teams pick the right format for their GPU generation.
Commonly confused terms
| Term | How it differs |
|---|---|
| NF4 and FP4 formats | INT4 uses 16 uniformly spaced integer levels with a scale (and optional zero point), whereas NF4 (4-bit NormalFloat) uses 16 non-uniform quantile levels tailored to a normal distribution and FP4/MXFP4 uses floating-point exponent/mantissa bits with native Tensor Core support on newer GPUs. |
| Post-training quantisation versus quantisation-aware training | Post-Training Quantisation (PTQ) compresses an already trained model using a small calibration dataset (e.g. GPTQ, AWQ), whereas Quantisation-Aware Training (QAT) simulates quantisation noise during training to preserve higher accuracy at 4-bit precision. |
Why AI 4-bit integer (INT4) matters for on-premises AI
The paper proposing GPTQ notes even inference for large generative models may need several powerful GPUs, offering a one-shot weight quantisation method based on approximate second-order information. The QLoRA paper shows backpropagating through a frozen model quantised to the 4-bit NF4 data type rather than INT4 into low-rank adapters lets a 65 billion parameter model be fine-tuned on a single 48 GB GPU while preserving 16-bit fine-tuning performance. Example calculation: a 7 billion parameter model's weights take about 14 GB at 16 bits and about 3.5 GB at 4 bits.
To run a language model on a single-GPU server in its air-gapped network, a defence company quantises it to INT4, comparing it with the 16-bit version on its technical document question set before deploying with an acceptable gap.
Common questions
Does INT4 cause quality loss?
Usually a small one, varying by task and method. It can show more in long reasoning and numeric tasks, so test on the organisation's own tasks.
Can you fine-tune with INT4?
Yes, by training low-rank adapters on top of a frozen 4-bit model.
Related terms
Sources
- GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers, 2022
- QLoRA: Efficient Finetuning of Quantized LLMs, 2023
In the glossary: Glossary, A to D