Skip to content
Skip to lesson
Back to Topics
LearnGPU Systems & LLM InferenceModel Quantization: GPTQ, AWQ & GGUF
HardInference Optimization14 min read

Model Quantization: GPTQ, AWQ & GGUF

Four-bit codes can shrink a 54 GB weight payload toward 14 GB. Learn how quantization methods, tensor encodings, and runtime support determine the result.

On this page

A 27-billion-parameter model needs 54 GB just to store its BF16 weights, far too large for a single 24 GB GPU. Pack those weights into 4-bit integer codes and the raw payload drops to 13.5 GB (13.922 GB with one FP16 scale per 128 weights, or 12.966 GiB), bringing a 24 GB card into play once you budget remaining VRAM for preserved FP16 tensors, KV cache, and workspace. You quantize the model, see perplexity barely move, and ship; two weeks later a tool integration starts breaking because fluent prose now hides malformed JSON arguments. (On real checkpoints such as Qwen3.6-27B, which also carries a vision encoder and hybrid recurrent/attention layers, always inspect the actual tensor inventory rather than multiplying the headline parameter count by 0.5 bytes.[1])

Three names dominate every quantization discussion, and engineers routinely mix their categories:

  • and are algorithms for choosing good low-bit codes (GPTQ via Hessian error compensation; AWQ via activation-aware channel scaling).
  • is a binary container format (from llama.cpp) that bundles metadata, tokenizer tables, and typed tensor blocks for local execution.

Quantizing static weights cuts storage and decode memory traffic, while leaving activations and the untouched unless you quantize them separately.

From floating-point values to four-bit codes

Suppose a weight is 0.730.73 and each integer step represents 0.10.1. Dividing gives 7.37.3, rounding stores integer code 77, and multiplying back reconstructs 0.70.7 with rounding error 0.030.03. A general affine quantizer formalizes this with a positive scale SS and integer zero-point ZZ:

q=clip⁡(⌊wS⌉+Z,qmin⁡,qmax⁡),w^=S⋅(q−Z)q = \operatorname{clip}\left(\left\lfloor \frac{w}{S} \right\rceil + Z, q_{\min}, q_{\max}\right), \qquad \hat{w} = S \cdot (q - Z)

Scale SS sets the spacing between representable marks, while ZZ maps real zero to an integer code. Stretching SS to cover an outlier coarsens every ordinary weight; shrinking SS clips extreme values. To actually save RAM, you also have to pack those 4-bit codes two nibbles per byte (here using a symmetric signed [−7,7][-7, 7] range):

pack-int4.py
import struct

def encode(weights):
    scale = (max(abs(w) for w in weights) / 7) or 1.0
    codes = [max(-7, min(7, round(w / scale))) for w in weights]
    nibbles = [q & 15 for q in codes]
    if len(nibbles) % 2:
        nibbles.append(0)
    payload = bytes(nibbles[i] | (nibbles[i + 1] << 4) for i in range(0, len(nibbles), 2))
    return struct.pack("<Id", len(weights), scale) + payload

def decode(blob):
    count, scale = struct.unpack("<Id", blob[:12])
    codes = []
    for byte in blob[12:]:
        for n in (byte & 15, byte >> 4):
            codes.append(n - 16 if n >= 8 else n)
    codes = codes[:count]
    return codes, [q * scale for q in codes]

weights = [0.15, -1.22, 2.40, -0.45, 0.73]
blob = encode(weights)
codes, restored = decode(blob)
mae = sum(abs(w - r) for w, r in zip(weights, restored)) / len(weights)
print("codes:", codes, "payload:", blob[12:].hex(), f"({len(blob) - 12}B codes, {len(blob)}B total)")
print("restored:", [round(w, 3) for w in restored], "MAE:", round(mae, 3))
Output
codes: [0, -4, 7, -1, 2] payload: c0f702 (3B codes, 15B total)
restored: [0.0, -1.371, 2.4, -0.343, 0.686] MAE: 0.091
A shared signed INT4 grid maps five weights to codes [0, −4, 7, −1, 2]. The codes pack low nibble first into bytes C0, F7, and 02, with a zero high-nibble pad in the last byte. Decoding uses scale 2.4/7 and gives mean absolute error 0.091; the count and FP64 scale add a 12-byte header.
Five weights snap to signed INT4 codes and pack low-nibble-first into three bytes (`c0f702`) alongside the scale metadata.

