Part 1 · How the machine works · Module 1 of 14 · about 20 minutes

What a model is

The small amount of mathematics the course uses, what a trained model physically consists of, and how weights, biases and layers turn input numbers into an output.

The mathematics used in this course

Nearly every calculation inside a model is multiplication and addition, repeated an enormous number of times, with a few simple rules such as the activation function applied in between. A reader who can follow a weighted sum, a list of numbers and a power of ten can therefore follow the rest of the course.

Written as
Meaning
Everyday version
0.5 × 2 = 1
Multiplication.
A weight of 0.5 halves its input, so an input of 2 contributes 1.
−3
A negative number, which counts against a total.
A refund on a card statement, which reduces the balance.
0.7 × 80 + 0.3 × 60 = 74
A weighted sum: each input multiplied by its weight, then added up.
A final grade in which the exam counts for 70 per cent and coursework for 30 per cent.
[0.2, −1.3, 0.7]
A vector, meaning a list of numbers.
A map reference, which fixes a place with two numbers where a model uses thousands.
0.5−10.21.10.3−0.7
A matrix, meaning a grid of numbers in rows and columns.
A spreadsheet of figures, the form in which each layer stores its weights.
106 = 1,000,000
A power of ten, meaning 1 followed by that many zeros.
A million is 106, a billion 109 and a trillion 1012.
3.8 × 1025
Scientific notation: a number multiplied by a power of ten.
Here 38 followed by 24 zeros, the operations Meta reported for training Llama 3 405B.
0.9 = 90%
A probability, written as a share from 0 to 1 or as a percentage.
A weather forecast giving a 90 per cent chance of rain.
slope = −16
A gradient, meaning how much one number moves when another is nudged.
How steep the ground feels underfoot, and which way is downhill.
The notation used in the course, each with an everyday example.

A file of numbers and a recipe

A trained model has two parts that only work together, an architecture and a file of parameters. The architecture is a short piece of program code that sets out a fixed recipe of arithmetic, multiplying numbers, adding them up and applying simple rules, layer after layer. The parameters, also called weights, are the numbers the recipe uses, and a large model has hundreds of billions of them, each one set during training. The same code loaded with a different file of weights behaves as a different system, in the way the same spreadsheet formulas give different answers when the fixed values in the cells they refer to are changed.

Meta’s public release of Llama 3.1 70B, a model with 70 billion parameters, makes the parts visible on disk. The weights sit in 30 files totalling about 141 gigabytes, saved in safetensors, the file format most tools load, with a second copy in Meta’s own format alongside them. The configuration file recording the layer sizes is 855 bytes long, and a separate tokeniser file of about 9 megabytes converts text into numbers in the way Module 3 describes.

A computer stores data in bytes, and a byte holds eight bits, each bit being a single 0 or 1. Each weight stored at 16-bit precision, meaning 16 bits for each number, takes two bytes, so 70 billion weights need about 140 gigabytes, a gigabyte being a billion bytes. Quantisation stores each weight with fewer bits after training, which shrinks the same model to about 35 gigabytes at four bits per weight, at some cost in accuracy that is usually small at eight bits and more noticeable at very low bit counts.

The training data is used to set the weights and is not shipped inside the weight file. Llama 3 405B was trained on about 15.6 trillion tokens, the fragments of words that Module 3 explains, which is very roughly 60 terabytes of text at an estimated four bytes or so per token, a terabyte being a thousand gigabytes. Its weights take about 810 gigabytes, around 74 times less than the text that shaped them, which makes the file far too small to hold a verbatim copy of its whole training set. Module 6 shows that a model can still memorise particular passages, sometimes at length.

Llama 3 405B, drawn to scale One square: the weights, about 810 gigabytes All 74 squares: the training text, about 60 terabytes (15.6 trillion tokens) The weight file is about one seventy-fourth the size of the text that shaped it.
Llama 3 405B drawn to scale, with its training text of roughly 60 terabytes against weights of about 810 gigabytes.

The artificial neuron

