Learn AI Math

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 ↗
What "7B" or "70B Parameters" Means: Brain Size vs. Bag Size Simple cartoon comparing 3 AI model sizes: Small (3B–8B parameters, fits on a phone or laptop), Medium (30B–70B, needs a strong desktop GPU), and Giant (400B+, lives in a massive data center). SMALL (3B – 8B PARAMS) Fits in a Backpack(Phone or normal Laptop)Needs ~4 to 8 GB memorySuper fast & free to run,great for everyday summariesMEDIUM (30B – 70B PARAMS) Needs a Big Suitcase(Pro Mac or Gaming PC)Needs ~20 to 45 GB memorySweet spot for serious coding,writing & private company AIGIANT (400B – 1T+ PARAMS) Needs a Moving Truck(Cloud Data Center)Needs 200+ GB of server GPUsDeepest world knowledge &hardest math/logic puzzles getaimath.com
Parameters are the brain cells of an AI model—more parameters mean more knowledge, but need a bigger computer to hold them.

The 33 words, in learning order

Start at 1. Each word builds on the ones before it.

  1. ParametersParameters are all the numbers a model learns during training, mainly its weights and biases.
  2. Trainable ParametersTrainable parameters are the numbers in a model that get updated during training.
  3. Non-trainable ParametersNon-trainable parameters are numbers in a model that stay fixed during training.
  4. WeightsWeights are the numbers inside a neural network that decide how much each input matters.
  5. Bias"Bias" has two meanings in AI: a small extra number inside each neuron, and unfair patterns a model picks up from its data.
  6. Parameter CountParameter count is the total number of learned numbers in a model, often used as a quick measure of its size.
  7. Model SizeModel size describes how big a model is, either by parameter count or by how much storage and memory it uses.
  8. Dense ModelA dense model uses all of its parameters for every token it processes.
  9. Sparse ModelA sparse model only uses a small part of its parameters for each token.
  10. Active ParametersActive parameters are the parameters a model actually uses to process each token.
  11. Total ParametersTotal parameters are every parameter a model has, whether or not they are used for each token.
  12. Billion Parameters (B)"B" after a model name means billions of parameters, so a 7B model has about 7 billion learned numbers.
  13. Million Parameters (M)"M" after a model name means millions of parameters, which is small by modern standards.
  14. Trillion Parameters (T)"T" means trillions of parameters, used for the very largest AI models.
  15. Parameter SharingParameter sharing means using the same set of weights in more than one place in a model.
  16. Weight TyingWeight tying uses the same weights for a model's input word embeddings and its output word predictions.
  17. Weight InitializationWeight initialization is how a model's weights are set before training starts.
  18. Weight MatricesWeight matrices are grids of numbers that hold the weights connecting one layer of a model to the next.
  19. CheckpointA checkpoint is a saved copy of a model's weights, and often its training state, at a particular moment.
  20. Raw Model WeightsRaw model weights are the original trained numbers of a model, usually stored at full or half precision, before any compression.
  21. FP32FP32 is a 32-bit floating point number format that stores numbers with high precision.
  22. FP16FP16 is a 16-bit floating point format that uses half the memory of FP32.
  23. BF16BF16, or bfloat16, is a 16-bit number format that keeps the wide range of FP32 but with less precision.
  24. FP8FP8 is an 8-bit floating point format that uses a quarter of the memory of FP32, used to speed up training and inference.
  25. INT8INT8 is an 8-bit whole-number format often used to store quantized model weights.
  26. INT4INT4 is a 4-bit whole-number format used to shrink models to about a quarter of their 16-bit size.
  27. Numerical PrecisionNumerical precision is how exactly a number is stored, usually measured by how many bits it uses.
  28. Floating PointFloating point is a way computers store numbers with decimal points, using a sign, an exponent and a mantissa.
  29. Dynamic RangeDynamic range is the span between the smallest and largest numbers a format can represent.
  30. MantissaThe mantissa is the part of a floating point number that holds its significant digits, which sets its precision.
  31. ExponentThe exponent is the part of a floating point number that sets how big or small the number is.
  32. Sign BitThe sign bit is the single bit in a number that says whether it is positive or negative.
  33. 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.