Symmetric, asymmetric, and per-group grids

  • Symmetric (Z=0Z = 0): w^=S⋅q\hat{w} = S \cdot q with S=max⁡(∣w∣)/qmax⁡S = \max(|w|) / q_{\max}. No zero-point subtraction during dequantization.
  • Asymmetric (Z≠0Z \ne 0): Covers an uneven interval [a,b][a, b] containing zero with S=(b−a)/(qmax⁡−qmin⁡)S = (b - a)/(q_{\max} - q_{\min}) and Z=clip⁡(qmin⁡−⌊a/S⌉,qmin⁡,qmax⁡)Z = \operatorname{clip}(q_{\min} - \lfloor a / S \rceil, q_{\min}, q_{\max}). Useful for skewed weights and nonnegative ReLU outputs (note that SiLU takes negative values). Both GPTQ and AWQ commonly support asymmetric grids with zero-points.[2][3]
  • Granularity (per-tensor vs. per-channel vs. per-group): Sharing one scale across a whole tensor lets one outlier crush precision everywhere. Per-group quantization assigns a fresh scale every gg weights (typically g=128g = 128), isolating outliers for just 16/128=0.12516 / 128 = 0.125 extra bits per weight (4.125 bpw4.125\text{ bpw} total). Remember that group scales belong inside the dot-product sum: each group scales its own partial sum!
affine-range.py
low, high = -1.0, 2.0
scale = (high - low) / 15
z_unsigned = round(-low / scale)
z_signed = -8 - round(low / scale)
values = [-2.0, -1.0, 0.0, 0.73, 2.0, 3.0]
u_codes = [max(0, min(15, round(w / scale) + z_unsigned)) for w in values]
restored = [round(scale * (q - z_unsigned), 2) for q in u_codes]
print(f"unsigned Z={z_unsigned}, signed Z={z_signed}")
print("codes:", u_codes, "-> restored:", restored)
Output
unsigned Z=5, signed Z=-3
codes: [0, 0, 5, 9, 15, 15] -> restored: [-1.0, -1.0, 0.0, 0.8, 2.0, 2.0]
An affine grid over real values from minus 1 to 2 uses scale 0.2 and zero code 5; the signed representation uses zero code minus 3. Values minus 2, minus 1, 0, 0.73, 2, and 3 map to restored values minus 1, minus 1, 0, 0.8, 2, and 2. Sixteen unsigned codes remain available. At the bottom, two weight groups retain separate scales through their partial sums.
An affine grid maps real zero to code 5 (unsigned) or −3 (signed), while per-group scales multiply each group's partial sum separately.

Why 4-bit weights speed up decode (W4A16)

Why compress weights to 4 bits if activations stay in 16-bit floating point? During low-batch decode, linear layers run at I≈2/bytes per weightI \approx 2 / \text{bytes per weight}: just 1 FLOP/byte in BF16, barely 0.65%0.65\% of an A100 80GB SXM's 312 dense FP16 TFLOPS compute peak (2,039 GB/s HBM, ridge point 153 FLOPs/byte).[4]

W4A16 cuts HBM weight traffic roughly 4×4\times by reading packed 4-bit codes and unpacking them inside a fused kernel right before the FP16 multiply-accumulate, avoiding writing an expanded FP16 matrix back to HBM.[5] Without fusion, a standalone dequantization pass gives away most of that bandwidth gain (on Ascend 910, where unpacking and multiplication communicate through global memory, W4A16 reached at most 1.48×1.48\times over FP16).[6] When prompts are long (prefill) or batches grow large, weight traffic stops dominating; accelerating compute then requires quantizing activations too, via integer W8A8 with SmoothQuant outlier migration[7] or native FP8.[8] Keep KV cache precision (such as FP8 KV cache in vLLM[9]) distinct from weight precision: quantizing weights does not shrink any user's KV cache, though shrinking 54 GB of BF16 weights to 13.92 GB on an 80 GB card (with an 8 GB reserve) expands the remaining KV pool 3.2×3.2\times from 18 GB to 58.08 GB (raising 5,120-token capacity from 53 to 173 users, or 36 to 119 including recurrent state).

