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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQFRyJ687U7Ps6vjyUQWvTzBVXriBtmPOglAfJlEPMVXlF/9iHLT21vZcxjv3v/0TSyb8WwNNxXDfZohhKcKXfb0=
Letter case
Written bpw or bits/weight; in names — Q4_K_M, INT4, W4A16, FP8, NF4, MXFP4. The letter W stands for weights, A for activations: W4A16 means “weights in 4 bits, computation in 16”. A number without a format says almost nothing.
Do not confuse
A “4-bit” model weighs more than 4 bits per weight: every block of weights comes with a scale, and some layers are kept more precise. Q4_K_M is about 4.85 bits. And bits per weight is not bits per activation or cache parameter: those are counted separately.
The pixel letters bit/w shimmer like a picture with a cut-down palette. Beneath them the blue wave is the real weight values, and the pink staircase is the same weights after quantization: 4, 3, 2 and 1 bit, the steps getting coarser. Below is a block of 32 weights at 4 bits each and a yellow 16-bit scale. The pink marker travels along the bits-per-weight scale and stops at 4.85: that is the average for the Q4_K_M format.
Unit passport · AI series · storage precision

bit/w

Bits per weight
size = N · bpw / 8 · 70B in Q4_K_M ≈ 42.8 GB instead of 141 GB

You have a fixed amount of memory. Which is smarter: a small model at 16 bits per weight, or one four times larger at four? In 2022 Tim Dettmers and Luke Zettlemoyer ran more than 35 thousand experiments on models from 19 million to 176 billion parameters. Almost always the larger model at 4 bits won. At three bits and below the advantage melted away. Why are the bits taken from the weights better spent on new weights, and where does this trade stop working? Check it in the calculator and in the “Network” experiment.

Bits per weight is how much memory, on average, one number of a model takes. A model is usually trained in 16 bits but often run in 8, 4 and even 2: each number is rounded to one of a few levels, and a shared scale is stored for a block of numbers. That is quantization. Bits per weight decides whether a model fits on a graphics card or a phone, how fast it writes and how much it costs to run. This sheet has a size calculator for 13 formats, a model picker for your memory, quantizing a block by hand, the layout of floating-point numbers, the outliers that break 8 bits, a neural network that visibly gets dumber with every bit taken away, and a breakdown of where fractional bits come from.

What it is
average memory per model weight, including the block scales
Notation
bpw, bits/weight; in Chinese 每权重比特数
Model size
N · bpw / 8 bytes: 8 billion weights at 4.85 bits — 4.9 GB
Levels
b bits give 2^b values: 4 bits — 16 levels, 2 bits — 4
Typical values
16 — BF16 · 8.5 — Q8_0 · 4.85 — Q4_K_M · 4.25 — MXFP4 · 1.58 — BitNet
References
IEEE 754-2019 · OCP Microscaling v1.0, 2023 · Dettmers and Zettlemoyer, 2022
How much a model weighs What fits in my memory Taking bits away from a neural network
Calculator
Tool · model size

How much a model takes in each format

Choose a model or enter your own parameter count, a format and a context length. Some of the weights — the vocabulary and the last layer — are usually kept more precise; that is the second figure. KV cache memory is computed from the model's layout in BF16. The chips below show which device the model fits on entirely.

Tool · fit to memory

Which model to take, and in which format

Enter how much memory the device has and how much context you need. For each model the most precise format that still fits together with the cache is chosen. Dettmers's rule: of those that fit, take the largest model, but do not go below 4 bits.

modelbest formatmemoryresult

Etymology

How much, a little extra and a weight

Quantization is named after the Latin question “how much?”, and mantissa after a word the Romans used for the small extra added to a purchase. A neural network's weight came from biology, where it described the strength of a connection between neurons.

quantumLat. quantum
quantus · how large→quantum · a portion→quantization
Latin quantum — “how much”, “some amount”. Max Planck in 1900 used it for a portion of energy, and communications engineers in the 1940s for rounding a signal to steps: analog sound was turned into numbers to be sent as pulses. Quantizing a model is the same rounding of weights to a few levels.
mantissaLat. mantissa
mantissa · a small extra→fractional part of a logarithm→precision bits
For the Romans mantissa was a small extra, an addition to the weight of goods, a word possibly of Etruscan origin. Seventeenth-century mathematicians named after it the fractional part of a logarithm, and the builders of computers the digits of a floating-point number. In BF16 only 7 bits are left for the mantissa.
weightEng. weight
wiht · heaviness→weight of a voice, strength of a connection→network parameter
Old English wiht — heaviness, a weight. The “weighted sum” — where some terms matter more than others — became the model of a neuron for McCulloch and Pitts in 1943 and for Rosenblatt in the 1958 perceptron. Since then the numbers a network learns have been called weights.
What it is called in other languages
量化 liànghuà — Chinese, “measure-convert”; 量子化 — Japanese; 양자화 — Korean
cuantización, quantização, quantification, Quantisierung
تكميم — Arabic; क्वांटाइज़ेशन — Hindi; квантчлал — Mongolian
In French, neural networks more often use quantification, although in physics the same word means “quantization” of levels.
Abbreviations nearby
GGUFllama.cpp file format; Q4_K_M — 4 bits, k-quant, medium mixGPTQ · AWQpost-training quantization methods that take the importance of weights into accountNF4NormalFloat 4: 16 levels placed to fit a normal distributionMXFP44-bit floating-point numbers with a scale shared by 32 numbersPTQ · QATquantization after training and training with quantization from the start
01 · Definition and the block of weights
Interactive · quantizing a block by hand
Bits per weight in a block

