49. What Transformers Are (Text and Sequences)
49.2 Transformer Idea Simply
Why. One plain picture beats a research paper for beginners.
What. Tokens → embeddings (vectors) → attention mixes them → feed-forward → next block. Encoder-style stacks classify text; decoder-style stacks generate text (Gen AI lane).
How.
Encoder vs generator (course map)
- This DS block: classify / understand with a tiny model (Chapter 50).
- Gen AI course: chat, RAG, API calls to large models.
- Do not skip classical TF-IDF for small tickets — often enough.
print("DS ch49-50: intuition + tiny torch text demo")
print("Gen AI course: LLM apps, RAG, agents")