Quantization

Quantization

INT8/INT4, GGUF, AWQ, GPTQ, SmoothQuant, FP8 KV cache.

56Articles
56Topics covered
Articles in this category

All 22 articles, sorted alphabetically

Advertisement
ARTICLE · 01

Adaptive rounding architecture

Deep-dive on adaptive rounding (AdaRound): why round-to-nearest is optimal for the wrong objective, layer-wise reconstruction on calibration activatio…

Read article
ARTICLE · 02

AWQ vs GPTQ Quantization Architectures Compared

A 2500-word walkthrough of AWQ vs GPTQ quantization architectures: calibration, algorithm, output format, kernel support, and trade-offs.

Read article
ARTICLE · 03

BitNet ternary quantization architecture

Deep-dive on BitNet b1.58: ternary {-1,0,+1} weights and int8 activations, the BitLinear layer, absmean/absmax quantizers, straight-through training, …

Read article
ARTICLE · 04

Quantization calibration -- choosing the right ranges

Deep-dive on quantization calibration: the float-to-integer range problem, representative calibration data, range selection (min/max vs percentile), o…

Read article
ARTICLE · 05

Double quantization architecture

Deep-dive on double (nested) quantization: block-wise quantizing weights to low bits with per-block floating-point scales, then quantizing those scale…

Read article
ARTICLE · 06

Dynamic vs static quantization architecture

Deep-dive comparing dynamic and static post-training quantization: offline weight quantization shared by both, static calibration that bakes activatio…

Read article
ARTICLE · 07

FP8 -- 8-bit floating point for training and inference

Deep-dive on FP8: the E4M3 and E5M2 formats, floating point vs integer (dynamic range vs uniform steps), scaling, native tensor-core support (Hopper/B…

Read article
ARTICLE · 08

GGUF quantization architecture

Deep-dive on GGUF and llama.cpp quantization: file layout and metadata, block quantization with per-block scales, Q4_K_M super-blocks, IQ2/IQ3 with im…

Read article
ARTICLE · 09

Quantization granularity -- per-tensor, per-channel, per-group scales

Deep-dive on quantization granularity: per-tensor vs per-channel vs per-group scales, scale and zero-point, the outlier problem and how granularity is…

Read article
ARTICLE · 10

Half-Quadratic Quantization (HQQ) architecture

Deep-dive on HQQ: quantization as optimization with a sparse outlier term, half-quadratic splitting into closed-form proximal and zero-point steps, da…

Read article
ARTICLE · 11

KV Cache Quantization Architecture in Depth

A 2500-word walkthrough of KV cache quantization: FP16 baseline, INT8/INT4/FP8 formats, per-head scales, write/read paths, kernels, accuracy, runtime.

Read article
ARTICLE · 12

LLM Quantization Architecture in Depth

A 2500-word walkthrough of LLM quantization: FP16 base, calibration, GPTQ/AWQ/SmoothQuant/FP8 methods, weight/activation/KV formats, fused kernels, ev…

Read article
ARTICLE · 13

LLM.int8() architecture

Deep-dive on LLM.int8(): why systematic outlier features break plain 8-bit quantization past ~6.7B parameters, vectorwise int8 quantization, column-sp…

Read article
ARTICLE · 14

Marlin INT4 kernel architecture

Deep-dive on the Marlin INT4xFP16 matmul kernel: packed weight layout and group scales, async double-buffered loads, register-level dequantization, te…

Read article
ARTICLE · 15

Mixed-precision inference architecture — sensitivity profiling, per-layer precision plans, and fused-kernel serving

Deep-dive on mixed-precision LLM serving: calibration and per-layer sensitivity profiling, planner-assigned FP16/FP8/INT8/INT4 manifests, kernel regis…

Read article
ARTICLE · 16

NF4 and QLoRA -- 4-bit quantization for fine-tuning

Deep-dive on NF4 and QLoRA: the fine-tuning memory problem, NormalFloat4 (levels at normal-distribution quantiles matching weight distributions), bloc…

Read article
ARTICLE · 17

Quantization-aware training

Deep-dive on QAT: fake quantization in the forward pass, straight-through estimator gradients, comparison to post-training quantization, learned quant…

Read article
ARTICLE · 18

Rotation-based quantization architecture

Deep-dive on rotation-based quantization: why activation outliers break four-bit inference, how an orthogonal Hadamard rotation spreads outlier energy…

Read article
ARTICLE · 19

SpinQuant architecture

Deep-dive on SpinQuant: why outlier channels wreck naive INT4 quantization, how orthogonal rotations spread outliers without changing the full-precisi…

Read article
ARTICLE · 20

Symmetric vs asymmetric quantization architecture

Deep-dive on symmetric versus asymmetric quantization: how a float range maps onto integer levels through a scale and a zero-point, why symmetric quan…

Read article
ARTICLE · 21

Weight clustering quantization

Deep-dive on weight clustering (codebook / weight-sharing) quantization, which compresses a model by running k-means over each layer&a…

Read article
ARTICLE · 22

Quantization Deep Dive: How 4-bit and 1.5-bit Models Retain 99% of Their Original Accuracy

Read article