Example of a Window-based Cache
A window-based cache retains a fixed number of the most recent key-value pairs. For instance, a cache with a window size of four would store the key-value pairs corresponding to indices , , , and . This results in a memory component of size 4x2, as it is composed of four separate key vectors and four separate value vectors.

0
1
Tags
Ch.2 Generative Models - Foundations of Large Language Models
Foundations of Large Language Models
Computing Sciences
Related
Example of a Window-based Cache
A system processes a sequence of data, generating a new key-value pair at each time step. This system uses a memory component that is designed to store only the three most recent key-value pairs. If the system has just processed the fifth item in a sequence, generating the pair (K5, V5), which of the following sets of pairs would be stored in the memory component?
Diagnosing Memory System Limitations
A system uses a memory component that stores only the three most recent data items it has processed. The system processes the following sequence of items one by one: A, B, C, D, E. The states below represent the contents of the memory component at different points in time. Arrange these states in the chronological order in which they would occur.
Learn After
A system uses a memory component that always stores the three most recently processed key-value pairs. If the system processes the following pairs in order: (K1, V1), (K2, V2), (K3, V3), (K4, V4), (K5, V5), what will be the contents of the memory component after the fifth pair is processed?
Calculating Memory Size of a Window-based Cache