Memory Augmentation › Key Parameters

Michael BrenndoerferUpdated July 8, 20252 min read
Language AI HandbookAll chapters
Part 18 of 67Long Context
Chapter 131Memory Augmentation › Key Parameters
Reading section 9 of 12 · Key Parameters · 2 minSection 9 of 12 · 2 min

Book contents

Section 9 of 12 · 2 min read

Memory Augmentation › Key ParametersOne section · Sections in this chapter9 / 12 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

When implementing memory-augmented models, these parameters significantly affect performance and resource usage:

Key hyperparameters for memory-augmented models with their typical value ranges.
ParameterDescriptionTypical Values
memory_sizeMaximum entries the memory can hold. Larger memories enable longer effective context but increase storage and retrieval costs.10K - 1M
k_neighborsEntries retrieved per query. Higher values provide more context but dilute relevance.4-16 (LM), 16-64 (QA)
key_dimDimensionality of memory keys. Larger dimensions enable finer-grained addressing but increase compute.64 - 256
value_dimDimensionality of stored values. Can be larger than key_dim since values carry the actual information.768 - 4096
compression_ratioFor compressed memory, how many raw entries compress into one summary. Higher ratios save more memory but lose detail.4 - 16
temperatureControls sharpness of retrieval attention. Lower values produce focused retrieval, higher values spread attention.0.1 - 2.0
write_gate_thresholdFor gated writing, the importance threshold for storing entries. Higher thresholds mean more selective storage.0.3 - 0.7