Topic 2 of 6 · 5 min read
GGUF, GPTQ, AWQ and MLX file formats
Goal: Match a quantized model file to the runners that can load it from its name and format.
A quantized model is only useful if your runner can load its format, and the file name and repository usually tell you both the format and the bit level.
Check yourself · 1 of 3
Which runner loads a single .gguf file?
Why it matters
"4-bit" is not one thing. Several formats exist, each built for a different runner and hardware. Downloading the wrong one wastes tens of gigabytes and an evening. Knowing the families lets you pick the right file on the first try.
The main formats
| Format | Typical file | Loaded by | Runs on |
|---|---|---|---|
| GGUF | one .gguf file |
llama.cpp, Ollama, LM Studio, llama-server | CPU, GPU, Apple silicon, mixed CPU and GPU |
| GPTQ | .safetensors plus config files |
vLLM, Transformers, TGI | NVIDIA GPUs mainly |
| AWQ | .safetensors plus config files |
vLLM, Transformers, TGI | GPUs |
| MLX | folder of .safetensors |
mlx-lm, LM Studio (Mac) | Apple silicon |
| bitsandbytes | quantized on load from the original weights | Transformers | NVIDIA GPUs |
GGUF packs weights, tokenizer and metadata into one file. Because it supports offloading some layers to the GPU and the rest to the CPU, it is the usual choice for laptops and mixed hardware.
GPTQ and AWQ are post-training methods that pick rounding using sample data. AWQ protects the weights that matter most for activations. Both are common for GPU serving, where a server such as vLLM loads them.
MLX weights are converted for Apple's MLX framework and use unified memory.
Reading a name
A Hugging Face repository name often carries the facts:
Qwen2.5-7B-Instruct-GGUF format: GGUF
Qwen2.5-7B-Instruct-Q4_K_M.gguf quant type: Q4_K_M (4-bit K-quant, medium)
Llama-3.1-8B-Instruct-AWQ format: AWQ, 4-bit
Mistral-7B-Instruct-v0.3-4bit MLX naming: 4-bit, for mlx-lm
In GGUF names, Q plus a number is the bit width, K marks the K-quant family, and S, M, L are small, medium and large mixes. IQ marks i-quants. F16 and BF16 are unquantized.
Also check the base: Instruct or chat for assistants, a plain name for a base model.
Before and after
Before: "I will download the GPTQ version because it is 4-bit, then open it in Ollama." Ollama loads GGUF, so it fails. After: pick the GGUF repository for Ollama, or use the AWQ repository with vLLM.
What goes wrong
- Downloading a format the runner does not support, or a quantizer version it is too old to read.
- Trusting a random uploader. Anyone can publish a quant; prefer the model maker or well-known quantizers and read the model card.
- Treating all "4-bit" files as equal. A GGUF Q4_K_M, an AWQ and a GPTQ file differ in size and in quality.
Examples
Ollama on a laptop
Ollama and LM Studio load GGUF. Search the Hub for the model name plus GGUF and pick a Q4_K_M or Q5_K_M file that fits your memory.
vLLM on one GPU
vLLM reads AWQ and GPTQ folders directly. A GGUF file is possible but experimental in some versions, so prefer the AWQ repository.
Key points
- GGUF is one file for llama.cpp-family runners and supports mixed CPU and GPU use.
- GPTQ and AWQ are GPU formats loaded by servers such as vLLM and by Transformers.
- MLX is the format for Apple silicon through mlx-lm.
- In a GGUF name, Q plus a number is the bit width and K, S, M, L, IQ describe the scheme and mix.
- Always check the runner's supported formats before downloading a large file.
Common mistakes
- Choosing by bit count alone and ignoring the format.
- Downloading an Instruct-less base file for a chat use case.
- Trusting an unknown uploader's quant without checking the model card.
Check yourself · 2 of 3
A file is named Mistral-7B-Instruct-Q5_K_M.gguf. What does the name tell you?
Check yourself · 3 of 3
You serve one model to many users on NVIDIA GPUs with vLLM. Which file format fits best?
Practice items, not counted towards your mastery.
Start here
- Quantization overview (Hugging Face Transformers docs) (opens in a new tab)DocsFree
Hugging Face's comparison of quantization methods (GPTQ, AWQ, bitsandbytes and others) and what each supports.
- llama.cpp quantize tool (opens in a new tab)DocsFree
The official list of quant types, the importance-matrix option and the llama-quantize command line.
- GGUF on the Hugging Face Hub (opens in a new tab)DocsFree
What the GGUF file format holds and how the Hub shows quant types for a repository.
More for this topic
- MLX-LM (opens in a new tab)ToolFree
The MLX package for running and quantizing models on Apple silicon, with its convert command.