Learn Before
Example

Recurrent Network as a Cache Mechanism

A recurrent network can serve as a memory cache by maintaining a fixed-size memory state that is updated at each time step. As illustrated, at step i, the current key-value pair, denoted as SkvS_{kv}, is combined with the previous memory state, MempreMem_{pre}, through an Update function. This function, which can be a recurrent neural network, produces a new memory state, Mem. This mechanism compresses the entire history of key-value pairs into a constant-size memory component (e.g., size 1x2), making it an efficient caching strategy. The process is defined by the recurrent formula: Mem=Update(Skv,Mempre)Mem = \text{Update}(S_{kv}, Mem_{pre})

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