The basic building block of a neural network is a unit, which popular accounts call a neuron. A unit takes a few input numbers, multiplies each one by its own weight, adds up the results together with one extra number called the bias, and then applies a fixed rule called an activation function to the total. A weight says how much its input counts, and a negative weight counts against the output, while the bias acts as a starting score that moves the point at which the unit switches on.

With inputs of 2 and 3, weights of 0.5 and −1 and a bias of 1, the first input contributes 0.5 × 2 = 1, the second contributes −1 × 3 = −3, and the bias adds 1, for a total of −1. A widely used activation function called ReLU keeps a positive total as it is and turns a negative total into zero, so the unit outputs 0. Current language models mostly use smoother relatives of ReLU, such as GELU and SwiGLU, which work on a similar principle.

inputs weights add up activation output 2 × 0.5 = 1 3 × −1 = −3 + bias +1 −1 ReLU negative → 0 0 1 + (−3) + 1 = −1, and ReLU turns −1 into 0
The worked example as a diagram, in which each input is multiplied by its weight, the results and the bias are added, and the activation function turns the total of −1 into an output of 0.

An older activation function called sigmoid squeezes any total into a value between 0 and 1 along a smooth S-shaped curve, and it gives 0.269 for a total of −1.

ReLU: a negative total becomes 0 total −1 gives 0 −4 −2 0 2 4 positive totals pass through Sigmoid: any total squeezed into 0 to 1 total −1 gives 0.269 1 −6 −3 0 3 6 Horizontal axis: the total (weighted sum plus bias). Vertical axis: the unit’s output.
ReLU and sigmoid compared, with the worked example’s total of −1 marked on each curve.
Try it: one unit
z = (0.5 × 2.0) + (−1.0 × 3.0) + 1.0 = −1.00
ReLU output0.00
sigmoid output0.269
Move the sliders to change the inputs, the weights and the bias, and watch the weighted sum and both activation functions respond.

A unit resembles a committee member who weighs several pieces of evidence, some for and some against, adds a personal predisposition, and speaks up only if the total clears a bar. The comparison fails in one respect that later modules return to, since the evidence reaching a unit deep inside a network is the output of other units, with a meaning that emerged during training and is usually hard for a person to read.

Layers and depth

A layer is a row of units that all read the same inputs, each unit with its own weights, and the outputs of one layer become the inputs of the next. The weights of a whole layer are stored as a matrix, a grid of numbers, so running a layer is one large block of multiplication and addition, which is the job the chips described in Module 2 are built for. Depth means the number of layers stacked in sequence, and it has grown from the eight learned layers of AlexNet, the image model that won a landmark competition in 2012, to 126 layers in Llama 3 405B.

weight unit: weighted sum + bias, then activation Inputs Hidden layer Outputs
A small network in which each line is one weight and each circle is one unit with its own bias, with the numbers flowing from left to right.

The activation function earns its place by bending the arithmetic, since a layer that only multiplies and adds draws a straight-line relationship between its inputs and its outputs. Two straight-line rules applied one after the other still give a straight line, so without the bends a stack of a hundred layers would be limited to what a single layer can do. Each ReLU adds a kink, and many kinks joined together can follow a curve as closely as needed, which is how a network comes to represent complicated relationships.

Multiply and add only: a straight line One ReLU unit: a single kink Many units: kinks that together follow a curve dashed: the shape to be learned dots mark kinks
A straight line, a single kink, and a curve followed by many kinks joined together, which is how stacked units with activation functions build complicated shapes.
Watch: units adding up to a curve
inputoutputoutside theexamplesone kinkkeeps going straight

The dots are training examples taken from the dashed curve, and the network has to learn a line that passes close to them.

Press Play to watch units with ReLU combine into a line that follows a curve, and to see what happens beyond the training examples.
  1. The dots are training examples taken from the dashed curve, and the network has to learn a line that passes close to them.
  2. A single unit with ReLU produces a flat stretch followed by a straight rise, a line with one kink.
  3. A second unit adds a kink of its own, and adding the two units’ outputs gives a line that rises and then falls.
  4. With four units, the joined straight pieces begin to follow the shape of the curve.
  5. With twelve units the line follows the examples closely, and training has worked out where each kink sits and how steep each piece is.
  6. Beyond the range of the examples, the line keeps going in its last direction and drifts away from the true curve, which is why a network’s answers on inputs unlike its examples can be badly wrong.

