Quantization shrinks a model by storing its weights in fewer bits, and done well it costs almost nothing in output quality. The bit width is the most important number: it directly determines how much memory you save and roughly how much quality you risk. FP16 stores each weight in 2 bytes, INT8 in 1 byte and INT4 in half a byte, so a 7-billion-parameter model needs about 14 GB at FP16, about 7 GB at INT8 and about 4 GB at INT4.
What you need
- The parameter count of the model you want to run
- How much GPU or system memory you have
- The tasks the model must still do well
Step 1: Work out the memory for each format
Multiply the parameter count by the bytes per weight: FP16 is 2 bytes, INT8 is 1 byte and INT4 is half a byte. A 70B model in FP16 needs roughly 140 GB just to hold the weights, before the KV cache or activations.
Step 2: Compare the quality each format risks
INT8 is the safe choice: for most models the quality difference versus full precision is negligible, often within measurement noise. INT4 is the sweet spot for consumer hardware: a well-quantized INT4 model loses a few tenths of a point on most benchmarks and is often indistinguishable in casual use.
Step 3: Pick by your hardware and test it
Pick INT8 when you want maximum safety with moderate savings, and INT4 when you need a large model to fit on limited memory. Test the pick on your real workload before shipping it, because benchmarks are guides, not guarantees.
Worked example: synthetic memory comparison for a 7B model
The table below is a synthetic example. It shows the expected result of comparing formats; no model was run.
| Format | Weight memory for 7B | Quality vs FP16 |
|---|---|---|
| FP16 | About 14 GB | Baseline, 100 percent |
| INT8 | About 7 GB | Negligible loss |
| INT4 (Q4_K_M) | About 4 to 4.5 GB | About 97 to 99 percent retained |
| Choice on a 8 GB GPU | INT4 | Fits with room for cache |
Expected result (UNTESTED). FP16 needs about 14 GB, INT8 about 7 GB and INT4 about 4 to 4.5 GB, so INT4 is the format that fits an 8 GB GPU with room for the cache. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- These are weight-only estimates; total memory during inference is higher because of the KV cache, activations and framework overhead, so budget 20 to 30 percent on top for short contexts.
- The larger the model, the more aggressively you can quantize it; small models of 7B and under are more sensitive and lose more.
- Going from 16-bit to 4-bit cuts memory by 4 times, but the quality cost is usually small, not zero.
- Below 4-bit, quality degradation becomes noticeable and the methods get complicated; for production work, 4-bit is usually the practical floor.
