Running Models YourselfLesson 20 of 82

Module 3 · Quantisation and model formats

Inside a GGUF file

In this lesson

  • 8 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 2 of 9 in this chapter

This chapter’s goalChoose a quantisation format and bit rate for a stated model, machine and task; produce a quantised model yourself from the original weights; and measure the resulting damage with a method that can actually detect it, rather than relying on a perplexity delta that cannot.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

One file, everything in it

GGUF is the container format used by llama.cpp and everything built on it. Its design goal was simple: a single file that a program can open and run with no accompanying Python, no config directory, no tokeniser package, and no code execution.

The layout is: a magic number and version, then a key-value metadata section, then a tensor index, then the tensor data itself, aligned so it can be memory-mapped directly.

The metadata is the interesting part. It carries the architecture name, layer counts, head counts, rope parameters, the full tokeniser (vocabulary, merges, special token ids) and the chat template as a Jinja string. That is why llama-server -m model.gguf needs nothing else, and why a GGUF from 2024 still runs today.

Inspect it:

Bash
python3 llama.cpp/gguf-py/scripts/gguf_dump.py model.gguf --no-tensors

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Open Model Ecosystem exam.

Stuck on something?Ask Tri, your AI tutor

How to cite: Addaly (2026) ‘Inside a GGUF file’, in Running Models Yourself. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/running-models-yourself/inside-a-gguf-file (Accessed: 27 November 2026).