Calculating a Recursive Memory State
A system updates its memory state at each step by calculating the cumulative average of all key-value pairs seen so far. It uses the following recursive formula, where 'i' is the 0-indexed step number:
Mem_i = ( (k_i, v_i) + i * Mem_{i-1} ) / (i + 1)
Suppose that after processing 5 pairs (at step i=4), the memory state is Mem_4 = (10, 20). At the next step (i=5), the system observes a new key-value pair (k_5, v_5) = (16, 22).
What is the new memory state, Mem_5? Provide your answer as a pair of numbers (x, y), rounding to two decimal places if necessary.
0
1
Tags
Ch.2 Generative Models - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Application in Bloom's Taxonomy
Cognitive Psychology
Psychology
Social Science
Empirical Science
Science
Related
Memory Efficiency of Recursive Cumulative Average
A system processes a very long sequence of data pairs, one at a time. At each step, it must update a 'memory state' to be the precise mathematical average of all data pairs seen up to that point. Consider two methods for updating the memory state at the 10,000th step:
Method A: Re-access the entire history of 10,000 data pairs, sum them up, and divide by 10,000.
Method B: Use only the memory state from the 9,999th step (which was the average of the first 9,999 pairs) and the new 10,000th data pair to calculate the new average.
Which statement best analyzes the primary advantage of Method B over Method A in this context?
Calculating a Recursive Memory State
Step-by-Step Memory State Calculation
Inference Efficiency of Cumulative Average Memory