Two decode data paths show packed INT4 weights read from HBM into a fused unpack, rescale, and FP16 multiply, alongside a standalone dequantization path that writes a full FP16 matrix to HBM and reads it again. The simplified weight-read comparison is 2 bytes per BF16 weight versus 0.5 code bytes plus scale metadata. The A100 roofline values give a ridge of about 153 FLOPs per byte; intensity one reaches 0.65 percent of nominal FP16 peak. KV-cache storage remains a separate budget.
Fused W4A16 kernels unpack 4-bit codes in registers near the multiplier; standalone dequantization wastes HBM bandwidth writing and rereading FP16 weights.
On one 0 to 60 GB scale, a 27-billion-weight payload falls from 54 GB at BF16 to 27 GB at INT8, 13.5 GB of INT4 codes plus 0.421875 GB of group scales, and 10.125 GB of INT3 codes plus the same scales. The 24 GB line leaves other allocations to budget. One 128-weight INT4 group stores 64 code bytes and a 2-byte FP16 scale, totaling 4.125 bits per weight.
A 27B weight payload drops from 54 GB (BF16) to 13.92 GB (INT4 + g=128 FP16 scales), fitting comfortably inside a 24 GB card's total envelope once KV and workspace are budgeted.

GPTQ: Hessian-aware error compensation

Naive round-to-nearest treats every weight equally. In reality, weights multiply activations X∈Rd×nX \in \mathbb{R}^{d \times n}, so an error of 0.050.05 on a high-energy channel damages layer outputs far more than on a quiet channel. GPTQ[2] directly minimizes layer output reconstruction error:

min⁡W^∥WX−W^X∥F2=∑i=1m12eiHeiT,H=2XXT\min_{\hat{W}} \| W X - \hat{W} X \|_F^2 = \sum_{i=1}^m \frac{1}{2} e_i H e_i^T, \qquad H = 2 X X^T

After rounding column qq to w^q\hat{w}_q, GPTQ compensates the still-unquantized columns FF using the active Hessian inverse K=(HA,A)−1K = (H_{A, A})^{-1}:

ΔwF=−wq−w^qKqqKF,q\Delta w_F = -\frac{w_q - \hat{w}_q}{K_{qq}} K_{F, q}

To avoid O(d4)O(d^4) repeated inversions, GPTQ adds diagonal damping (H+λIH + \lambda I, typically 1% of mean diagonal), computes a single upper Cholesky factor UU where (H+λI)−1=UTU(H + \lambda I)^{-1} = U^T U, and batches deferred updates in 128-column blocks.[10] Sorting columns by descending diagonal energy HjjH_{jj} (act-order / desc_act) quantizes high-energy channels first while the most free weights remain to absorb their error. (In Hugging Face Transformers, modern GPTQ tooling uses gptqmodel rather than legacy AutoGPTQ.[11])

Watch both the power and the risk of Hessian compensation on two weights: compensation cuts calibration error, yet can worsen error on an out-of-distribution input!

hessian-compensation.py
import numpy as np

w = np.array([1.2, 0.61])
X = np.array([[5.0, 4.0], [1.0, 1.0]])
H_inv = np.linalg.inv(2 * X @ X.T)

q0 = np.rint(w[0])
updated = w - (w[0] - q0) / H_inv[0, 0] * H_inv[:, 0]
naive = np.rint(w)
compensated = np.array([q0, np.rint(updated[1])])

