Lesson 11 of 12 · 2 min
Tokens and Context Window
Token: Sub-word unit. "learning" might be ["learn", "##ing"] or ["le", "arning"].
Rule of thumb: 1 token ≈ 0.75 words (English). 1000 tokens ≈ 750 words.
Context window: Maximum tokens model can process at once.
- GPT-2: 1,024 tokens
- GPT-3.5: 4,096 tokens
- GPT-4: 8,192 / 32,768 tokens
- Claude 3: 200,000 tokens
Why it matters: Text longer than context window must be chunked. RAG (Retrieval-Augmented Generation) retrieves relevant chunks dynamically.
