Index Ai Academy
Glossary · Phase 5 · Transformers

Online softmax

Computing a softmax one chunk at a time with a running maximum and a running total, so the full row of scores never has to be stored.

Try it now

Ten times the tokens means a hundred times the scores. That's why FlashAttention avoids storing them, and sliding windows avoid computing them.

Learn it properly

Long context · Efficient attention and million-token windows. About 35 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write