What is quantization? How much do INT4/INT8 really cost you?

The key to fitting models into small GPUs: the precision-for-memory trade, quantified.

How it works

Weights default to 16-bit; quantization squeezes them to 8 or 4 bits, halving memory twice over — a 7B model drops from ~14GB to ~4GB and runs on a laptop. Models in Ollama or LM Studio are almost always quantized.

The quality bill

Rule of thumb: INT8 is near-lossless; good 4-bit schemes barely dent daily tasks but hurt math and long code first. Prefer community-vetted quants and spot-check against the full model for critical work.

中文

大模型量化是什么?INT4、INT8 对性能影响多大

把模型"压缩"进小显存的关键技术:精度换显存的账怎么算。

压缩的原理

模型权重默认用 16 位存储;量化把它压到 8 位甚至 4 位,显存需求直接减半再减半——7B 模型从约 14GB 压到约 4GB,笔记本也能跑。Ollama、LM Studio 里下载的模型基本都是量化版。

掉多少智商

经验规律:INT8 几乎无损;主流 4 位方案日常任务损失很小,但数学推理和长代码这类"步步惊心"的任务会先受伤。挑选时优先社区口碑好的量化版本,重要任务再和原版对比一轮。

Keep reading / 继续阅读