Skip to main content
TT
Lab
Learn
Sandbox
Community
Language Learning (in Korean)
Get started
Learn
Learning paths
Courses
Transformers — Compute Attention By Hand
Confirm with numbers why you divide by √d
고급 · Lessons 31 · Lab 10
Start the lab
Curriculum
Inside Attention
Attention Is a Weighted Average
reading
Attention Without a Library
lab
The Current Model Landscape and the Encoders
reading
Transformer Check
quiz
Tokenization and Vocabulary
The Same Sentence, a Different Token Count
reading
Build a Tokenizer by Hand
lab
Quiz: Tokenization and Vocabulary
quiz
Rotary Position Embedding (RoPE)
Rotate the Position Instead of Adding It
reading
Put Position In by Rotating
lab
Quiz: Rotary Position Embedding
quiz
Temperature, top-k and top-p
The Same Prompt, a Different Answer Every Time
reading
Build Temperature, top-k and top-p by Hand
lab
Quiz: Temperature, top-k and top-p
quiz
Context Length and Cost
Double the Context — What Becomes Four Times as Much?
reading
Count the Cost of Context Length Yourself
lab
Quiz: Context Length and Cost
quiz
What a KV Cache Reduces
What Gets Recomputed for One More Token
reading
Count the Multiplications a KV Cache Saves
lab
Quiz: What a KV Cache Reduces
quiz
Embeddings, Weight Tying, and Logits
An Id Becomes a Vector, a Vector Becomes Scores
reading
From the Embedding Table to the Logits
lab
Quiz: Embeddings and Logits
quiz
How Integer Quantization Hits Accuracy
What Changes When You Fold Into int8 and Back
reading
Doing int8 Arithmetic by Hand
lab
Quiz: Integer Quantization Error
quiz
MHA, MQA, and GQA
Keep the Query Heads, Shrink Only the Key/Value Heads
reading
Shrink Only the Key/Value Heads
lab
Quiz: MHA, MQA, and GQA
quiz
Cross Entropy and Perplexity
Turning a Model Into One Number
reading
Build the Loss by Hand
lab
Quiz: Cross Entropy and Perplexity
quiz
Reference docs
Attention Is All You Need (원논문)
The Illustrated Transformer
The Annotated Transformer (하버드 NLP)
PyTorch — nn.MultiheadAttention
RoFormer — 회전 위치 임베딩(RoPE)
Vision Transformer (ViT)
Whisper — 음성 인식
CLIP — 이미지·텍스트 정렬