提出有效状态大小度量,量化模型记忆利用效率。
Quantifying Memory Utilization with Effective State-Size
- 基于信号处理理论定义可解释的记忆利用度量(有效状态大小)
- 揭示不同架构对记忆的使用差异,指导模型优化与压缩
- 适合关注模型效率、记忆机制与架构设计的研究者
随着序列模型设计空间不断扩展,建立通用的架构分析框架愈发重要。本文借鉴经典信号处理与控制理论,提出一种定量度量方法——有效状态大小(Effective State-Size, ESS),用于衡量模型内部存储历史信息以生成未来输出的机制。该指标适用于具有输入不变和输入相关线性算子的基本系统类别,涵盖注意力、卷积、循环等多种计算单元。与以往依赖注意力图或总缓存容量的度量不同,ESS 提供了高度可解释且可操作的测量结果。我们证明其可用于改进初始化策略、设计新正则化项,并通过模型蒸馏推动性能-效率前沿。此外,我们发现上下文分隔符(如语音结束标记)对 ESS 的影响,凸显了大语言模型在记忆利用上的跨架构差异。总体而言,ESS 为理解记忆利用动态提供了关键洞察,助力设计更高效、更有效的序列模型。
原文摘要 · Abstract (English)
The need to develop a general framework for architecture analysis is becoming increasingly important, given the expanding design space of sequence models. To this end, we draw insights from classical signal processing and control theory, to develop a quantitative measure of \textit{memory utilization}: the internal mechanisms through which a model stores past information to produce future outputs. This metric, which we call \textbf{\textit{effective state-size}} (ESS), is tailored to the fundamental class of systems with \textit{input-invariant} and \textit{input-varying linear operators}, encompassing a variety of computational units such as variants of attention, convolutions, and recurrences. Unlike prior work on memory utilization, which either relies on raw operator visualizations (e.g. attention maps), or simply the total \textit{memory capacity} (i.e. cache size) of a model, our metrics provide highly interpretable and actionable measurements. In particular, we show how ESS can be leveraged to improve initialization strategies, inform novel regularizers and advance the performance-efficiency frontier through model distillation. Furthermore, we demonstrate that the effect of context delimiters (such as end-of-speech tokens) on ESS highlights cross-architectural differences in how large language models utilize their available memory to recall information. Overall, we find that ESS provides valuable insights into the dynamics that dictate memory utilization, enabling the design of more efficient and effective sequence models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。