AI Model Quantization Explained: Q4, Q5 and Q8 for Local AI

Neon-lit cube-shaped pedestals on a dark tiled floor, a general illustration for AI model quantization sizes

When you download a local AI model you see labels such as Q4_K_M, Q5_K_M or Q8_0. They describe quantization, which is a way to shrink a model so that it fits in less memory. This guide explains what the labels mean and how to choose one.

What is quantization?

An AI model is made of billions of numbers called weights. Normally each weight is stored with 16 bits of precision. Quantization stores each weight with fewer bits, such as 8 or 4. This is like rounding numbers: the file gets much smaller and uses less memory, and the answers lose a little quality.

What do the labels mean?

In the common GGUF format used by tools such as LM Studio and Ollama:

  • The number (Q4, Q5, Q8): roughly how many bits are used for each weight. A bigger number means higher quality and a bigger file.
  • The letters after it (such as K_M or K_S): the method and how the bits are mixed. S, M and L stand for small, medium and large versions of the same level.

A Q4_K_M model is a popular balance between size and quality.

How much memory do they need?

Real files use a little more than the number in the name, because each block of weights also stores scaling values. The llama.cpp project lists these approximate averages: Q4_K_M about 4.9 bits per weight, Q5_K_M about 5.7 and Q8_0 about 8.5. As a rough guide for the weights alone:

  • 16-bit: 2 bytes per parameter
  • Q8_0: about 1.06 bytes per parameter
  • Q5_K_M: about 0.7 bytes per parameter
  • Q4_K_M: about 0.6 bytes per parameter

For a 7B model, that is about 14 GB at 16-bit, 7 GB at Q8_0, 5 GB at Q5_K_M and 4 to 4.5 GB at Q4_K_M. You also need extra memory for the context, which grows with a longer context length. The exact numbers vary by model, so check the file size on the model's page. See how much VRAM you need.

How does quality change?

  • Q8: very close to the original model
  • Q5 and Q6: very close, with a smaller file
  • Q4: a small loss that is acceptable for many tasks
  • Q3 and Q2: a noticeable loss in quality, so use them only when nothing else fits

Quality loss depends on the model and the task, so it is worth testing with the questions you care about. A larger model at Q4 is often better than a smaller model at Q8, but this is a general tendency, not a rule.

Step-by-step: choose a quantization

Step 1: Check your VRAM

Open Task Manager > Performance > GPU and note the Dedicated GPU memory.

You should see: a figure such as 8.0 GB. If the GPU entry is missing or the figure is tiny, the model will run on the CPU and system RAM instead. See run local AI without a GPU.

Step 2: Start with Q4_K_M

Choose a Q4_K_M version of a model whose file size is comfortably smaller than your VRAM, leaving room for the context (a gap of 1 to 3 GB or more). For example, a 4.4 GB file suits an 8 GB card, while a 7.5 GB file does not.

Step 3: Move up if you have space

If the model fits with room to spare, try Q5 or Q6, or Q8, and compare the answers to the same questions.

Step 4: Move down or change the model if it does not fit

If the model will not load, runs out of memory or the PC becomes very slow, choose a lower quantization, a smaller model, or a shorter context length.

Step 5: Check that it runs on your GPU

Watch Task Manager while the model answers.

You should see: GPU activity and dedicated GPU memory in use. If the GPU is idle and the CPU is busy, the model is not using your graphics card: the file may be too big for VRAM, or the tool's GPU setting may be off or the graphics driver out of date. See how to run an AI model locally on Windows.

Does a lower quantization run faster?

Often yes, because a smaller model moves less data through memory, but the effect depends on your hardware and the software.

More help

For other PC problems, see the PC repair guides.

FAQ

Is Q4 good enough? For many everyday tasks, yes. Test it for yours.

Do I need an AI PC for this? Not necessarily. The GPU and its memory matter most. See what is an AI PC. For a check of your own machine, see whether your PC can run local AI models.

Can I quantize a model myself? Yes, with tools made for it, but most people download a model that is already quantized.