Learn Before
Formula

Memory State as an Average of Keys and Values

The memory state, denoted as Mem, is represented as a tuple. The first element of the tuple is the arithmetic mean of key vectors (kj\mathbf{k}_j) and the second element is the arithmetic mean of value vectors (vj\mathbf{v}_j), both summed from index j=0j=0 to ii. The formula is: Mem=(j=0ikji+1,j=0ivji+1)Mem = \left( \frac{\sum_{j=0}^{i} \mathbf{k}_j}{i + 1}, \frac{\sum_{j=0}^{i} \mathbf{v}_j}{i + 1} \right) This calculation effectively summarizes the information contained in the sequence of key-value pairs up to step ii.

Image 0

0

1

Updated 2025-10-08

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