# Start here

**Basics of LLMs and How They Work** — SFB1709 Summer School,
*Cellular Plasticity in Myeloid Malignancies: From Mechanisms to Therapies*.

Everything in this folder is self-contained. Nothing needs installing to present.

**Public address for attendees: https://sfb1709.jeffai.net** — the QR code on the closing
slide points there. It serves the slides, the phone version, the notebook and
this whole bundle as a zip.

---

## The three things you actually open

| | File | How |
|---|---|---|
| **Slides** | `slides/deck.html` | **Double-click it.** Opens in any browser. Works offline. |
| **Hands-on notebook** | `notebook/llm_workshop.ipynb` | Upload to Google Colab, or open in Jupyter |
| **Phone version** | `web/explore.html` | Double-click. For attendees with no laptop. |

Slide navigation: `→` next · `Esc` overview · `F` fullscreen · `S` speaker notes.

---

## Running order

Slides and notebook **interleave**. Keep both open and alt-tab between them.

| # | Slides | → then notebook | Min |
|---|---|---|---|
| 1 | **1–3** Title · scale timeline · "AI passes the medical exam" | — | 5 |
| 2 | **4** Three ground rules | **Part 1** — the one idea | 2 |
| 3 | **5–7** Never seen a word · Notation is expensive · Multimodal + context | **Part 2** — tokens | 9 |
| 4 | **8–11** Meaning as geometry · AML · Where both fail · The real bug | **Part 3** — 0.178, then 0.985 | 12 |
| 5 | **12–13** Tokens read each other · Why Part 3 lost it | **Part 4** — attention | 7 |
| 6 | **14–15** Not text, a distribution · Temperature is governance | **Part 5** — the dial | 6 |
| 7 | **16–17** No notion of truth · The fix | **Part 6** — the fabricated PMID | 9 |
| 8 | **18–20** Where it earns its place · PHI · Where to go next | **Part 7** — summary | 4 |

Slide numbers show bottom-right of the deck, so you always know where you are.

**Running short?** Cut notebook Parts 4 and 5 — the deck's attention and temperature
widgets are live and make the same point without switching windows.

---

## The widgets are live, not screenshots

- Slide 5 — type your own text into the tokenizer
- Slide 8 — switch encoder, watch the points move
- Slide 12 — click *find the head that links the negation*
- Slide 14 — drag the temperature dial

Use them. Don't talk over them.

---

## Three things to do before the day

1. **Push this folder somewhere Colab can reach**, then set `REPO_URL` in the
   notebook's first code cell to point at it.
2. **Run the notebook once in Colab.** Warms the model downloads (~1.1 GB) and
   shows you whether the sliders render.
3. **Run `scripts/record_cache.py`** on the lab network with your API key, so
   Part 6 replays genuine model output instead of the hand-written placeholders
   it currently ships with. The notebook says which it is showing, every time.

---

## Everything else in this folder

| Path | What |
|---|---|
| `README.md` | Full run-book: timings, talking points, what to cut |
| `CITATIONS.md` | Every reused component, model and paper, with licences |
| `HANDOFF.md` | Draft message to send your co-presenter |
| `notebook/llm_workshop_advanced.ipynb` | Code-first version, for the programmers |
| `notebook/solutions.ipynb` | Worked answers to the advanced exercises |
| `data/` | The ten synthetic notes, guideline snippets, precomputed model output |
| `src/`, `scripts/` | Teaching helpers and the builders that regenerate everything |

**All clinical text is synthetic.** No patient data, no PHI. The "guideline"
sources are deliberately fictional — slide 17 explains why.
