←Home KnowML
Home / Labs

The Labs

Five worked examples, each small enough to follow one operation at a time and check by hand as you go.

Interactive Step through at your own pace
Why these exist

Reading "the attention weights are a softmax over scaled dot products" is not the same as watching a 4×4 matrix of scores become probabilities whose rows sum to 1.

01Pick a lab

Roughly in the order they become useful. Each stands alone.

02How to use them

  • Predict before you advance. Say what shape the next matrix will be. Getting it wrong teaches more than getting it right.
  • Watch the shapes, not the values. The numbers are seeded and arbitrary. The shapes are the whole point.
  • Read the self-check steps. They are where a lab proves its own arithmetic instead of asserting it.
You have got it when you can state the shape of every tensor between the input embedding and the attention output, for a given sequence length, model dimension and head count — without opening the lab.

03Where to go next