You will run a real model's block by hand from its own parts, run all 28 that way and read the stream after each, move every place 10,000 along, and test what each token can see in a decoder and in an encoder.

About 45 minutes. You do it on your own computer. You need your own computer, with uv (free); Windows, Linux or a Mac with Apple silicon, since PyTorch no longer ships for Intel Macs; about 4 GB of free memory; about 3 GB of disk, for PyTorch and three models from the Hugging Face Hub, with no account: Qwen3-0.6B-Base (1.2 GB) and Ettin's encoder and decoder (0.6 GB each).

  1. A first runRun it
  2. One block by handYour turn
  3. The stream, block by blockYour turn
  4. Every place moved alongYour turn
  5. What each token can seeYour turn
  6. Two ways to get it wrongRun it
  7. On your own: fill a gapOn your own
Terminal
curl -LsSf https://astral.sh/uv/install.sh | sh
cd learn-nlp-transformers/labs/nlp-lab-open-transformer/starter
uv sync

See it on GitHub

When you have run it

After step 3, stream.py reads the stream at " the" after each block. After which block does " Antarctic" first come out on top?

Run on macOS on an M1 Max, uv 0.11.15, Python 3.12, PyTorch 2.15.0, Transformers 5.25.0. Checked on .