How an AI model answers you

by Visual Anything · published Oct 31, 2026 · a topic map

What happens between typing a question and reading the answer: training, tokens, attention and the reply.

56nodes
55links
1copies
9branches

A copy opens in the free Visual Anything app as your own map: move it, change it, turn it around in 3D. Includes the note text. · Report this map

What's on this map

How a Large Language Model Works
User Input Stage
Typing the Question
System Prompt Added
Chat History Attached
Request Sent to Server
Safety Filtering
Tokenization
Byte Pair Encoding
Vocabulary Lookup
Special Tokens
Embedding
Token Embedding Matrix
Positional Encoding
Rotary Position Embeddings
Transformer Layers
Self-Attention
Query Key Value Vectors
Attention Scores
Causal Mask
Softmax Weights
Multi-Head Attention
Feed-Forward Network
Mixture of Experts
Residual Connections
Layer Normalization
Output Prediction
Logits
Probability Distribution
Sampling
Temperature
Top-p and Top-k
Greedy Decoding
Generation Loop
Append Token to Context
KV Cache
Stop Condition
Streaming Tokens
Answer Delivery
Detokenization
Output Safety Check
Displayed Answer
How the Model Was Built
Pretraining
Training Data Collection
Loss Function
Backpropagation
Gradient Descent
Fine-Tuning
Instruction Tuning
Human Feedback Training
Model Weights
Serving Hardware
GPUs and Accelerators
Batching Requests
Model Sharding