Formula

Formula for Memory as a Moving Average of Keys and Values

The memory component, Mem\mathrm{Mem}, can be defined as a pair of summary vectors calculated by taking the unweighted moving average of the last ncn_c key and value vectors. This is formally expressed as: Mem=(j=inc+1ikjnc,j=inc+1ivjnc)\mathrm{Mem} = \Big(\frac{\sum_{j=i - n_c + 1}^{i} \mathbf{k}_{j}}{n_c} , \frac{\sum_{j=i - n_c + 1}^{i} \mathbf{v}_{j}}{n_c} \Big)

Image 0

0

1

Updated 2026-04-22

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