Tokenization
Text is split into learned units called tokens. A token is not always a word; spelling, language and formatting change token counts and costs.
Section 2 · Mechanisms
An LLM predicts tokens from context. Scale and training make that simple objective surprisingly capable, but the model still generates likely continuations rather than consulting a guaranteed store of facts.
Text is split into learned units called tokens. A token is not always a word; spelling, language and formatting change token counts and costs.
Tokens become vectors. During training, useful geometric relationships emerge so the network can operate on contextual representations rather than raw characters.
Self-attention lets each position weigh information from other positions. Transformer blocks combine attention and feed-forward computation repeatedly.
Pretraining learns broad patterns by prediction. Supervised fine-tuning and preference methods such as RLHF or DPO shape instruction following and behavior.
At runtime, the model calculates a probability distribution and selects the next token repeatedly. Sampling settings trade repeatability against variation; they do not add knowledge.
Tokenize
Embed
Attend
Predict next token
Repeat with context
The context window is working state, not durable memory. Longer context helps only when relevant information is present, accessible and correctly used.
Take a short LLM question and identify what influences the response.
No. By default it generates tokens from learned parameters and current context; retrieval is a separate system component.
It lets a token representation weight information from other positions to build a context-dependent representation.
Pretraining changes model parameters from large datasets; inference uses fixed parameters to generate an output for a new input.