AI glossary · Local AI
What is a GGUF file?
Also called: GGUF file, .gguf, GGUF format
Definition
GGUF is a single-file binary format from the ggml and llama.cpp project that stores a model’s weights together with everything needed to run them, such as its architecture, tokenizer and quantisation type.
Explained
How does a GGUF file work?
Because everything sits in one file, local runners such as Ollama, LM Studio and llama.cpp can load and memory-map it in one step. Our comparison of Ollama, LM Studio and llama.cpp shows how each one uses it.
GGUF replaced the project’s earlier GGML, GGMF and GGJT formats. A file starts with the magic bytes GGUF and a version number (currently 3), then metadata as key-value pairs (architecture, context length, tokenizer and so on), then a description of every tensor, then the tensor data itself. The layout can be memory-mapped, so models load quickly.
Models are usually trained in PyTorch and published as safetensors files. llama.cpp’s convert_hf_to_gguf.py turns them into a 16-bit GGUF, and llama-quantize makes the smaller quantised versions from it.
The file name ends with the encoding, so Qwen3-14B-Q4_K_M.gguf is Qwen3 14B at Q4_K_M. Very large models are split into shards named like -00001-of-00003.gguf. llama.cpp reads GGUF directly, LM Studio runs GGUF models with llama.cpp, and Ollama imports a GGUF file through a Modelfile with a FROM line.
Example
Qwen’s official GGUF files for Qwen3 14B
Qwen publishes Qwen3 14B as GGUF files at several quantisations, one file per level. We read their sizes from the Hugging Face API and compared them with our VRAM calculator’s weight estimate: every one is within 0.3%. The file is only the weights. Running it with an 8K context adds the KV cache and working space for the runtime.
| File | File size | Our weight estimate | Total at 8K context |
|---|---|---|---|
Qwen3-14B-Q4_K_M.gguf | 8.4 GB | 8.4 GB | 10.7 GB |
Qwen3-14B-Q5_K_M.gguf | 9.8 GB | 9.8 GB | 12.2 GB |
Qwen3-14B-Q6_K.gguf | 11.3 GB | 11.3 GB | 13.8 GB |
Qwen3-14B-Q8_0.gguf | 14.6 GB | 14.6 GB | 17.5 GB |
File sizes from the Hugging Face API (Qwen/Qwen3-14B-GGUF), 2026-10-11. Estimates: parameters × llama.cpp’s bits per weight; totals add an FP16 KV cache and overhead, batch 1. Model config fetched 2026-10-08. GB = 1,024³ bytes.
Cost and quality
Why does GGUF matter for running models locally?
GGUF is what most local tools download, and its name tells you the memory you need before you download it: the quantisation sets the file size, and the context you want adds the rest. Check the total against your VRAM.
One self-contained file also moves easily between tools: the same GGUF runs in llama.cpp and LM Studio, and Ollama can import it.
Don’t mix up
GGUF vs safetensors vs GGML: what’s the difference?
- GGUF vs safetensors
- Safetensors is the Hugging Face weights format that training frameworks save to, with the config and tokenizer in separate files. GGUF bundles all of it in one file, usually quantised, for runtimes built on ggml.
- GGUF vs GGML
- ggml is the tensor library that llama.cpp is built on. GGML was also the name of its older file format, which GGUF replaced, so a file described as a “GGML model” is the old format, not the library.
FAQ
Questions people ask
What does GGUF stand for?
The format’s own specification in the ggml repository never spells the letters out; it describes GGUF only as a file format for storing models for inference with ggml and runtimes built on it. Other sources expand the name in different ways, so treat any expansion as unofficial. What matters in practice is that GGUF is the successor to the older GGML, GGMF and GGJT formats.
Are GGUF models better than other formats?
Not better, just suited to a different job. GGUF packs quantised weights and the metadata needed to run them into one file that loads fast on CPUs, Apple Silicon and consumer GPUs. Safetensors usually holds full-precision weights for training or for GPU servers. A GGUF at Q4_K_M trades a little accuracy for a much smaller memory footprint.
How do I use a GGUF file?
Load it in a runner built on ggml. With llama.cpp you pass the file to llama-cli or llama-server with -m; LM Studio opens GGUF models from its model browser; in Ollama you write a Modelfile with FROM /path/to/file.gguf and run ollama create. Check the quantisation suffix first so the file fits your memory, using the VRAM calculator.
What is the difference between GGUF and vLLM?
They are different kinds of thing. GGUF is a file format for model weights; vLLM is a GPU inference server that normally loads Hugging Face checkpoints. vLLM can load GGUF files, but its own docs call that support highly experimental and under-optimised. In practice GGUF belongs to llama.cpp-based tools for local, single-user inference, while vLLM targets high-throughput serving.
Go deeper
Try it and read more
- Free toolGPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.
- Guide · 13 min readOllama vs LM Studio vs llama.cpp: which local LLM tool?Ollama vs LM Studio vs llama.cpp from their docs: install, GGUF and MLX, APIs and ports, GPU support, speed, multi-user limits, licences and which to pick.
- Guide · 15 min readHow much VRAM do you need to run an LLM locally?VRAM needed to run an LLM locally: 8B to 70B at Q4, Q8 and FP16, what fits on 8 to 80 GB GPUs, plus system RAM, context length and CPU offload.
Related