Two formats, two jobs
Safetensors is the format of storage and training frameworks; GGUF is the format of local inference runtimes. It rose with llama.cpp-style engines: one file that bundles architecture metadata, tokenizer, and quantized tensors so a single loader on a laptop can run models that would not fit in RAM at full precision. If safetensors is the archival master, GGUF is the portable copy — and confusing the two roles is where most fidelity mistakes enter an archive.
A GGUF file is self-describing: it carries its own metadata KV block (architecture, context parameters, general alignment) plus the tensor data. Quantized tensors are stored in block schemes rather than plain dtype arrays — the famous Q4_K_M style rungs — where groups of weights share computed scale factors. That is the mechanism of the size savings: fewer effective bits per weight, with correction terms engineered to spend the saved budget where it hurts least.
Reading the ladder honestly
The rungs are not marketing; they are real engineering trade points between size and fidelity:
- F16/BF16 (16-bit) — the reference; when the master itself is 16-bit, this rung is the master. A downcast from an FP32 master trims the low bits, which is exactly why lesson 04 counts downcasts as derivatives.
- Q8_0 (≈8.5-bit effective) — very close to the reference in output quality; roughly half the size. The conservative rung.
- Q6_K — the pragmatic sweet spot many runtimes recommend; small quality concession for meaningful size savings.
- Q5_K_M / Q4_K_M — the workhorse rungs of local inference; visible but usually acceptable degradation, big size wins, fits models onto ordinary hardware.
- Q3 and below, and the tiny -S variants — specialist territory; quality costs become case-by-case and task-dependent.
Two honest caveats. First, degradation is task-shaped: a quantized model can hold up fine on casual chat and lose measurable ability on edge-case reasoning, code, or minority languages — benchmark your actual workload, not vibes. Second, rungs do not compose: converting a Q4 file to Q8 does not restore anything; you get a bigger container for already-lost information. The ladder's information flows downhill only.
Inspecting a GGUF without running it
Like safetensors, GGUF is inspectable without loading: the header and metadata are readable, and the tensor inventory (with quantization types per tensor) is right there. Runtimes ship inspector commands for exactly this — use one before trusting a file, and note what precision the file actually carries versus what its filename claims.