liveBook · Manning

GGUF

As explained in LLMs in Production

GGUF is a model-file format designed to store quantized language models for efficient local loading and inference.

GGUF is a single-file model format for local loading and inference. It packages model information and tokenizer data, supports quantized weights, and lets C++ runtimes such as llama.cpp load models efficiently on CPUs and constrained devices. section 6.4 section 11.2

A practical GGUF workflow separates standardization from size reduction:

  • Convert a model from safetensors into one GGUF checkpoint that a compatible C++ runtime can interface with. section 11.2
  • Quantize the GGUF checkpoint when memory is limited; a 7B model in q4_K_M is described as slightly over 4 GB on disk. section 11.2
  • Remove or move the original model files after conversion when storage is tight, especially on a microSD card. section 11.2
  • Expect accessibility and portability from llama.cpp, while alternatives such as GPTQ may prioritize performance and require more effort. section 6.4

Raspberry Pi deployment

A Raspberry Pi can serve a quantized GGUF model to devices on a home network. The setup demonstrates local deployment constraints, but the result is slower, less efficient, and less accurate than an enterprise production system. section 11.0 section 11.2

$ python3 convert.py ./models/llava/ --skip-unknown

Use the conversion command to turn a downloaded model directory into a GGUF model before quantization. section 11.2

How LLMs in Production covers it

How deep it goes
Explains conversion, tokenizer packaging, file management, and q4_K_M quantization, but defers detailed quantized-format coverage.
Examples
Uses a converted LLaVA model, q4_K_M quantization, and a Raspberry Pi network service as practical examples.
What it assumes
Assumes a downloaded safetensors model and basic command-line access, while teaching the conversion and quantization workflow.
What you can do after
Build it from scratch by converting and quantizing a model for local service through llama.cpp.
How it connects
Connects GGUF with llama.cpp, safetensors, tokenizers, quantization, CPU inference, GPTQ, and LangChain.

Also explained in

Compare how 3 books explain GGUF →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.