PYTORCHER.COM / ATTENTION LABInteractive field notes · 04

Attention architectures, one matrix at a time.

CHAPTER 01 / 09

Full causal attention

Trace one new token through the projections, the cache, and the attention calculation.

B = 1 sequenceQ = 1 new token1 byte per stored scalarIDEALIZED STORAGE

Storage precision is not accumulation precision. The main comparison includes no quantization metadata.

SUPPLEMENTARY SHAPE WALKTHROUGH

A token through the layer

LIVE DIMENSIONS

Read top to bottom. Each operation explains its role below the numbers; collapse a card when you no longer need that explanation. Shapes use row-vector math; stored framework weights may be transposed.

Q · queryK · keyV · valueC · cacheS · state