A large language model in its original form is often much too big for a normal graphics card. And yet, people still run models like that at home. The trick is called quantization. In this lesson, you’ll learn what the mysterious abbreviations like fp16, Q4, or GGUF mean and what you should watch out for.
The basic idea: storing numbers more compactly
A model consists of billions of numbers, called parameters. Each number takes up space. The question is: how precisely does each number need to be stored?
A simple everyday example: the number pi is 3,14159265… and so on. For most purposes, 3.14 is enough. For a rough estimate, even 3 is enough. The fewer digits you remember, the less space you need. But the less precise it becomes too.
That’s exactly what quantization does. The numbers in the model are stored with less precision. That makes the file smaller, uses less VRAM, and often runs faster. The trade-off is some loss in quality.
The abbreviations: bits per number
Precision is given in bit. Eight bits make one byte. The more bits per number, the more precise—and the larger—the model.
- fp32 (32 bits): full precision. Used for training, almost never needed for home use.
- fp16 and bf16 (16 bits): half size. This is the usual format in which models are released. Each parameter uses 2 bytes.
- fp8 (8 bits): cut in half again, so about 1 byte per parameter. Very common for image models. Current graphics cards can sometimes compute especially fast with it.
- Q8, Q6, Q5, Q4, Q3, Q2: abbreviations for 8, 6, 5, 4, 3, or 2 bits per number. Typical for language models in the GGUF format.
By the way, “fp” stands for “floating point.”
Estimating the size
With this knowledge, you can roughly estimate how large a model is:
- A model with 8 billion parameters in fp16 needs about 16 GB (8 billion times 2 bytes).
- The same model in Q8 needs about half that.
- In Q4, it shrinks to roughly a quarter to a third of the fp16 size, so about 5 GB.
Tip: Rule of thumb for language models in Q4: billions of parameters times about 0.6 gives you the file size in GB. Add space for the context. For a more exact calculation, use our calculator.
These numbers are approximations. In many methods, some important parts of the model are stored more precisely than the rest. That’s why a Q4 file is usually a bit larger than exactly one quarter.
GGUF and other formats
GGUF is a file format for quantized language models. It comes from the llama.cpp project and is used by LM Studio, Ollama, and many other programs. A GGUF file contains the model and important extra information in a single file. That makes it very convenient for beginners.
In GGUF files, you’ll often see names like Q4_K_M or Q5_K_S. The number indicates the bit count. The letters after that describe the exact method and variant. “S”, “M”, and “L” stand for small, medium, and large variants of the same level. You don’t need to know the details to get started.
There are also other formats, such as safetensors for unquantized or fp8 models, which are especially common for image models in ComfyUI. Image models are now also available as GGUF, but ComfyUI needs an extension for that.
Important: Only download models from trusted sources. The safetensors format was developed in part because older formats could execute program code when loaded.
How much quality do you lose?
That’s the interesting question. The honest answer: it depends on the model and the task. As a rough guide that has proven itself in the community:
- Q8 is barely distinguishable from the original in everyday use.
- Q5 and Q6 are very close.
- Q4 is considered a good compromise and is the most common standard.
- Q3 and Q2 save a lot of space, but quality suffers noticeably. The model makes more errors, loses the thread, or writes more awkwardly.
Small models often suffer more from heavy quantization than large ones. That leads to another rule of thumb: a larger model in Q4 is often better than a smaller model in Q8 if both need the same amount of memory. But don’t take that as gospel. Try it yourself.
For image models, fp8 is usually a good compromise. More aggressively reduced variants can harm details, text in images, or fine structures.
Choosing the right file
On model pages, you’ll often find dozens of files for the same model. Here’s how to proceed:
- Check how much VRAM you have.
- Choose the largest quantization that still fits with a little room left for the context.
- If in doubt, start with Q4_K_M and then try higher or lower.
You can find recommendations for common models on our models page.
The key points
- Quantization stores a model’s numbers with less precision so it becomes smaller.
- fp16 needs 2 bytes per parameter, fp8 about 1 byte, Q4 roughly half a byte and a bit more.
- GGUF is the standard file format for quantized language models.
- Q4 is a good compromise. Below Q4, quality usually drops noticeably.
- It’s often better to slightly shrink a larger model than to use a small model uncompressed—but test it.