| You → Charan: "Explore India's lost cities, forgotten kingdoms & archaeological mysteries"
Speed0.5×
› › › › › ›
TEXT
›
TOKENS
›
VECTORS
›
NUMBERS
›
ANSWER
1
💬
Input
2
✂️
Tokenize
3
🔢
Token IDs
4
🧮
Embeds
5
👁
Attention
6
⚡
Transform
7
📝
Generate
LIVE LOG
1
Input
Waiting for your question…
0Tokens
768Dims
0Layers
0Out tokens
The question enters the pipeline as raw text. No meaning yet — just characters.
① Input — Raw Text
The question enters the pipeline
Your question
What Charan receives
"Explore India's lost cities, forgotten kingdoms, and archaeological mysteries"

To Charan (the LLM), this arrives as a raw string of Unicode characters. No meaning, no intent — just bytes.
What happens next
The 7-stage pipeline
Every LLM processes text through the same pipeline:

Text → Tokens → IDs → Vectors → Attention → Transform → Answer
② Tokenization
BPE splits text into sub-word chunks
Tokens produced
Sentence → 0 tokens
BPE — Byte Pair Encoding
Why sub-words?
"India" → [In][dia]  ·  "kingdoms" → [king][doms]

Subword boundaries are learned from training text. Tokenizers can split unfamiliar words, but token counts and coverage vary by vocabulary and language.
③ Token IDs
Each token maps to a model-specific integer ID
Token → ID mapping
GPT-2-style vocabulary lookup · 50,257 tokens
Charan only sees:
Vocabulary board (sample)
Matching entries lit in purple
④ Embeddings
Token IDs → dense 768-dimensional input embeddings (GPT-2 small example)
Vector for "lost"
768 values — illustrative input embedding
Embedding matrix — all tokens
Each row = one token's 768-dim input embedding
"lost cities" and "forgotten kingdoms" cluster nearby — both relate to historical disappearance. "archaeological" sits close to both.
⑤ Self-Attention
Tokens talk to each other — focus assigned
Illustrative attention heatmap
Brighter = stronger relationship
What "mysteries" attends to
Illustrative context weights
This heatmap and these weights are illustrative, not model activations. A real attention pattern must be extracted from a specified model and input.
⑥ Transformer Layers
GPT-2 small example · 12 transformer blocks
Layer processing
Layer 0 / 12
What each depth learns
Emergent understanding
Layers 1–4 — Different patterns can emerge; not a fixed rule
Layers 5–8 — Representations combine information; behavior varies by model
Layers 9–11 — Later blocks further transform representations
Final block — Output representation is used to compute next-token scores
⑦ Generation
One token at a time — sampled from probability distribution
Charan's response
Generating token by token…
Next token candidates
Probability distribution
Generation config
Sampling parameters
Tokens out: 0
Temperature: 0.7
Top-p: 0.92
Context: —
This page 0:00
This session 0:00
Total (all pages) 0:00
Today 0:00
▶ Running
📊 View all study stats →
0:00 studying