Fewer levels — less memory

A trained model is billions of numbers, and almost all of them are small and form the bell of a normal distribution. Storing each in 16 bits means telling apart 65 536 values, although the network needs far fewer. Quantization takes a block of 32 or 64 neighbouring weights, finds the largest number by absolute value and divides the interval into 2^b steps. Each weight is replaced by the number of the nearest step, and the interval itself — the scale — is stored once per block.

This is where fractional bits come from: 32 weights at 4 bits plus a 16-bit scale make 4.5 bits per weight. And this is the main trouble — outliers: one huge number stretches the interval, and all the other weights of the block pile onto two or three middle steps. That is why blocks are made small, scales precise, and the most important weights are kept more carefully. Add an outlier on the left and see what happens to the error.

N — weights · b — bits per value · g — weights per block · s — bits per scale · w — weight · Δ — step size
Reference · benchmark values
2 bytesa weight in BF16: 7 billion weights — 14 GB 4.5 bpw32 weights at 4 bits and a 16-bit scale — the Q4_0 format 16 levelsthis many a 4-bit weight tells apart; BF16 has 65 536 codes log₂ 3 = 1.58bits per weight if a weight is only −1, 0 or +1, as in BitNet b1.58
Lab · three experiments with bits

Floating point, outliers and a neural network

“Float” shows which bits a number in FP32, BF16, FP8 and FP4 consists of, which values the format can write at all and how your number will be rounded. In “Outliers” eight bits break on a couple of huge channels — this is how in 2022 it was found out why large models tolerate naive quantization badly. In “Network” a small network learns in the browser to tell two spirals apart, and then you take bits away from it.

Format
How to quantize activations
Outlier strength
Bits per weight

Chart · model weight
How many gigabytes in each format
Horizontal — the number of parameters, vertical — the size of the weights, both scales logarithmic. Four lines are four formats, dashed lines are device memory: 24 GB of a gaming graphics card, 80 GB of an H100 and 192 GB of a Mac Studio. Where a line is below a dashed one, the model fits.
Chart · precision compression
How many bits per number, 2012–2025
Filled squares — the bits large models were trained in, empty ones — the bits they were run in. The scale is in powers of two. Training came down from 32 to 8 bits, running — to four and below.
02 · Orders of magnitude · bits per weight

bits, logarithmic scale

03 · Where fractional bits come from

The layout of formats from the inside

Each format is an agreement on how to pack weights into bytes: how many weights are in a block, how many bits per weight, what the scale is written with and whether there is a second level of scales. The bits per weight come from that. Touch a row — the diagram shows what the bits are spent on.

formatblockbpw

Why Q4_K_M is 4.85, not 4.5
The letter M means “medium mix”: most matrices are stored in Q4_K (4.5 bits), but some of the most sensitive ones — half of the attention value matrices and the down projections — in Q6_K (6.56 bits), and the vocabulary and output layer even more precisely. On average over the file it comes to about 4.85. Q4_K_S has fewer such allowances and comes to about 4.6.
04 · Quantization in code

Eight tools, eight conventions

A model can be compressed by hand in a few minutes, but the tools write bits differently and run on different hardware. A GGUF file goes to llama.cpp and Ollama, GPTQ and AWQ — to NVIDIA graphics cards via vLLM and transformers, MLX — to the Mac. Touch a row to read the details.

toolhow to specifywhere used

For work · three snippets

Compress a GGUF with an importance matrix in llama.cpp; load a model in NF4 through bitsandbytes; run FP8 in vLLM with one line.

05 · Writing rules
06 · Neighbouring units
07 · Historical section

From 32 bits to one and a half

A row of pixel cells in each line — how many bits per number became the norm after the event: one cell — one bit.

outlier channels
LLM.int8(), 2022
Note

In August 2022 Tim Dettmers and co-authors from the University of Washington and Meta noticed something strange: in models above six or seven billion parameters a handful of channels with numbers tens of times larger than the rest suddenly appear in the activations. There are few of them, but they are in almost every layer, and the quality rests on them. Ordinary 8-bit quantization stretches the scale to fit these giants, and all the other numbers merge into zero — the model visibly gets dumber.

The solution turned out to be simple: keep the few outlier channels in 16 bits and the rest in eight. This is how a 175-billion-parameter model was first run in 8 bits without loss of quality. Since then almost every new method — SmoothQuant, AWQ, QuaRot rotations — in one form or another fights outliers. Try it yourself in the “Outliers” experiment.

−10+1log₂ 3 ≈ 1.58
BitNet b1.58, 2024
Series · AI
units of language models

How a neural network is measured

Bits per weight is the bridge between a model's parameters and everything that follows from them: file size is parameters times bits; writing speed is memory bandwidth divided by those bytes; the price of a token and the energy of an answer fall along with them, and perplexity shows how much quality the compression cost. On the left — details of one run, where each row leads to its own sheet; on the right — the sheets of the series.

llama-server · loading a model
Catalogue of quantities
the whole index →
the foundation · 7 units

The seven SI base units

on the sheet’s topic · model training and AI
The index lab: a glass of cabbage juice, a burner, a glass of water on a cold plate and a gear train
Index · all quantities on one page
The lab at the entrance to the index

A drop of acid changes the colour of the juice, salt colours the flame, water freezes at a tap. Below them are all Simetrium sheets, by discipline and alphabetically.

Open the index →
08 · Your language
every link is a real page in that locale

Read it in your own language

translated and checkeddraft translationqueued