Quantization and LLM Hallucinations: Does Low-Bit Precision Make Large Models More Prone to Fabrication?
This article examines whether low-bit quantization increases hallucination rates in large language models (LLMs) deployed locally. It starts with the GPU memory bottleneck, explains the weight storage formula and typical bit-width trade-offs, then clarifies different types of hallucination. The article analyzes why quantization affects output reliability through rounding errors, probability shifts, and fragile sparse knowledge, and discusses key factors such as bit-width, group size, quantization method, calibration data, and base model quality. Practical conclusions are drawn for developers considering post-training quantization.
1. The Origin of the Problem: GPU Memory Constraints in Local Deployment
Larger LLMs generally produce better answers, but they also demand more GPU memory. A rough estimate of weight storage is:
Weight size (GB) ≈ number of parameters × average bits per weight ÷ 8 ÷ 10^9
For a model with about 27 billion parameters:
| Storage format | Average bit-width | Approximate weight size |
|---|---|---|
| 16-bit float | 16 bits | 54 GB |
| 8-bit float | 8 bits | 27 GB |
| 4-bit integer quantization | 4 bits | 13.5 GB |
| Ternary quantization (with scaling factor) | ~1.76 bits | ~5.9 GB |
Actual memory usage also includes scaling factors, word embeddings, KV cache, and runtime overhead, so the real requirement is usually higher than the formula suggests. On devices with only 8 GB or 16 GB of VRAM, a 16-bit original model cannot be loaded directly, and quantization becomes almost a necessary step.
Reducing bit-width introduces precision loss. After weights are rounded, each layer adds error, which accumulates through the network and eventually shows up in the output. Developers want to know: after compression, is the model more likely to invent facts, fabricate numbers, or cite non-existent sources?
2. Defining What “Hallucination” Actually Means
The term “hallucination” covers several distinct problems. Mixing them together in evaluation leads to vague conclusions. Common types include:
- Fabrication from missing knowledge: The model doesn’t have reliable information in its parameters, but still provides specific names, dates, or numbers.
- Failing to refuse when uncertain: The question is unsolvable or outside the model’s knowledge, yet the model does not express uncertainty.
- Distorted citations: The references, links, or regulatory clauses given do not exist.
- Long-context forgetting: Key information is present in the context, but the model ignores or misinterprets it.
- Broken reasoning chains: Intermediate steps are mostly correct, but the final conclusion is wrong.
- Inconsistency: Repeated questioning on the same topic yields contradictory answers.
Different types have different sensitivity to quantization. A common observation is that long-tail knowledge and precise numerical values tend to degrade more under low-bit quantization, while common-sense questions remain relatively stable. This judgment must be validated with your own data, not taken for granted.
3. Why Quantization Affects Output Reliability
The impact of quantization on output reliability comes from several mechanisms:
- Accumulated rounding errors: After weights are mapped to fewer discrete values, every matrix operation introduces error. The more layers and the longer the generation, the more noticeable the error accumulation.
- Shifted probability distributions: The model outputs a probability distribution over the vocabulary. Quantization may amplify or suppress certain candidate probabilities, changing the sampling result and causing a low-probability wrong token to be selected.
- Miscalibrated confidence: The model’s self-assessed certainty may diverge from factual correctness, leading to confident answers when the model should refuse to answer.
- Fragility of sparse knowledge: Low-frequency facts often rely on weights with small magnitudes and less redundancy, which are more likely to be lost in low-bit encoding.
The degree of impact depends on the following factors.
1. Bit-Width and Group Size
Group-wise quantization stores a scaling factor for each group of weights. Smaller groups provide finer scaling and higher accuracy, but also increase extra storage. Bit-width and group design must be evaluated together; looking only at the nominal bit-width can be misleading.
2. Quantization Method
- Post-Training Quantization (PTQ): No retraining is required, so deployment is fast. However, error is larger at low bit-widths and the method is sensitive to calibration data.
- Quantization-Aware Training (QAT): Simulates quantization errors during training, allowing the model to adapt to low-precision representations. Training is more expensive, but QAT is usually more stable at extremely low bit-widths.
3. Calibration Data
PTQ relies on calibration data to estimate scaling parameters. If the domain distribution of the calibration set differs significantly from your business data, representations for technical terms, person names, place names, and number formats may degrade.
4. Base Model Quality
At the same bit-width, models that were trained more thoroughly and use parameters more efficiently tend to be more robust to quantization. This is a widely observed industry experience, but the actual gap between different models must be measured empirically.
5. The Bottom Line
Low-bit quantization can increase the risk of hallucination, especially for precise factual data and long-tail knowledge. However, the severity is highly dependent on the specific model, quantization method, and calibration set. It is recommended to run targeted hallucination tests on your own use cases before deploying a quantized model. Monitor not only overall accuracy but also types of errors, and consider using a higher bit-width or QAT for critical applications.
