Global Attention
To understand how global attention works quickly, take a long sentence, tokenize it, and then compare how the original attention mechanism (using Key-Value-Query, or KQV) works on the tokens versus how it operates with global tokens derived from blocks of those tokens. Step 1: Original Sentence and Tokenization Sentence: “The quick brown fox jumps over the lazy dog near the riverbank in the sunny park.” Tokenization: Tokens: ["The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog", "near", "the", "riverbank", "in", "the", "sunny", "park"] Step 2: KQV Attention Mechanism KQV Calculation Input Tokens: ...