What sliding window attention is
Sliding window attention is a method to reduce the memory and time requirements of the attention computations in transformer models and has been used in models such as Mistral. [1]
What is novel in Gemma 2
The novelty of Gemma 2 is that a sliding window is applied to every other layer (local - 4096 tokens), while the layers in between still use full quadratic global attention (8192 tokens). [2]
Sources
- The Hugging Face source says: Sliding window attention is a method to reduce the memory and time requirements of the attention computations in transformer models and has been used in models such as Mistral. Welcome Gemma 2 - Google's new open LLM
- The Hugging Face source says: The novelty of Gemma 2 is that a sliding window is applied to every other layer (local - 4096 tokens), while the layers in between still use full quadratic global attention (8192 tokens). Welcome Gemma 2 - Google's new open LLM