Weights
Summary
Weights are fixed numbers within a neural network obtained during the training process. They determine how strongly the signal from one neuron influences the next.
What are Weights
Weights are the 'memory' and 'experience' of a neural network, expressed in numbers. Each weight is a coefficient on the connections between neurons. It is in the weights that the model stores everything it has learned: from Russian grammar to writing Python code.
How it Works
Imagine a vast network of billions of 'light bulbs' (neurons) and 'wires' (connections) between them:
- You feed in a word — for example, 'Cat'.
- This word activates the first neurons.
- The signal travels along the connections to the next neurons.
-
On each connection is a 'volume control' — this is the weight.
-
If the weight is high (for example, 0.9) — the signal passes almost without loss.
- If the weight is low (0.01) — the signal fades.
- If the weight is negative — the signal is blocked.
Thanks to billions of such controls, the network activates 'drinks' or 'sits' after the word 'Cat', but completely blocks 'excavator'.
Why Weights are So Important
Weights are the model itself. Writing the code architecture of a neural network can be done by an average programmer in an evening. But training it — finding billions of weights — costs tens of millions of dollars and months of work on thousands of GPUs.
When companies say 'we released the model', they mean the file with weights. Inside this file is no text like 'Pushkin was born in 1799' — there are only numbers that can generate this fact when you ask.
Analogy: Recipe for Perfect Coffee
Imagine you are learning to make the perfect coffee. You have parameters: amount of water, amount of beans, temperature, brewing time.
At the beginning, you don't know the proportions and set them randomly — the coffee is terrible. You try again and again: 'more beans, lower temperature'. After thousands of attempts, you find the ideal: 18g of coffee, 300ml of water, 92°C.
These ideal proportions are the weights.
A neural network is the same story: the algorithm tunes the numbers billions of times so the model learns to predict the next word. All the adjusted numbers are saved in a file — the weights file. When you write a prompt, the model runs the text through these numbers and outputs the most probable answer.
Weights vs Prompt
| Weights | Prompt | |
|---|---|---|
| What is it? | Maze structure | Signal sent through the maze |
| When is it created? | Once, during training | Right now, in the chat |
| Does it change? | No, frozen | Yes, with each message |
| Analogy | Piano strings and body | Pressed key |
Weights are how the network is able to connect concepts. Prompt is the direction in which the signal is sent through these connections.