SabaKore

Home / Articles / AI guides

Running Quantized LLMs on a VPS: Choosing GGUF Models and Sizes

How quantization makes a model lighter, and how to choose one that fits in your VPS's memory. We cover the order of decisions: pick a size that fits first, then refine accuracy from there.

Ren, a junior infrastructure engineer

Ren

I keep seeing models labeled GGUF or Q4. What are those?
Procura, a cloud AI robot who explains

Procura

They're models that have gone through quantization, a process that makes them lighter. Instead of storing the original numbers at full precision, you store them at a rougher precision, which cuts the memory you need a lot. GGUF is the name of the format used to distribute those lighter models.

What exactly gets cut?

A model is made of a huge number of numbers. Quantization stops storing them at fine precision and rounds them to coarser steps. The meaning of the numbers doesn't change, but because the representation is less detailed, answer quality can drop slightly. Depending on how much you round, models come in levels such as Q8 and Q4.

  • The coarser the rounding, the less memory and disk space you need
  • The coarser the rounding, the more likely the answers are to lose accuracy
  • The same model is often distributed in several files at different quantization levels
Ren, a junior infrastructure engineer

Ren

If accuracy drops, wouldn't it be better not to quantize?
Procura, a cloud AI robot who explains

Procura

Without quantization, the model often won't fit in memory and won't even start. So the question isn't 'keep accuracy or quantize?' but 'how far do I need to quantize to fit on my VPS?' That's the order to think in.

The order of choosing

  • 1. Check your usable memory limit (leave room for other processes)
  • 2. Pick a file at a quantization level that fits within that limit
  • 3. Try it on your actual use case and check whether the answer quality is good enough
  • 4. If it isn't, try a larger model or a finer quantization
Procura, a cloud AI robot who explains

Procura

Don't aim for the most accurate option right away. Run something that fits first, then raise only the parts that fall short. That gets you to the specs you actually need with the least waste.

Choosing among the distributed files

Even for the same model, the quantization steps and how the files are made differ slightly between distributors. File names often carry a label like Q4_K_M: a smaller number means coarser quantization, and the trailing letters indicate finer differences in how the rounding is done. If it's hard to tell them apart, check the description on the download page and the experiences of people who have used the file.

  • The number in the file name is a rough guide to how coarse the quantization is
  • Even at the same coarseness, several variants may be distributed with different rounding methods
  • If you're trying this for the first time, start with the variant the distributor calls well balanced
Procura, a cloud AI robot who explains

Procura

When in doubt, don't start with extreme settings. Try a mid-range quantization first, then adjust for your use case. It looks like a detour, but it's usually the fastest way.

It affects disk space more than you'd expect

When we talk about quantization we tend to focus on memory, but don't forget disk space. If you keep downloading several quantizations of the same model while you compare them, each file may be only a few GB, but the total grows quickly. A VPS disk isn't unlimited, so get in the habit of deleting files once you've finished comparing.

  • Delete the previous quantization file each time you try a new one instead of piling them up
  • Keep only one or two final candidates for comparison
  • Check disk usage on the download destination now and then while you work
Ren, a junior infrastructure engineer

Ren

So fitting comes first, and tuning accuracy comes after.

Running a local LLM on a VPS?

The plan finder shows which plans have enough memory for a model, and Run AI on a VPS covers the steps.

This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.