Getting started with local LLMs: runtimes and quantization
To run an LLM on your own computer you only need three things: the model file, the program that runs it (the runtime), and how the file is shrunk (quantization).
1. The model file: GGUF
The most common local format is GGUF. It holds the model weights and tokenizer in one file that llama.cpp-family programs can read. On Hugging Face, look for repos whose name ends in -GGUF. If the model maker published one, that is the safest; otherwise use a widely used converter such as bartowski or unsloth. Do not download files of unknown origin.
2. Runtimes: what to run it with
| Tool | What it is | When to use it |
|---|---|---|
| llama.cpp | A set of command-line programs, including the benchmark tool llama-bench and a server (llama-server) | When you want fine control or want to measure speed. This site's measurements use llama.cpp. |
| Ollama | Install, then download and run a model with one command | When you want the quickest start |
| LM Studio | An app with a graphical interface: model search and chat in one place | When the command line is a barrier |
All three can handle GGUF files. The memory needed is about the same regardless of tool; speed differences depend on settings and versions, so this site does not yet compare tools. On a Mac there is also a separate format called MLX. This site's calculations are for GGUF.
3. Quantization: shrinking the file
Model weights normally use 16 bits per value; quantization shrinks them to about 4-8 bits to cut file size and memory, at the cost of a little accuracy. Letters such as Q4_K_M or Q8_0 in a file name show the method; a bigger number means more bits, a bigger file and closer to the original. The kinds (K-quants, i-quants, Unsloth Dynamic and so on) are explained under Method.
Here is how much the size changes in real files (Qwen3.5 9B, bartowski repo listing).
| Quantization | File size |
|---|---|
| Q4_K_M | 6.17 GB |
| Q5_K_M | 7.11 GB |
| Q6_K | 7.96 GB |
| Q8_0 | 9.80 GB |
- Many people start with Q4_K_M, which is generally regarded as a reasonable balance of size and quality.
- If you have spare memory, try Q5_K_M or Q6_K.
- How much quantization affects coding-agent success can differ by model; we plan to measure it per quantization and show it here. There are no measurements yet.
4. What sets speed: memory bandwidth
Every generated token requires reading the model weights once, so generation speed is governed more by how fast memory can deliver data (bandwidth) than by raw compute. That is why it matters most whether the whole model fits in graphics memory. If part spills into system RAM, that part is read at the slower RAM bandwidth and everything slows down. This site's calculator estimates speed on this principle.
5. Context length and the KV cache
The longer the conversation or task, the larger the memory that remembers earlier content (the KV cache). A longer context needs proportionally more memory, and how fast it grows varies a lot by model architecture. The KV cache can be stored as f16, q8_0 or q4_0. Change the context and KV type in the calculator to see how the "max context that fits" changes.
6. Mixture of experts (MoE)
A name with two numbers such as 30B-A3B marks a MoE model that has 30 billion parameters in total but uses only about 3 billion per token. The file is large but little is read per token, so it can be faster at the same bandwidth. The whole file still has to sit somewhere, in graphics memory or in RAM.
7. Where to start
- In the calculator, pick your hardware and choose a model that fits entirely in graphics memory with the context you need.
- Check the license column. If it is non-commercial, use it only for personal learning or research.
- Install Ollama or LM Studio and download the Q4_K_M of that model.
- Try a few questions with a short context (8k-16k).
- If memory is left over, raise the quantization or lengthen the context.
If you have an 8 GB graphics card, continue with the 8 GB coding-agent guide.
Runtime features and commands change between versions; check each program's official documentation.