err = lambda cand, inp: float(np.sum(((w - cand) @ inp) ** 2))
print("Compensated continuous w:", np.round(updated, 3).tolist(), "-> rounded:", compensated.tolist())
print(f"Calibration SSE: naive={err(naive, X):.3f}, compensated={err(compensated, X):.3f}")
print(f"Held-out I SSE:  naive={err(naive, np.eye(2)):.3f}, compensated={err(compensated, np.eye(2)):.3f}")
Output
Compensated continuous w: [1.0, 1.51] -> rounded: [1.0, 2.0]
Calibration SSE: naive=0.540, compensated=0.500
Held-out I SSE:  naive=0.192, compensated=1.972
In the weight plane, fixed calibration inputs make the SSE contours elongated along correlated weight changes. Rounding w₀ from 1.2 to 1 and compensating the still-free w₁ moves it from 0.61 to 1.51, then GPTQ rounds it to 2. Calibration outputs are [6.61, 5.41] before rounding, [6, 5] after independent rounding, and [7, 6] after compensation. Calibration SSE falls from 0.5402 to 0.5002; held-out identity SSE rises from 0.1921 to 1.9721.
GPTQ shifts unquantized w1w_1 from 0.61 to 1.51 (rounding to 2) to cancel w0w_0's rounding error along calibration contours; mismatched inputs expose the risk of calibration drift.

AWQ: activation-aware channel scaling

Instead of compensating after rounding, AWQ[12] protects salient channels before rounding by rescaling coordinates. It ranks input channels by average absolute activation magnitude sX,j=1N∑k∣Xj,k∣s_{X, j} = \frac{1}{N} \sum_k |X_{j, k}| and inserts an identity pair D=diag⁡(s)D = \operatorname{diag}(s):

WX=(WD)(D−1X)⟹Q(WD)D−1XW X = (W D)(D^{-1} X) \quad \Longrightarrow \quad Q(W D) D^{-1} X

Multiplying a salient weight column by sj>1s_j > 1 gives it finer effective step size S/sjS / s_j, while D−1D^{-1} fuses into the preceding LayerNorm or linear layer so serving stays uniform 4-bit.[13] Scaling too aggressively widens the group's dynamic range and hurts neighboring channels, so AWQ grid-searches s=sXαs = s_X^\alpha over α∈[0,1]\alpha \in [0, 1] (typically 20 steps) to minimize layer output MSE, followed by clipping. (For modern AWQ export and serving, check maintained stacks such as vLLM's LLM Compressor rather than unmaintained legacy packages.[14][3])

activation-aware-scaling.py
W = np.array([[0.3, 2.0]])
cal = np.array([[10.0, 8.0, -10.0, -8.0], [1.0, -1.0, 1.0, -1.0]])
held = np.array([[9.0, -9.0], [0.5, -0.5]])

def quantize_scaled(factor):
    a = np.array([factor, 1.0])
    scaled = W * a
    step = float(np.max(np.abs(scaled))) / 7
    return np.clip(np.rint(scaled / step), -7, 7) * step / a

mse = lambda cand, X: float(np.mean(((W - cand) @ X) ** 2))
for f in (1, 2, 4, 8):
    cand = quantize_scaled(f)
    print(f"scale={f}: cal MSE={mse(cand, cal):.6f}, held-out MSE={mse(cand, held):.6f}")
Output
scale=1: cal MSE=0.016735, held-out MSE=0.016531
scale=2: cal MSE=0.016735, held-out MSE=0.016531
scale=4: cal MSE=0.016735, held-out MSE=0.016531
scale=8: cal MSE=0.003265, held-out MSE=0.000816
For W = [0.3, 2], the selected AWQ channel transform uses D = diag(8, 1), so W times D is [2.4, 2] and the first activation row divides by 8. Each calibration column keeps the same product sum [5, 0.4, minus 1, minus 4.4] before rounding. Factors 1, 2, and 4 reconstruct the first weight as 2/7; factor 8 reconstructs it as 0.3 and moves the neighbor to 2.0571429. Calibration MSE falls to 0.003265 and held-out MSE is 0.000816 across the four-factor sweep.
Scaling channel 0 by 8×8\times snaps high-activation weight 0.3 onto an exact grid mark, trading a small shift on low-activation neighbor 2.0 for a 5×5\times drop in output MSE.

