What Is GGUF? Quantize a Model in 12 Steps, 70 Min Llama.cpp and ggml reached version 1.0.0 on November 13, 2026, adopting semantic versioning for the public C API and removing 35 deprecated C-API functions while adding FP8 key-value caches, according to coverage of the release. The GGUF format itself did not change, so existing GGUF files do not need to be downloaded again, and Ollama 0.30 added improved GGUF compatibility through llama.cpp. A walkthrough published alongside the coverage converts a small model to GGUF, inspects the file header, produces several quantized variants and scores each for quality and speed in about 70 minutes on a laptop. GGUF is the single-file model format that llama.cpp loads, and it carries the weights, the tokenizer and the settings together. Since llama.cpp and ggml reached version 1.0.0 on November 13, 2026 https://bmdpat.com/blog/llama-cpp-1-0-0-release-november-2026 , the format is also the safest thing to build around, because reporting on the release says the GGUF format itself did not change and existing files do not need to be downloaded again. That stability matters because most people meet GGUF as an unexplained filename suffix like Q4 K M and pick a download by guesswork. This walkthrough replaces the guesswork with a measured process. You will convert a small model to GGUF, open the file and read its header, produce several quantized variants, score each one for quality and speed, then load the winner into Ollama. The whole lab takes about 70 minutes on a laptop, and it answers the question behind the “what is GGUF” searches: what is in this file, and which version of it should I run? Ollama sits on top of the same engine. The company’s own post says its core product is a downloadable app for running open models locally with a simple API https://ollama.com/blog/all-aboard-open-models?from theconsensus=1 , and Ollama 0.30 added improved GGUF compatibility through llama.cpp. If you want the runtime trade-offs first, the comparison of llama.cpp and Ollama after the v1.0 release https://shattered.io/llama-cpp-vs-ollama-v1-0-free-vs-20-cloud-tier-2026/ lays them out. Here the goal is narrower: understand the file, shrink it safely, and prove the result with numbers from your own machine. Don't miss new tech stories on Google Add Shattered once in the Google app and our stories show up in your news suggestions. Add now https://www.google.com/preferences/source?hl=en&q=https%3A%2F%2Fshattered.io%2F What Is GGUF? The Format Behind Local LLMs GGUF is a binary container designed by the ggml project for storing language models. A single .gguf file holds three things: a short header, a block of key-value metadata, and the tensor data itself. The ggml project documents the layout in its gguf.md specification on GitHub https://github.com/ggml-org/ggml/blob/master/docs/gguf.md , and the design goal is plain. One file should be enough to load a model, with no sidecar configuration, no separate tokenizer download and no framework-specific checkpoint folder. Compare that with the Hugging Face safetensors layout, which spreads a model across weight shards, a config.json , tokenizer files and a generation config. A GGUF folds all of that into one artifact. The metadata block stores the architecture name, the context length, the number of layers and attention heads, the tokenizer vocabulary and the chat template. Because the file describes itself, a loader can memory-map it and start generating without guessing anything. The three parts of a GGUF file - Header: a magic number that spells GGUF, a format version, the tensor count and the metadata count. - Metadata: typed key-value pairs such as general.architecture , general.name , the context length, the tokenizer tokens and the chat template. - Tensor info and data: a table listing each tensor’s name, shape and quantization type, followed by the aligned tensor bytes. The tensor table is where quantization shows up. Each tensor carries its own type tag, so one file can mix precisions. Embedding and output layers often stay at higher precision while the bulky feed-forward layers drop to four bits. That per-tensor flexibility is why names like Q4 K M describe a recipe rather than a single bit width. You will see it directly in Step 6 when the inspector script prints the type counts. What changed with llama.cpp v1.0.0 The November 13, 2026 release moved both llama.cpp and ggml to 1.0.0 and adopted semantic versioning for the public C API. Coverage of the release says it removed 35 deprecated C-API functions, added FP8 key-value caches and introduced a mixture-of-experts weight cache. For this lab the practical takeaway is simple. The command-line tools used here sit above the C API, so the removals mainly hit people who link against libllama in their own code. Newer prerelease builds with names like b12649 keep appearing on the repository after v1.0.0, but those are prereleases. Pin the stable v1.0.0 tag so your results stay reproducible. Adoption explains why the details matter. In the 2025 Stack Overflow Developer Survey, the survey’s AI section reports that among developers building AI agents, Ollama is the most-used framework, reported by 51% of respondents https://survey.stackoverflow.co/2025/ai . Ollama says it now serves 8.9 million developers. Every one of those installs ends up reading GGUF files, whether the user knows it or not. Prerequisites: Hardware, Software and Versions The lab runs on Linux, macOS or Windows with WSL2. A GPU speeds up the benchmark steps but nothing requires one, because the demo model is small enough for a CPU. Budget about 10 GB of free disk for the source checkout, the F16 conversion, four quantized files and the build tree. | Component | Version to use | Why it matters | |---|---|---| | llama.cpp | Stable tag v1.0.0 November 13, 2026 | Reproducible tools. Prerelease b builds are newer by date but not stable. | | ggml | v1.0.0, built with llama.cpp | Ships in the same checkout, no separate install. | | Ollama | Latest release run ollama --version | Ollama 0.30 added broader GGUF compatibility, and later releases keep that path. | | Python | 3.10 or newer | Runs the inspector, the sweep runner and the report builder. | | Python packages | Latest gguf , requests , huggingface hub | The gguf package reads headers and requests calls the Ollama API. | | Build tools | Git, CMake, a C++17 compiler | Needed to compile the quantize, perplexity and bench binaries. | | Demo model | A small instruct model in safetensors form | Qwen3-0.6B is used below. Any small Hugging Face model works. | A note on versions. This guide names the stable llama.cpp tag because the project’s release page marks it that way. For Ollama and the Python packages it says “latest” on purpose, since release numbers shift weekly and the commands below do not depend on a specific build. Run each tool’s version flag after installing and paste the output into your lab notes so you can reproduce the run later. If you have never run a model locally, the walkthrough on running a Qwen3.8 model with llama.cpp https://shattered.io/run-llm-locally-qwen3-8-27b-llama-cpp-12-steps-2026/ covers the basics of loading and prompting. Everything in this lab builds on that foundation but focuses on the file rather than the chat. Time and disk budget Expect roughly 15 minutes for the build, 10 for the model download and conversion, 20 for the quantization sweep and perplexity runs, 10 for benchmarks and 15 for the Ollama steps and the report. A machine with a fast NVMe drive cuts the conversion time noticeably, because the F16 file is written once and then read by every quantize pass. Steps 1 to 3: Build llama.cpp v1.0.0 and Set Up the Lab The first three steps give you a pinned toolchain and a tidy folder, which pays off later when you compare six files that all look alike. Do not skip the tag checkout. A repository head that moves daily can change tool flags between your first run and your last. Step 1: Clone the repository and pin the stable tag mkdir -p ~/gguf-lab && cd ~/gguf-lab git clone https://github.com/ggml-org/llama.cpp cd llama.cpp git checkout v1.0.0 git describe --tags The last command should print v1.0.0 . If it prints a build number such as b12649 , you are on a prerelease and the checkout failed, so fetch tags with git fetch --tags and try again. Step 2: Compile the tools CPU-only build works everywhere cmake -B build cmake --build build --config Release -j 8 NVIDIA GPU build instead: cmake -B build -DGGML CUDA=ON Apple Silicon builds use Metal by default, no flag needed. ls build/bin | grep -E "llama- quantize|perplexity|bench|cli|imatrix " Expect five binaries in the listing: llama-quantize , llama-perplexity , llama-bench , llama-cli and llama-imatrix . The build takes 5 to 15 minutes depending on core count. Release binaries for several platforms also exist on the project’s release page, but building from the pinned tag guarantees the tools match the source you just checked out. Step 3: Create the Python environment and folder layout cd ~/gguf-lab python3 -m venv .venv source .venv/bin/activate pip install --upgrade pip pip install gguf requests huggingface hub Conversion script dependencies ship with llama.cpp ls llama.cpp/requirements pip install -r llama.cpp/requirements/requirements-convert hf to gguf.txt mkdir -p models gguf results calib The conversion requirements pull in a CPU build of PyTorch, which is a large download. If the requirements filename differs in your checkout, the ls line shows what is there. Your lab now has four folders: models for the original safetensors, gguf for every converted or quantized file, results for CSV output and calib for text used in quality tests. Steps 4 and 5: Download a Model and Convert It to an F16 GGUF Quantization always starts from the highest-precision GGUF you can produce, and that is the F16 conversion of the original weights. Think of it as your lossless master. Every smaller file in the lab derives from it, and every quality score compares back to it. Step 4: Download the source model python python - <<'EOF' from huggingface hub import snapshot download path = snapshot download repo id="Qwen/Qwen3-0.6B", local dir="models/qwen3-0.6b", print "saved to", path EOF ls -lh models/qwen3-0.6b You should see config.json , tokenizer files and one or more .safetensors shards. A 0.6-billion-parameter model is deliberately tiny. It converts in under a minute, quantizes in seconds and still shows every effect this lab measures. Once the workflow is clear, swap in a larger model by changing the repo ID. The same steps apply to an 8B or 27B model, only slower. For gated models you need a Hugging Face token and an accepted license, and the download call will fail with a 401 until you provide both. Step 5: Convert to an F16 GGUF python llama.cpp/convert hf to gguf.py models/qwen3-0.6b \ --outfile gguf/qwen3-0.6b-f16.gguf \ --outtype f16 ls -lh gguf/ The script reads the architecture from config.json , maps each tensor to its GGUF name, copies the tokenizer into the metadata block and writes one file. The log ends with a line reporting the written file size. Illustrative output looks like this, and your sizes will differ with the model you chose: INFO:hf-to-gguf:Loading model: qwen3-0.6b INFO:hf-to-gguf:gguf: This GGUF file is for Little Endian only INFO:hf-to-gguf:Exporting model... INFO:hf-to-gguf:Model successfully exported to gguf/qwen3-0.6b-f16.gguf The F16 file stores each weight in 16 bits, so a model with N billion parameters occupies roughly 2N gigabytes. That back-of-envelope rule explains why an 8B model needs about 16 GB at F16 before any context memory, and why quantization exists at all. If you later fine-tune with adapters, the guide to merging a LoRA adapter into a GGUF https://shattered.io/merge-lora-adapter-gguf-llama-cpp-ollama-12-steps/ picks up exactly where this conversion step leaves off. Two failure modes show up here more than any others. The first is a model architecture the converter does not know yet, which raises an error naming the unsupported class. The second is a missing tokenizer file, which stops the script before it writes anything. Both are covered in the troubleshooting section, so note the error text and move on if you hit either one. Step 6: Inspect the GGUF Header, Metadata and Tensors in Python Reading the file yourself is the fastest way to stop treating GGUF as a black box. The gguf Python package parses the header, exposes the metadata fields and lists every tensor with its type and shape. The script below prints a compact report and flags the details that bite later: the chat template, the context length and the mix of tensor types. python inspect gguf.py import sys from collections import Counter from gguf import GGUFReader SKIP PREFIXES = "tokenizer.ggml.tokens", "tokenizer.ggml.merges", "tokenizer.ggml.token type", "tokenizer.ggml.scores" def field value field : try: return field.contents except Exception: return "