Definition

Key Matrix from a Sliding Window

A key matrix from a sliding window is a sub-matrix formed by selecting a contiguous sequence of key vectors. When denoted using slice notation as K[inc+1,i]\mathbf{K}_{[i-n_c+1,i]}, it is constructed by vertically stacking the key vectors from index inc+1i-n_c+1 up to ii. This structure is represented by the formula: K[inc+1,i]=[kinc+1ki]\mathbf{K}_{[i-n_c+1,i]} = \begin{bmatrix} \mathbf{k}_{i-n_c+1} \\ \vdots \\ \mathbf{k}_i \end{bmatrix} This matrix is a fundamental component in attention mechanisms that operate on a fixed-size context window.

Image 0

0

1

Updated 2026-05-02

Contributors are:

Who are from:

Tags

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Related