Lecture 2 · slide 3 · the PTv3 block on a toy slice

Grid, Cells, Patches, Attention

A 32 cm × 32 cm slice through the corner of a room, seen from the side: a wall, the floor and a shoebox. Next or → to step; click a point to follow it instead of P.

click a point to follow it
What is real and what is toy Real, as in PTv3: the grid size g = 2 cm, one token per occupied cell, cell indices halved at every pooling, Z-order codes, patches cut from the sorted list, softmax(q · k / √d) inside each patch only, several heads, xCPE before attention. Toy: 2-D instead of 3-D (cells are squares, one pooling merges 2 × 2 = 4 cells instead of 2 × 2 × 2 = 8), patches of 8 tokens instead of 1024, 4 channels in 2 heads instead of 32 to 512 channels in heads of 16, and invented 2-number features so the scores can be done by hand. In PTv3, q, k and v come from learned matrices Wq, Wk, Wv; here all three are the identity.