← LearnStart the unit
Unit 6
Tokens, attention and latents
This unit builds the parts of the transformer surrogates in current papers, from tokens and attention to a latent space, linear-cost attention and query decoders, and ends with matching a model family to the data. It assumes Units 3 to 5.
Outcome: Read the architecture diagrams of current transformer surrogates, and train a small latent one.
- 6.1TokensEach mesh point becomes a vector of numbers describing where it is and what it carries.
- 6.2Self-attention and the transformerEach token is updated by a weighted sum over all tokens, with weights computed from the tokens.
- 6.3Cross-attention and latent spaceA few learned queries read millions of points into a small set of tokens; the model works there and answers at any point.
- 6.4Attention at scale: TransolverAttention grows with the square of the points; slices, latents and linear schemes keep it tractable.
- 6.5Decoders and volume fieldsFrom the model’s internal state to surface pressure, shear or volume flow at any query point.
- 6.6Choosing a modelWhich family for which data and question, and a sensible baseline to try first.
Build: Embed the aircraft’s points as tokens, train the latent surrogate with 16, 64 and 256 queries, and time its encoder and processor as the number of points grows.
Read: Attention Is All You Need ↗, Transolver, UPT, AB-UPT