Inside the Token Factory: How LLMs Really Work?
Details
# Description
What does an LLM really do when you type a prompt? In this session, we follow a single token’s journey through a modern Transformer model. We’ll unpack the pipeline, tokenization (why words become pieces), self-attention (how tokens “look at” each other), multi-head attention (many spotlights, different perspectives), and next-word prediction (the engine behind everything). We’ll also explain pre-training at scale so developers can map capabilities to the underlying mechanics.
No math, no hype, just clear, funny, visual explanations using real sentences (“The animal didn’t cross the street because it…”) to show attention patterns, plus an intuitive view of probabilities behind next-word choice. You’ll leave with a durable mental model you can use to design prompts, evaluate limitations, and communicate LLM behavior to teams and stakeholders.
# Learning Objectives (Outcomes)
- Build a clear, non-math mental model of how LLMs process input and generate output.
- Understand tokenization, self-attention, and multi-head attention using concrete, real-sentence examples.
- Explain pre-training.
- Reason about next-word prediction and common failure modes (e.g., hallucinations).
- Apply this understanding to better prompting and feature design.
# Outline
- Setup: What is a language model? “Autocomplete on steroids.” Why tokens matter.
- Tokenization: Words → subwords → IDs; real sentence breakdown.
- Self-Attention: Intuition + live-style visualization using “it ↔ animal”; Q/K/V conceptually; Multi-Head Attention as multiple spotlights (syntax, reference, theme).
- Next-Word Prediction: Probabilities, temperature/top-k (intuitive), why coherence emerges.
- Training: Pre-training loop (fill-in-the-blank at internet scale); instruction-tuning/RLHF at a glance; when to fine-tune vs prompt.
- Limits & Pitfalls: Hallucinations, context windows, ambiguity; how understanding attention helps debugging prompts.
Recap & Q&A: “Life of a Token” summary; takeaways for builders.
