Skip to content

What is a GGUF file?

The file format behind every local model you have downloaded — and how to read its name.

By Fiqhro Dedhen3 min readEdited by Fiqhro Dedhen

GGUF is a file format for distributing models you run locally. If you have downloaded a model to run on your own machine, it was almost certainly a .gguf file.

It was created for the llama.cpp project, and because llama.cpp is the engine underneath Ollama and LM Studio, GGUF is effectively the standard container for local inference.

What it does

One file, everything inside: the weights, the tokenizer, the metadata, the architecture description. No separate config files, no directory of shards. Download one file, point a runner at it, done.

That sounds mundane. It is the entire reason local AI is approachable — the previous state of affairs was a directory of tensors plus config files plus a Python environment, and version mismatches everywhere.

It is also designed for memory mapping: the runner reads weights straight from disk rather than loading the whole file into RAM first. This is why a model can start answering almost immediately rather than after a two-minute load.

Reading the filename

This is the useful part, and nothing tells you it. A GGUF filename looks like:

model-name-7B-Q4_K_M.gguf

Broken down:

PartMeaning
7B7 billion parameters — the model's size
Q44-bit quantization — the main memory driver
KUses the "K-quant" method — better quality per bit than the older scheme
MSize within that class: S small, M medium, L large

So Q4_K_M means 4-bit, K-quant, medium — and it is the most common choice for good reason: it is the usual sweet spot between size and quality.

Rough guide to what the numbers cost you:

SuffixRoughlyUse when
Q8_08-bit, near-losslessYou have memory to spare
Q6_K6-bitQuality matters, memory is fine
Q5_K_M5-bitA good compromise
Q4_K_M4-bitThe default choice
Q3_K_M3-bitDesperate
Q2_K2-bitUsually not worth running

F16 or BF16 in a filename means not quantized at all — full size, and the reason a "small" 7B model can be a 14 GB download.

The one rule

Pick the largest model whose file fits in your memory with room to spare — and leave headroom, because the context window needs memory too, on top of the file size.

A 4-bit 13B model generally beats an 8-bit 7B model at the same memory budget. The number of parameters usually matters more than the precision they are stored at.

What we addedA decoder for GGUF filenames — the Q-numbers and letter suffixes that tell you the memory footprint, which no download page explains.

This article was researched and drafted with AI assistance from the sources listed below, then checked and edited by Fiqhro Dedhen before publication. How we work.

Sources

3 cited · 3 primary

  1. 1
    Primaryggml-org (GitHub)
    GGUF specification

    The format specification itself.

    github.com · accessed 17 Jul 2026

  2. 2
    PrimaryHugging Face
    GGUF

    Reference documentation on the format and its quantization naming.

    huggingface.co · accessed 17 Jul 2026

  3. 3
    Primaryggml-org (GitHub)
    llama.cpp

    The project the format was built for, and the engine most local runners use to read it.

    github.com · accessed 17 Jul 2026

Primary sources are the company, paper or repository itself. Reporting is established press, used to corroborate. Community is used to find stories, never to establish facts.