GGUF containers, k-quants, and CPU-GPU offloading

GGUF[15][16] is the self-describing binary format used by llama.cpp, packing architecture metadata, tokenizer tables, chat templates, and 32-byte-aligned tensor blocks into one memory-mappable file (plus a separate mmproj file for multimodal vision encoders[17]).

Its hierarchical k-quant blocks show why "4-bit" rarely means 4.0 bits per weight: a Q4_K super-block holds 256 weights in 8 sub-blocks of 32, taking 128 code bytes + 12 packed bytes of 6-bit local scales/mins + 4 bytes for two FP16 super-scales = 144 bytes (4.5 bits/weight), reconstructing weights as dsiq−dmin⁡mid s_i q - d_{\min} m_i.[18] A preset like Q4_K_M uses Q4_K for most tensors while keeping sensitive value/down projections at Q6_K.[19]

A GGUF file lays out a header, typed key-value metadata, tensor descriptors containing names, shapes, types, and offsets, then aligned tensor payloads. The enlarged Q4_K superblock contains 256 weights in eight groups of 32, 128 code bytes, 12 packed bytes for eight six-bit scale and minimum pairs, and two FP16 super-scales totaling four bytes. The complete 144-byte block stores 4.5 bits per weight and reconstructs values with d times s_i times q minus d_min times m_i.
A GGUF file pairs typed metadata with aligned tensor blocks; each `Q4_K` super-block uses 144 bytes for 256 weights (4.5 bpw).

When a GGUF exceeds GPU VRAM, llama.cpp's -ngl (--n-gpu-layers) offloads trailing blocks (including the output layer in standard builds) to GPU while keeping remaining early blocks on CPU.[20] For a 40-block model with -ngl 24, blocks 17 through 39 plus the output layer land on GPU.

gguf-offload-placement.py
blocks, requested = 40, 24
start = max(blocks + 1 - requested, 0)  # output layer takes slot `blocks`
gpu_blocks = list(range(start, blocks))
print(f"40-block -ngl 24 -> GPU blocks {gpu_blocks[0]}..{gpu_blocks[-1]} + output layer")

# Capacity-bounded trailing placement with a 2,000 MB KV/workspace reserve:
layer_mb, device_mb, reserve_mb = [1000, 2000, 1500, 500], 6000, 2000
used, gpu_idx = 0, []
for idx in reversed(range(len(layer_mb))):
    if used + layer_mb[idx] > device_mb - reserve_mb:
        break
    gpu_idx.append(idx)
    used += layer_mb[idx]
cpu_idx = [i for i in range(len(layer_mb)) if i not in gpu_idx]
print(f"Budget fit: CPU={cpu_idx}, GPU={sorted(gpu_idx)} ({used} MB + {reserve_mb} MB reserve)")
Output
40-block -ngl 24 -> GPU blocks 17..39 + output layer
Budget fit: CPU=[0], GPU=[1, 2, 3] (4000 MB + 2000 MB reserve)
For the version-pinned 40-block llama.cpp example, requesting 24 GPU layers selects transformer blocks 17 through 39, the output layer, and leaves input assignment on CPU. A separate hypothetical 6,000 MB GPU budget reserves 2,000 MB, then fits trailing blocks 1, 2, and 3 at 2,000, 1,500, and 500 MB; block 0 at 1,000 MB stays on CPU. The diagram traces host mapping through page read and device copy.
Trailing layer offload fills GPU VRAM up to the KV/workspace reserve and leaves remaining prefix blocks on CPU.
terminal
python convert_hf_to_gguf.py /path/to/checkpoint --outfile model-bf16.gguf --outtype bf16
./build/bin/llama-quantize model-bf16.gguf model-Q4_K_M.gguf Q4_K_M

Evaluating quantized models beyond perplexity

As bit width drops from 8 bits to 4 bits to 2 bits, output MSE rises smoothly at first and then falls off a cliff (narrow symmetric 2-bit leaves only codes {−1,0,1}\{-1, 0, 1\}!):

