Skip to main content
AI · MODEL FORMATS

What Is GGUF?

GGUF is the single-file model format used by llama.cpp and the tools built on it, such as Ollama and LM Studio. One GGUF file holds a model’s weights, usually quantized to between 2 and 8 bits, plus its architecture, tokenizer and settings. It replaced the older GGML formats in August 2023.

01

What GGUF is

GGUF is a binary file format for storing a model, usually a large language model, so that it can run with the ggml library and the inference engines built on it, chiefly llama.cpp. One GGUF file holds the model’s weights, most often quantized to between 2 and 8 bits, together with what is needed to run it: the architecture, the tokenizer, the chat template and settings such as the context length.

The format was created by Georgi Gerganov, the developer of llama.cpp, and arrived in llama.cpp through a pull request titled simply “GGUF”, merged on 21 August 2023. The ggml specification calls it the successor to the project’s earlier GGML, GGMF and GGJT formats, and Hugging Face describes it as optimized for quick loading and saving.

GGUF is now the usual way to share a model for running on a single machine. Many open-weight models are published as GGUF files alongside their original weights, by the maker or by the community.

02

Why GGUF replaced GGML

The older formats stored a model’s settings as a fixed list of numbers in a set order. Every new architecture or setting meant changing that layout, which broke existing files. The ggml specification names the key difference: GGUF uses a key-value structure for the hyperparameters, so new fields can be added without breaking files that do not use them.

The change was a clean break: the pull request warned that existing ggml model files had to be converted again. In return, GGUF keeps everything in one file and is built for mmap, which maps the file straight into memory instead of copying it, with data padded to a fixed alignment, 32 bytes by default.

03

What is inside a GGUF file

A GGUF file has four parts, in this order.

  • //
    Header. The four characters GGUF, the format version (currently 3, which added big-endian support) and counts of the tensors and metadata entries.
  • //
    Metadata. Key-value pairs such as general.architecture, llama.context_length, the tokenizer’s vocabulary and tokenizer.chat_template. A runtime reads these to rebuild the model without any other files.
  • //
    Tensor information. The name, shape, data type and position of every weight tensor.
  • //
    Tensor data. The weights themselves, each tensor aligned so it can be mapped into memory directly.
04

GGUF quantization types

Every tensor in a GGUF file records its own data type, so one file can mix precisions. The types llama.cpp uses fall into three groups. The original types, such as Q4_0 and Q8_0, split weights into blocks of 32 with one scale each. The K-quants, Q2_K to Q6_K, gather blocks into super-blocks of 256 weights with scales at both levels, and their S, M and L variants keep some tensors at higher precision. The I-quants use an importance matrix, measured on sample text, to decide where precision matters most.

Type Bits per weight Llama 3.1 8B file Typical use
F16 16.0 14.96 GB Reference copy and source for other types
Q8_0 8.50 7.95 GB Closest to the original where memory allows
Q6_K 6.56 6.14 GB Near-original quality in less memory
Q5_K_M 5.70 5.33 GB A safety margin above 4-bit
Q4_K_M 4.89 4.58 GB A common default for local use
IQ4_XS 4.46 4.17 GB Smaller 4-bit, built with an importance matrix
Q3_K_M 4.00 3.74 GB Tight memory, with some quality loss
Q2_K 3.16 2.95 GB Last resort; quality drops noticeably

Bits per weight and sizes come from llama.cpp’s quantize documentation for Llama 3.1 8B, in binary gigabytes; the typical uses are common practice, not llama.cpp guidance. Bits per weight run above the nominal figure because scales are stored too. The documentation notes that an importance matrix file can reduce the accuracy lost, and the specification now also defines MXFP4, the format of the expert weights in OpenAI’s gpt-oss, and NVIDIA’s NVFP4.

05

GGUF vs safetensors

Safetensors is the format most model makers use to publish weights on the Hugging Face Hub, which recommends it. It is tensor-only: the weights sit in one or more .safetensors files, usually at their original 16-bit precision, while the configuration and tokenizer live in separate files beside them. Hugging Face sums up the difference: unlike tensor-only formats, GGUF encodes both the tensors and a standardized set of metadata.

In practice, safetensors is the source and GGUF is a deployment copy. Transformers, vLLM and NVIDIA TensorRT-LLM start from safetensors checkpoints, while llama.cpp ships scripts that convert a Hugging Face checkpoint to GGUF and quantize it. Choose GGUF for llama.cpp-based tools, and keep the safetensors original for fine-tuning and for other runtimes.

06

Runtimes that load GGUF

GGUF began with llama.cpp, but several tools now read it.

  • //
    llama.cpp. The reference engine: a command-line tool and an OpenAI-compatible server that run GGUF models on CPUs and GPUs, including NVIDIA GPUs through CUDA.
  • //
    Ollama, LM Studio and GPT4All. Tools that Hugging Face lists for GGUF, each serving a downloaded model through a chat window or a local API.
  • //
    Hugging Face transformers. Loads GGUF files and, for most architectures, dequantizes them into an ordinary dense model, so the memory saving is lost.
  • //
    vLLM. Can load GGUF, but its documentation calls the support highly experimental and under-optimised, and recommends the original model’s tokenizer.
FAQ · 01
Which software runs a local LLM?
Most local models run on free, open-source runtimes. llama.cpp runs quantized GGUF models on CPUs and GPUs, including Jetson. Ollama and LM Studio wrap it in a chat window or local API, while vLLM and NVIDIA TensorRT-LLM serve many users on GPUs.
Read the full FAQ —
07

GGUF on Arm processors and Jetson

llama.cpp is written in C and C++ with few dependencies, so it builds for Arm as readily as for x86, and on Jetson its CUDA back end runs the model on the module’s GPU. Because the CPU and GPU share one memory on Jetson, the size of the GGUF file plus the cache for the chosen context is a good first estimate of the memory a model will take.

NVIDIA has shown llama.cpp on its own hardware: a March 2026 NVIDIA blog reports Nemotron 3 Nano 9B running at 9 tokens per second on a Jetson Orin Nano Super. That suits one user and small models on our Jetson Orin Nano computers. For several users at once, serving engines built for batching are the usual choice: vLLM, which NVIDIA uses for its Jetson LLM benchmarks, and TensorRT-LLM, which builds on NVIDIA’s TensorRT. Our NVIDIA Jetson comparison and module selector compares memory and measured speeds across the range.

08

Quick answers on GGUF

GGUF: common questions

What does GGUF stand for?

The specification does not say. The ggml documentation never spells out the name; it describes GGUF only as the successor to the GGML, GGMF and GGJT formats. Expansions found online are unofficial.

What is a GGUF model?

A model saved as one GGUF file. It is usually an open-weight model converted from its original safetensors release and quantized, ready to load in llama.cpp, Ollama or LM Studio.

Does vLLM support GGUF?

Yes, experimentally. vLLM loads GGUF files, but its documentation warns that the support is under-optimised and may not work with other features, so the original weights are the safer choice there.

Which GGUF quantization should I choose?

Start at Q4_K_M and test. Move up to Q5_K_M, Q6_K or Q8_0 if memory allows and quality matters, and down to IQ4_XS or Q3_K_M only when the model will not otherwise fit.

Can GGUF models run on a GPU?

Yes. llama.cpp can place some or all layers on NVIDIA, AMD or Apple GPUs, and on Jetson the whole model can run on the integrated GPU.

We supply Jetson and GPU systems for llama.cpp and other runtimes integrated as standard, with the memory and storage fitted and the operating system installed before they ship.