Why Quantized LLMs Start Hallucinating: Causes and Evaluation Methods

    This article explains why low-bit quantized large language models often produce contradictory answers, fabricated facts, and weaker instruction following compared with full-precision versions. It covers a four-dimension evaluation framework, the technical causes behind quality loss, trade-offs among three mainstream quantization approaches, and a practical checklist for local deployment and validation.

    1. Framing the Problem: Turning “Hallucination” into Measurable Metrics

    A common frustration when deploying LLMs locally is that the same base model answers reliably at full precision, but starts contradicting itself, inventing facts, and ignoring instructions once you switch to an extremely low-bit quantized version. To decide which quantization scheme “hallucinates less,” you first need to convert a vague impression into observable metrics. Otherwise, the discussion stays at the level of subjective opinion.

    Build an evaluation table with at least four dimensions:

    • Factual consistency: for closed-domain knowledge QA, the proportion of answers that refer to the same entity as the reference answer.
    • Instruction following: the per-constraint pass rate for multi-constraint instructions (format, length, role).
    • Long-context stability: plant key information at the tail of a very long window, then check recall and resistance to interference.
    • Structured output reliability: the syntactic validity rate and field completeness rate of JSON or table-style outputs.

    One point deserves emphasis: quantization does not “create” hallucinations. It amplifies the uncertainty already present in the base model. Evaluation must therefore use paired comparisons: the same prompt set, the same decoding parameters (temperature, top_p, and repetition penalty held constant), changing only weight precision. Only then can the difference be attributed to the quantization scheme.

    2. Mechanism Breakdown: Why Extremely Low Bits Make a Model “Dumber”

    The core risk of extremely low-bit quantization comes from outliers in the weight and activation distributions. Deep networks contain a very small number of numerical spikes with outsized influence, concentrated in a few channels or dimensions, and they dominate the direction of the attention matrix. If you round values directly into an extremely small set of levels, those spikes get flattened, deep representations become disordered, and the visible result is logical jumps and fabricated content.

    A second factor that is often overlooked is group granularity. Quantization shares a scale factor within each “group.” Groups that are too large cannot fit local distributions; groups that are too small increase the overhead and noise of the scale parameters themselves. The third factor is activation quantization: when weights are compressed aggressively but activations remain high precision, overall quality is usually manageable; once activations also drop to extremely low bits, error accumulates across layers.

    Illustrative quantization logic (a general flow only, not a specific implementation):

    1. # Pseudocode: general flow of group quantization + rotation-based projection
    2. def quantize(weight, group_size=128, bits=2):
    3. # 1) Orthogonal transform to spread extreme spikes across the feature space
    4. w_rot = orthogonal_project(weight)
    5. # 2) Compute a scale factor per group to preserve each group's dynamic range
    6. scale = group_max_abs(w_rot, group_size)
    7. # 3) Map to a discrete set of levels
    8. q = to_discrete_levels(w_rot / scale, bits)
    9. return q, scale

    3. Trade-offs Among Three Mainstream Approaches

    • Grouped fixed-point / integer quantization (such as common low-bit integer quantization): mature ecosystem and many inference implementations; quality is sensitive to group size.
    • Ternary approach: an extremely small value set that, combined with high-precision group scaling and rotation-based transforms, can strike a good balance between compression ratio and benchmark retention. It suits local environments where VRAM is tight.
    • Mixed-precision approach: keep a few sensitive layers at high precision and compress the rest. Engineering complexity rises, but risk is lowest.

    The selection principle is simple: the VRAM and memory budget define the feasible region, the proportion of sensitive layers sets the quality floor, and inference framework support determines deployment cost. Any “retention rate” figure holds only on a specific evaluation set and cannot be extrapolated directly to your own business distribution.

    4. Local Deployment and Validation Checklist

    1. First get a full-precision or high-precision baseline running, and lock down the evaluation set and decoding parameters.
    2. Run paired evaluations on each candidate quantized version, recording size, time to first token, throughput, and peak VRAM.
    3. Add retrieval augmentation to hallucination-prone scenarios, delegating factual grounding to an external knowledge source rather than parameter memory.
    4. Use constrained decoding or an output validation layer to intercept illegal structures and reduce the perceived probability of “hallucination.”
    5. If you use cloud resources, you can combine container platforms, object storage, log services, and monitoring alerts to build a reproducible evaluation pipeline.

    5. Conclusion

    There is no scenario-independent absolute answer to “which quantized version hallucinates less.” A reproducible conclusion can only come from paired evaluation: use the base model’s capability as the reference, control decoding parameters, and score on four metrics: factual consistency, instruction following, long context, and structured output. The more robust engineering approach is to suppress the influence of outliers with general techniques such as rotation-based transforms and group scaling, protect sensitive layers with mixed precision, and backstop factual grounding with retrieval augmentation and output validation. Practice at Baidu AI Cloud also indicates that turning evaluation into a pipeline and externalizing knowledge stabilizes output quality more effectively than simply chasing a lower bit width.