held-out-quantization.py
W = np.array([[0.3, -1.2, 2.0, 0.7]])
X = np.array([[2.0, -1.0, 3.0], [1.0, 2.0, -1.0], [-1.0, 0.5, 2.0], [0.2, -2.0, 1.0]])
for bits in (8, 4, 2):
    qmax = 2 ** (bits - 1) - 1
    scale = float(np.max(np.abs(W))) / qmax
    restored = np.clip(np.rint(W / scale), -qmax, qmax) * scale
    mse = float(np.mean(((W - restored) @ X) ** 2))
    print(f"{bits}-bit: {(W.size * bits + 7) // 8} code bytes, held-out MSE={mse:.6f}")
Output
8-bit: 4 code bytes, held-out MSE=0.000204
4-bit: 2 code bytes, held-out MSE=0.067010
2-bit: 1 code bytes, held-out MSE=1.007200
Comparison of 8-bit, 4-bit, and 2-bit symmetric quantization on four weights [0.3, -1.2, 2.0, 0.7]. Left aligned number lines show original weights snapping to 8-bit [0.2992, -1.1969, 2, 0.6929], 4-bit [0.2857, -1.1429, 2, 0.5714], and 2-bit [0, -2, 2, 0] with ideal code payloads 4, 2, and 1 bytes. Right bar chart compares held-out output MSE across three activation columns: 0.000204 at 8-bit, 0.067010 at 4-bit, and 1.007200 at 2-bit (a 15x jump).
Output MSE rises gently from 8-bit (0.000204) to 4-bit (0.067010) before spiking 15×15\times at 2-bit (1.007200).
Paired held-out output comparison between source baseline and reloaded 4-bit model under identical tokenizer, chat template, and decoding controls. On a shared -4 to +8 axis, held-out column x0 shifts from -2.460 to -2.457 (drift +0.003), x1 shifts from -3.100 to -2.714 (drift +0.386), and x2 shifts from +6.800 to +6.571 (drift -0.229), exposing uneven per-input drift.
Paired comparison on shared held-out inputs exposes uneven drift (column x1x_1 shifts by +0.386 while x0x_0 shifts by just +0.003).
Symptom after quantizationCheck first
JSON or code breaks while prose looks fluentReloaded artifact, tokenizer/template, decoding settings, and paired task evals before tuning calibration data
Decode stays slow despite 4-bit weightsDevice placement, fused vs. standalone kernel dispatch, KV traffic, batch size, and queueing against BF16
Prefill stays slowWhether compute or queueing dominates (weight compression rarely fixes compute-bound prefill)

Mastery check

Check your understanding

Mastery Check

Check each question as you go, or answer all of them and check together. Score 75% or higher to complete this lesson.

0 of 10 answered
1.An affine grid covers real −2 to 3 with unsigned codes 0…15. Which scale and zero-point pair also represents real zero?
2.Two groups have integer dot-product partials 8 and −3, with scales .5 and 2. What is their combined reconstructed output?
3.H=[[10, 2],[2, 2]]. After fixing the first weight, what inverse belongs to the remaining one-coordinate quadratic?
4.A weight .4 multiplies input 6. Scale the weight by 4 and inversely scale its input. A declared shared grid then rebuilds the transformed weight as 1.5. What are this channel’s contributions before and after rounding?
5.Two complete Q4_K blocks hold 512 weights. Including the declared local coefficients and super-scales, what do they occupy?
6.A model has repeating blocks numbered 0 through 11, followed by an output layer. The input layer stays on the CPU. The runtime fills six GPU slots, one layer per slot, starting at the output and working backward. What is the lowest-numbered repeating block on the GPU?
7.A standalone path first reads 2 MB of codes/scales, then writes and rereads 8 MB of reconstructed weights. Excluding all other traffic, how many weight-related MB does it move?
8.A 48 GB GPU reserves 4 GB for the runtime. It holds 8 GB of weights that stay at full precision. The remaining weights shrink from 16 GB to 4 GB. Each user needs 0.5 GB of KV cache. Which calculation gives the maximum number of users who fit in memory before and after quantization?
9.Each artifact receives 200 held-out requests. The source has 170 parse-valid and 154 fully correct results; the candidate has 186 parse-valid and 142 fully correct. Which task-success comparison uses all requests?
10.A 4B-weight worksheet has a 4 GB device, .5 GB other allocations and 1.25 GB cache. A uses 4-bit codes plus a 2-byte scale per 64 weights; B uses 4.5-bit Q4_K blocks. Which complete totals follow?

