Learn AI Math

GGUF

Also called: GGUF Model

What is GGUF?

In one sentence: GGUF is a file format for storing AI models, especially quantized ones, made for llama.cpp and tools like Ollama and LM Studio.

A GGUF file packs a model's weights, tokenizer and settings into one file. It supports many quantization levels, from 2-bit to 8-bit and full precision. It replaced the older GGML format.

What does GGUF look like?

"llama-3-8b-instruct.Q4_K_M.gguf" is a GGUF file for a 4-bit Llama 3 model.

Why does GGUF matter?

GGUF is the most popular format for running models on your own computer.

GGUF vs. Safetensors

Safetensors is the standard safe format for sharing model weights on Hugging Face and serving them on GPUs, while GGUF packs (usually quantized) weights plus tokenizer and settings into one file built for local tools like llama.cpp and Ollama.

DimensionGGUFSafetensors
Primary ecosystemllama.cpp, Ollama, LM Studio (local devices)PyTorch, vLLM, Hugging Face (training & servers)
PackagingSingle self-contained file (weights + metadata)Weight shards alongside config/tokenizer JSONs
SecurityMemory-mappable binary format (no arbitrary code)Zero-copy safe format replacing unsafe pickle files

Last updated · Fact-checked by The AI Math

Linking to this page from a lesson or article?

Like this explanation? Get one every week.

The AI Math newsletter turns confusing AI news into plain English. No hype, no jargon walls.