Topic 5 of 20 · 33 words
Parameters, Weights & Model Size
What billions of parameters actually mean in bytes: weights, numerical precision formats (FP32, BF16, FP8, INT4), and memory footprint.
✎ Napkin Diagram · Topic 05What "7B" or "70B Parameters" Means: Brain Size vs. Bag Size
PNG ↗The 33 words, in learning order
Start at 1. Each word builds on the ones before it.
- ParametersParameters are all the numbers a model learns during training, mainly its weights and biases.
- Trainable ParametersTrainable parameters are the numbers in a model that get updated during training.
- Non-trainable ParametersNon-trainable parameters are numbers in a model that stay fixed during training.
- WeightsWeights are the numbers inside a neural network that decide how much each input matters.
- Bias"Bias" has two meanings in AI: a small extra number inside each neuron, and unfair patterns a model picks up from its data.
- Parameter CountParameter count is the total number of learned numbers in a model, often used as a quick measure of its size.
- Model SizeModel size describes how big a model is, either by parameter count or by how much storage and memory it uses.
- Dense ModelA dense model uses all of its parameters for every token it processes.
- Sparse ModelA sparse model only uses a small part of its parameters for each token.
- Active ParametersActive parameters are the parameters a model actually uses to process each token.
- Total ParametersTotal parameters are every parameter a model has, whether or not they are used for each token.
- Billion Parameters (B)"B" after a model name means billions of parameters, so a 7B model has about 7 billion learned numbers.
- Million Parameters (M)"M" after a model name means millions of parameters, which is small by modern standards.
- Trillion Parameters (T)"T" means trillions of parameters, used for the very largest AI models.
- Parameter SharingParameter sharing means using the same set of weights in more than one place in a model.
- Weight TyingWeight tying uses the same weights for a model's input word embeddings and its output word predictions.
- Weight InitializationWeight initialization is how a model's weights are set before training starts.
- Weight MatricesWeight matrices are grids of numbers that hold the weights connecting one layer of a model to the next.
- CheckpointA checkpoint is a saved copy of a model's weights, and often its training state, at a particular moment.
- Raw Model WeightsRaw model weights are the original trained numbers of a model, usually stored at full or half precision, before any compression.
- FP32FP32 is a 32-bit floating point number format that stores numbers with high precision.
- FP16FP16 is a 16-bit floating point format that uses half the memory of FP32.
- BF16BF16, or bfloat16, is a 16-bit number format that keeps the wide range of FP32 but with less precision.
- FP8FP8 is an 8-bit floating point format that uses a quarter of the memory of FP32, used to speed up training and inference.
- INT8INT8 is an 8-bit whole-number format often used to store quantized model weights.
- INT4INT4 is a 4-bit whole-number format used to shrink models to about a quarter of their 16-bit size.
- Numerical PrecisionNumerical precision is how exactly a number is stored, usually measured by how many bits it uses.
- Floating PointFloating point is a way computers store numbers with decimal points, using a sign, an exponent and a mantissa.
- Dynamic RangeDynamic range is the span between the smallest and largest numbers a format can represent.
- MantissaThe mantissa is the part of a floating point number that holds its significant digits, which sets its precision.
- ExponentThe exponent is the part of a floating point number that sets how big or small the number is.
- Sign BitThe sign bit is the single bit in a number that says whether it is positive or negative.
- Memory FootprintMemory footprint is how much memory a model takes up when it runs.
How Parameters, Weights & Model Size fits together
When someone calls a model '7B' or '70B', they are counting its parameters—the learned weights stored inside the model file. How much memory that model needs is simple multiplication: parameter count times bytes per parameter, plus overhead for activations and the KV cache.
Moving from 32-bit floats (4 bytes per weight) to BF16/FP16 (2 bytes), FP8 (1 byte), or INT4 (0.5 bytes) slashes memory footprint and speeds up data movement with surprisingly small quality loss when calibrated well.