New Tool Radar

Local AI

How to Check Whether a Local Model Fits in RAM Before Downloading

Work out a model's size from its parameters and quantization before you download it.

Schematic illustration with three step boxes: Find the model size; Work out the fit; Check the free memory.

A model that does not fit in your RAM will not load, and the download is wasted. The size of a GGUF model follows a simple rule: size is about the parameter count times the bits per weight, divided by eight. This guide applies that rule to a model you are considering and checks it against your free memory.

Before you start

  • A terminal, and the model’s parameter count and quantization from its model card.
  • A way to check free memory: free -h on Linux, or Activity Monitor on macOS.
  • The model name you are considering, for example a Qwen3 8B Q4_K_M file.

Find the model size

Use the rule size in bytes is about parameters times bits per weight divided by eight. For quantization levels, Q4_K_M is about 4.85 bits per weight and Q8_0 is about 8.5 bits per weight. An 8B model at Q4_K_M is about 4.58 GB, and the same model at Q8_0 is about 7.96 GB. The model card or the download page usually lists the file size directly, which is the number to trust if it is there.

Work out the fit

Add the KV cache and the system to the model size: a long context adds gigabytes of cache, and the operating system needs several gigabytes of its own. As a rule, the model file should be no more than half of your total RAM if you want a comfortable run, and no more than three quarters if you accept a tight one.

Check the free memory

Check the free memory on your machine:

free -h

On macOS, use Activity Monitor. Compare the free figure with the model size plus the cache allowance. If the model does not fit, pick a smaller quantization or a smaller model before downloading anything.

Worked example

Worked example: a 16 GB laptop and an 8B model at Q4_K_M, about 4.58 GB. The model fits with room for the cache and the system. The same laptop with a 32B model at Q4_K_M, about 19 GB, does not fit: the file alone is larger than the free memory, so the download would be wasted.

Expected result

UNTESTED in this guide: no model was downloaded while writing it. The expected result is that the 8B Q4_K_M model is judged to fit on a 16 GB machine, and the 32B Q4_K_M model is judged not to fit.

Limitations

The rule is an estimate: the real file size depends on the exact quantization and the vocabulary, so check the published file size when it is listed. The KV cache grows with context length, so a model that fits for a short chat may not fit for a long one.

Sources

See all