Attention and transformers
From attention to a token: the parts of a GPT, one function at a time.
Start 6 problems
Problems
- 1The additive causal maskEasy · 8 min · 10 hidden testsSolution free
- 2Sinusoidal position encodingsEasy · 10 min · 10 hidden tests
- 3Scaled dot-product attention with a maskMedium · 15 min · 11 hidden tests
- 4Split into heads, gate, merge backMedium · 15 min · 10 hidden tests
- 5Temperature and top-p filteringMedium · 15 min · 12 hidden tests
- 6One decode step with a KV cacheHard · 25 min · 10 hidden tests
Practice it at full scale
Hands-on labs on real tooling, in your browser.
Where interviews test it
Cases from our interview prep that lean on this step.