Mathematicians proved in 1989 that a network with a single hidden layer, meaning one layer between the input and the output, can imitate any continuous relationship between inputs and outputs as closely as desired, provided it has enough units. A continuous relationship here means one without sudden jumps, and the proof covers a limited range of inputs. The proofs came from George Cybenko and, separately, from Kurt Hornik and his co-authors, and covered S-shaped activation functions such as the sigmoid. A 1993 result by Moshe Leshno and colleagues extended them to ReLU and to almost any activation function that is not a polynomial. The finding is often overstated, since it shows only that suitable weights exist, leaving open whether training will find them, how many units would be needed and how the network behaves on inputs outside the range it was fitted on.

What a parameter is

A parameter is closer to the strength of one connection between units than to a unit itself, so comparisons between parameter counts and the brain’s neurons tend to mislead. AlexNet, for instance, had about 60 million parameters spread across about 650,000 units, roughly 90 parameters for each unit.

Individual weights rarely have a meaning a person could name, which is the root of the difficulty in explaining a model’s behaviour that Module 9 examines. Developers also choose how much to disclose about their weights, and OpenAI’s technical report for GPT-4 in March 2023 withheld the model’s size, hardware, training compute and dataset construction altogether.

Check your understanding

  1. Question 1 A model’s weight file is about 810 gigabytes and its training text was roughly 60 terabytes. Which statement is the most accurate?

    Choose one answer to question 1
    Show the answer

    Answer: Far too small to hold all of the text, although some passages may still be memorised. A file about 74 times smaller than the text rules out a full verbatim copy on size alone, while the research in Module 6 shows that particular passages can still be reproduced.

  2. Question 2 With inputs of 4 and 1, weights of 0.5 and −1 and a bias of 1, what does a ReLU unit output?

    Choose one answer to question 2
    Show the answer

    Answer: 2 The weighted sum is 2 − 1 + 1, which equals 2, and ReLU passes positive totals through unchanged.

  3. Question 3 Why does a network need an activation function between its layers?

    Choose one answer to question 3
    Show the answer

    Answer: It bends the arithmetic, so stacked layers can represent more than one straight-line rule. Two layers that only multiply and add still draw a straight line, so depth adds power only because each activation function puts a bend between layers.

Sources

  1. Regulation (EU) 2024/1689 (the AI Act), recital 9713 June 2024 · checked 28 October 2026
  2. Getty Images v Stability AI [2025] EWHC 2863 (Ch)4 November 2025 · checked 28 October 2026
  3. Getty Images v Stability AI [2025] EWHC 3343 (Ch), permission to appeal16 December 2025 · checked 28 October 2026
  4. Landgericht München I, press release 11/2025 on GEMA v OpenAI, 42 O 14139/24 (in German)11 November 2025 · checked 28 October 2026
  5. European Data Protection Board, Opinion 28/2024 on certain data protection aspects related to the processing of personal data in the context of AI models17 December 2024 · checked 28 October 2026
  6. Llama 3.1 70B Instruct, model files on Hugging Facechecked 28 October 2026
  7. Meta, The Llama 3 Herd of Models31 July 2024 · checked 1 October 2026
  8. Cybenko, Approximation by superpositions of a sigmoidal functionDecember 1989 · checked 1 October 2026
  9. Hornik, Stinchcombe and White, Multilayer feedforward networks are universal approximators1989 · checked 1 October 2026
  10. Leshno, Lin, Pinkus and Schocken, Multilayer feedforward networks with a nonpolynomial activation function can approximate any function1993 · checked 1 October 2026
  11. Shazeer, GLU Variants Improve Transformer12 February 2020 · checked 1 October 2026
  12. Krizhevsky, Sutskever and Hinton, ImageNet Classification with Deep Convolutional Neural Networks2012 · checked 1 October 2026
  13. OpenAI, GPT-4 Technical Report15 March 2023 · checked 1 October 2026

This module is general information, checked against the sources above on 28 October 2026. It is not legal advice, and the law it describes may have changed since then. Read the disclaimer.