Picture a sound engineer at a mixing desk with thousands of knobs. Each knob changes the sound a little. Turn them all to just the right positions and the song sounds perfect. Write down those positions, and anyone with the same desk can recreate exactly that sound.
An AI model works in a similar way, except it has millions or billions of “knobs”. They are called weights, or parameters, and their positions are everything the model has learned. This guide explains what weights are, how they’re set, what “an 8B model” means, and why you’ll hear about “open weights”.
What are weights in AI?
Weights are the numbers inside an AI model that are adjusted during training and that decide how the model turns an input into an output. Together with a smaller set of numbers called biases, they are the model’s parameters.
In a neural network, each connection between two neurons has a weight. It says how strongly one neuron’s output affects the next:
- A large positive weight: “this matters a lot, and pushes the result up”.
- A weight near zero: “mostly ignore this”.
- A negative weight: “this counts against”.
In everyday conversation, people often say “weights” to mean all of a model’s parameters.
A tiny example
Suppose a very simple model estimates a flat’s monthly rent:
rent ≈ (size × w₁) + (rooms × w₂) + (distance from station × w₃) + bias
Training might set w₁ to a positive number (bigger flats cost more), w₂ positive (more rooms cost more), and w₃ negative (further from the station costs less). Those three numbers, plus the bias, are the model. Change them and you have a different model.
A large language model is the same idea at a vastly bigger scale, with billions of weights arranged in many layers.
How are weights learned?
Nobody types weights in. When a model is trained from scratch, they start as random numbers and are tuned during training (fine-tuning starts from already-trained weights instead):
- The model makes a guess using its current weights.
- The guess is compared with the right answer to measure the error.
- A method called backpropagation works out how each weight contributed to the error.
- Gradient descent nudges every weight a tiny bit in the direction that reduces the error.
- Repeat, across huge amounts of data.
After training, the weights are frozen and saved. When you use the model, which is called inference, the weights are only read, never changed. That’s why the model itself doesn’t change during your conversation (though some apps save notes as “memory”, and companies may use chats to train future versions).
What does “8B” or “70B” mean?
Model names often include a number like 8B or 70B. That’s the number of parameters: 8 billion or 70 billion. For example, Meta’s Llama 3 8B has about 8 billion parameters. GPT-2, from 2019, had about 124 million in its smallest version (first reported as 117 million).
More parameters can capture more patterns and knowledge, so bigger models are often more capable. But they also:
- need more memory to run,
- are slower and more expensive to use,
- and need more data and computing power to train.
A smaller model can be the better choice when speed, cost or privacy matter more than maximum ability.
How big is the model file?
A model file is mostly its weights, so its size is roughly:
number of parameters × bytes per number
At 16 bits (2 bytes) per number, an 8-billion-parameter model is about 16 GB. Store each weight with fewer bits, a technique called quantization, and the same model can shrink to about 4–5 GB at 4 bits. See quantization.
Where is the knowledge stored?
This surprises many people: there is no database of facts inside a language model, and no list of sentences. Everything it learned, from grammar to facts to coding style, is spread across its weights as patterns. No single weight stores “Paris is the capital of France”. The knowledge emerges from billions of weights working together.
This is also why it’s hard to edit a single fact in a model, and why models can mix facts up (hallucinations).
Weights vs embeddings
People often confuse the two. Weights are the model’s learned settings, used for every input. An embedding is a list of numbers representing one particular piece of data, such as a word or a sentence. Inside an LLM, each token’s starting embedding is read from a table that is itself part of the weights. Our guide to tokens and embeddings explains the difference in detail.
What does “open weights” mean?
When a company releases a model’s weights publicly, anyone can download the model and run it on their own computer or servers, inspect it, or fine-tune it. These are called open-weight models. Llama, Mistral, Qwen and Gemma are well-known families with openly released weights, under various licences.
Other models are closed: their weights stay private, and you can only use them through the company’s app or API.
“Open weights” isn’t always the same as fully open source. A model can have downloadable weights while its training data and training code stay private, and its licence may limit some uses. Always check the licence.
Common misconceptions
“The model stores the text it was trained on.” It stores learned patterns in its weights, not a copy of the training data, though it can sometimes memorise and repeat pieces.
“More parameters always means a better model.” Training data quality and training methods matter hugely. A well-trained smaller model can beat a poorly trained larger one.
“The weights change while I chat.” They’re frozen during use. Changing them requires training or fine-tuning.
“Weights are secret code.” They’re just numbers. What makes a model valuable is that those particular numbers, found through expensive training, work well together.
Key takeaways
- Weights (with biases, the parameters) are the numbers a model learns; they are the model.
- They start random and are tuned by training: guess, measure error, backpropagation, gradient descent, repeat.
- They’re frozen during use, so the model itself doesn’t change as you chat.
- “8B” means about 8 billion parameters; file size ≈ parameters × bytes per number.
- Open-weight models can be downloaded and run yourself; closed models can’t.
Frequently asked questions
What are weights in AI in simple words?
Weights are the numbers inside an AI model that it learns during training. They decide how the model turns your input into an answer, like the settings on thousands of knobs.
What is the difference between weights and parameters?
Parameters are all the numbers a model learns: mainly weights, plus biases. In everyday talk, “weights” and “parameters” are often used to mean the same thing.
What does 7B or 70B mean in an AI model name?
It’s the number of parameters: 7 billion or 70 billion. More parameters usually means a more capable but bigger and slower model.
What are open-weight models?
Models whose trained weights are published so anyone can download and run them, subject to the licence. Examples include the Llama, Mistral, Qwen and Gemma families.
Can you change a model’s weights?
Yes, by training it further, which is called fine-tuning. Using a model normally doesn’t change its weights.
Comments