Skip to content
New Year BoostTop up
Apixo
Blog
news· 2 min read· via Towards AI

What Happens to Large Language Models When You Squeeze Their Bits?

An investigative look into LLM quantization reveals how 4-bit compression affects exact recall, precision, and model performance compared to original 16-bit weights.

What Happens to Large Language Models When You Squeeze Their Bits?

Running local large language models has never been easier, with tools like Ollama allowing users to launch models with a single command. However, users often run heavily compressed versions rather than the original files released by creators. While original models store 16 bits per weight using BF16 precision, tools commonly default to 4-bit quantization, discarding three-quarters of the original data. To understand the true impact of this compression, researchers have tested how lower bit rates affect model accuracy, particularly regarding exact recall and precision tasks.

Visualizing the Math Behind Compression

To understand how quantization alters data, researchers used image compression as a visual metaphor, studying how color channels behave when scaled down from 8 bits per channel to just 2 or 1.5 bits. While naive 2-bit compression produces heavily degraded results, advanced techniques like mixed precision, block scales, and error diffusion help preserve critical details. Advanced block structures allocate metadata to maintain local contrast and dynamic range, ensuring darker areas do not collapse into flat black.

In the context of large language models, formats like GGUF's K-quants and dynamic quants apply similar mathematical principles. They dynamically distribute bits across tensors to retain the most vital information. While these methods allow large models to run on consumer hardware, the compression is not entirely lossless. Error introduction behaves predictably, preserving general prose quality while impacting precise data.

Testing Exact Recall Using Pi

To measure precision losses objectively, an experiment was conducted asking 64 different GGUF builds across three model sizes—Qwen 3.5 4B, Qwen 3.5 9B, and Qwen 3.8 27B—to recite the digits of pi. Because each digit corresponds to a distinct token, this provided a clear benchmark for memory and exact recall without relying on subjective evaluations.

Free recall tests and teacher-forced probability checks demonstrated that default 4-bit formats (such as Q4_K_M) experience noticeable drops in exact recall. While a model might maintain a 95% average token accuracy, errors concentrate heavily in specific areas where the original model had low certainty. For casual tasks, summaries, and conversational chat, these minor discrepancies are virtually unnoticeable. However, for precision-heavy tasks like programming or exact data retrieval, compressed models are far more susceptible to failure. Developers can try top AI models cheaply through one API at https://apixoai.online.

What it means for developers

For software engineers and developers deploying AI applications, quantization choice involves a direct trade-off between hardware efficiency and output precision. If your workflow relies heavily on exact code generation, strict formatting, structured data extraction, or factual recall, aggressive 4-bit or lower compression can introduce critical faults.

When hardware permits, utilizing higher-precision formats like Q8_0 yields performance closer to uncompressed baseline weights while preserving memory efficiency and increasing decoding speed. Ultimately, developers must evaluate quantization formats based on the specific type of text and constraints their applications demand, rather than relying on generalized benchmarks.


Source: Bits of π — Towards AI. Written by the Apixo team from that report.

#ai-news#quantization#llm#ai#development#models
Try it with your own tools

One key for Claude, GPT, GLM, DeepSeek and more. Pay per token with crypto.

Get your API key

Keep reading