Generative AI Fundamentals · Lesson 2
How LLMs Work Under the Hood
We cover tokens, embeddings, and next-token prediction — no math required, but deep enough to understand model behavior.
Tokens: the atoms of a language model
LLMs read text in chunks called tokens: sub-words, whole words, punctuation. How many words fit in a token depends on the model's tokenizer. On Claude 4.7 and later, 1M tokens ≈ 555k words (older Claude models fit ≈ 750k). On Gemini, 1 token ≈ 4 characters, and 100 tokens ≈ 60–80 English words.
"Hello, world!" → ["Hello", ",", " world", "!"] // 4 tokens (illustrative)
Why this matters:
- Context limits are measured in tokens
- Rare words (niche terms) break into more tokens → cost more
- API pricing is per token
- The same text produces different token counts on different models
The rest of this lesson opens after a free sign-up
Sign up with email or Google: the first two lessons of every course stay open for good, and the whole catalog is open for 7 days. No card needed.


