GGUF: The King of Local Hardware and CPU Offload

GGUF (formerly GGML) is the quantization format designed for maximum compatibility and flexibility, especially on consumer hardware. Its primary advantage lies in its ability to run models across various hardware, including CPUs, with intelligent offloading to GPUs. This makes it the go-to choice for users without high-end dedicated GPUs. GGUF supports a wide range of quantization levels, from 2-bit to 8-bit, and even 16-bit floating point, allowing fine-grained control over the VRAM/RAM trade-off. The format is developed and maintained by the `ggerganov` team, known for projects like `llama.cpp`. This active development means GGUF is constantly improving, with new quantization methods and optimizations being added regularly.

When you encounter a GGUF model, you'll notice filenames often include the quantization level (e.g., `q4_K_M`, `q5_K_S`). These suffixes denote specific quantization schemes that balance file size, speed, and accuracy. For instance, `q4_K_M` typically offers a good balance for 4-bit quantization, while `q5_K_S` might provide slightly better quality at a marginally larger size.

GGUF's strength is its CPU offload capability. If your GPU VRAM is insufficient to hold the entire model, GGUF allows you to load parts of the model onto your CPU's RAM. This significantly expands the range of models you can run on your machine, albeit with a performance hit compared to a full GPU offload. The speed of GGUF inference is highly dependent on the hardware configuration, but for CPU-bound scenarios or mixed CPU/GPU setups, it often outperforms other formats.

The ecosystem around GGUF is robust, with tools like `llama.cpp`, `ollama`, and various front-ends making it easy to download and run GGUF models. Generating GGUF files typically involves converting a base model (like one from Hugging Face) using scripts provided within the `llama.cpp` repository. This process can be resource-intensive, requiring significant RAM, but it's a one-time cost to get a highly portable model file.

Diagram comparing GGUF's CPU and GPU offload capabilities.

GPTQ: Optimized for GPU Inference Speed

GPTQ (Generative Pre-trained Transformer Quantization) is a post-training quantization (PTQ) method specifically designed to minimize the accuracy loss when quantizing LLMs to low bitrates, typically 4-bit. Developed by the `IST-DASLab` research group, GPTQ focuses on optimizing weights to achieve better performance on GPUs. Unlike GGUF's broad hardware approach, GPTQ is heavily optimized for NVIDIA GPUs, leveraging their CUDA cores for maximum throughput.

The core idea behind GPTQ is to quantize weights layer by layer, using calibration data to adjust the quantization parameters for each layer. This process is more computationally intensive during model conversion than some simpler quantization methods, but it results in models that are faster at inference time when run on compatible hardware. GPTQ models typically achieve higher tokens-per-second rates than GGUF on GPUs because they are more tightly integrated with GPU architectures and avoid CPU bottlenecks.

When choosing a GPTQ model, you'll often see filenames indicating the quantization group size (e.g., `4bit-128g`, `4bit-64g`). The group size refers to how weights are grouped together for quantization. Smaller group sizes (like 32g or 64g) generally preserve more accuracy but can lead to slightly larger file sizes and potentially slower inference compared to larger group sizes (like 128g), which are more aggressive in compression.

The primary drawback of GPTQ is its limited flexibility. It's primarily designed for GPU inference and doesn't offer the same level of CPU offloading or cross-platform compatibility as GGUF. If your setup lacks a powerful NVIDIA GPU or if you need to run models on less common hardware, GPTQ might not be the best fit. However, for users with compatible GPUs looking for the fastest possible inference speeds, GPTQ is a strong contender.

AWQ: Advanced Quantization for Speed and Accuracy

AWQ (Activation-aware Weight Quantization) is another advanced quantization technique that aims to strike a balance between speed and accuracy, often outperforming GPTQ in certain scenarios. Developed by researchers at UC Berkeley, AWS, and Microsoft, AWQ focuses on identifying and protecting salient weights that are crucial for model performance. It does this by analyzing activation data to understand which weights are most important and then applying quantization more carefully to these critical weights, while quantizing less important weights more aggressively.

This