Debug Foundry

Systems concepts, slowly enough to follow.

Each chapter is a small interactive simulation. Turn it, pause it, drag through the steps.

Free. No signup. Nothing to install.

Part I — Making LLMs fast

  1. The FlashAttention simulation: tiles moving from slow memory to fast on-chip memory Chapter 1 FlashAttention

    Watch attention drop its biggest memory bill, tile by tile. 8 steps, about 30 seconds.

  2. The KV cache simulation: a shelf of token slabs in slow memory, one new slab flying up to compute Chapter 3 The KV cache

    Watch one new token meet the whole past, without re-reading it. 8 steps, about 30 seconds.

Part II — Owning your memory

  1. The smart pointers simulation: arrows from scope variables to heap blocks, one block fading as its owner leaves Chapter 2 Smart pointers

    Watch C++ memory free itself, owner by owner. 8 steps, about 30 seconds.