10 questions remaining.

References

Qwen3.6-27B

Qwen Team · 2026

https://huggingface.co/Qwen/Qwen3.6-27B

GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers.

Frantar, E., et al. · 2023 · ICLR 2023

https://arxiv.org/abs/2210.17323

AWQ

Hugging Face · 2026

https://huggingface.co/docs/transformers/main/en/quantization/awq

NVIDIA A100 Specifications

NVIDIA · 2026

https://www.nvidia.com/en-us/data-center/a100/

Accelerating a Triton Fused Kernel for W4A16 Quantized Inference with SplitK work decomposition

Hoque, A., Wright, L., Yang, C.-C., Srivatsa, M., & Ganti, R. · 2024

https://arxiv.org/abs/2402.00025

W4A16 Mixed-Precision Matrix Multiplication on Decoupled Architecture: Kernel Design and Memory Bottleneck Analysis for Ascend NPUs

He, Y., Niu, P., Zhang, C., Chen, J., & Yang, C. · 2026

https://arxiv.org/abs/2601.16536

SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models.

Xiao, G., et al. · 2023 · ICML 2023

https://arxiv.org/abs/2211.10438

FP8 Formats for Deep Learning.

Micikevicius, P., et al. · 2022

https://arxiv.org/abs/2209.05433

Quantized KV Cache

vLLM Team · 2026 · vLLM Documentation

https://docs.vllm.ai/en/latest/features/quantization/quantized_kvcache/

GPTQ Reference Implementation: fasterquant

Frantar, E. and GPTQ Contributors · 2026

https://github.com/IST-DASLab/gptq/blob/2d65066eeb06a5c9ff5184d8cebdf33662c67faf/gptq.py

GPTQ

Hugging Face · 2026

https://huggingface.co/docs/transformers/main/en/quantization/gptq

AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration.

Lin, J., et al. · 2023 · MLSys 2024

https://arxiv.org/abs/2306.00978

LLM-AWQ Reference Implementation: Channel Scale Search

MIT Han Lab Contributors · 2026

https://github.com/mit-han-lab/llm-awq/blob/d6e797a42b9ef7778de8ee2352116e0f48a78d61/awq/quantize/auto_scale.py

AutoAWQ project status

AutoAWQ Contributors · 2026

https://github.com/casper-hansen/AutoAWQ

llama.cpp: Inference of LLaMA model in pure C/C++

Gerganov, G. · 2023

https://github.com/ggml-org/llama.cpp

GGUF Specification

GGML Contributors · 2026

https://github.com/ggml-org/ggml/blob/master/docs/gguf.md

llama.cpp quantize tool

ggml-org Contributors · 2026

https://github.com/ggml-org/llama.cpp/blob/master/tools/quantize/README.md

GGML K-Quant Block Layouts

GGML Contributors · 2026

https://github.com/ggml-org/llama.cpp/blob/709fe755dfa810d77e2ac386292b29648b536864/ggml/src/ggml-common.h

llama.cpp Quantization Preset Selection

llama.cpp Contributors · 2026

https://github.com/ggml-org/llama.cpp/blob/709fe755dfa810d77e2ac386292b29648b536864/src/llama-quant.cpp

llama.cpp Model Tensor Placement

llama.cpp Contributors · 2026

https://github.com/ggml-org/llama.cpp/blob/709fe755dfa810d77e2ac386292b29648b536864/src/llama-model.cpp

Discussion

Questions and insights from fellow learners.

Discussion loads when you reach this section.