Forward pass: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
[[Category:Artificial neural network| 1]] | [[Category:Artificial neural network| 1]] | ||
[[File:Deepseek chat.png|thumbnail|When one chats with an [[LLM]], the LLM repeatedly executes [[forward pass]] to generate a response, often token by token.]] | |||
A '''forward pass''' of an [[artificial neural network (ANN)]], also called '''inference''', is the process of obtaining an output $f_\theta(X)$ based on input $X$. | A '''forward pass''' of an [[artificial neural network (ANN)]], also called '''inference''', is the process of obtaining an output $f_\theta(X)$ based on input $X$. | ||
Latest revision as of 10:43, 16 November 2026

Image: Rong Martin-Siebler ZHOU · CC BY-SA 4.0
A forward pass of an artificial neural network (ANN), also called inference, is the process of obtaining an output $f_\theta(X)$ based on input $X$.
Stages
Common stages of a forward pass include:
- Tokenisation and Token embedding, to convert raw input into real vectors.
- Computation
- in a simple ANN: via feedforward algorithm;
- in a Transformer: via multiple layers of self-attention, FFN sub-layer, and residual connection + layer normalisation.
- Output head: converts the model output back into token(s), often via softmax.