研究通过提出Bank of Values(BoV)方法,在深层注意力层中使用无上下文的值向量来保留原始token信息,从而提升模型性能并减少计算和内存开销。
摘要:
Transformer架构作为现代LLM骨干的成功在很大程度上归功于其使用注意力层。注意力层遵循标准神经网络范式:以残差流为输入,从而产生上下文相关的查询、键和值向量。然而,我们发现当深层学习仅保留原始token信息的无上下文值向量,而不利用残差流中的任何上下文时,模型性能有显著提升。当模型可以访问这种无上下文的值向量时,添加回上下文相关的组件对整体基准性能几乎没有额外益处。这种无上下文的值向量可以作为稀疏模型参数存储,无需重新计算或持久缓存这些值。通过对这种无上下文值向量的关键设计选择进行系统消融,我们提出了Bank of Values(BoV),这是一种通过为最后三分之一的每一层学习一个token特定值向量的查找表来计算注意力中值向量的新方法。在135M和780M模型上,BoV相比标准注意力提升了验证损失,并且在780M模型上,在21个基准测试的平均得分上匹配了之前最佳方法(该方法以更少的计算和内存向值向量添加token信息)。
英文摘要:
The success of the transformer architecture is in large part due to its use of attention layers. An attention layer follows the standard neural network paradigm: it takes the residual stream as input and thereby produces context-dependent query, key, and value vectors. However, we find that model performance meaningfully improves when deeper layers learn only a context-free value vector to preserve the original token information, without drawing on any context from the residual stream. When the model has access to this context-free value vector, adding back the context-dependent component provides little additional benefit for aggregate benchmark performance. Such context-free value vectors can be stored as sparse model parameters, eliminating the need to recompute or persistently cache these values. Through systematic ablations on the key design choices for such context-free value vectors, we propose Bank of Values (BoV), a new way of computing value vectors in attention by learning a lookup table of token-specific value vectors for each of the last third of layers. Across 135M and 780M models, BoV improves validation loss over standard attention and, at 780M, the average score across 21 benchmarks, matching the previous best method that adds token information to the value vector with less compute and memory.
Transformers represent belief state geometry in their residual stream
Simplex(辛普莱克斯);PIBBSS;Pitzer and Scripps College(皮策与斯克里普斯学院);University College London(伦敦大学学院);BITS Principles of Intelligent Behaviour in Biological and Social Systems(BITS生物与社会系统智能行为原理中心)
Uncovering Uncontrolled Repetition through Residual Stream Dynamics
Beijing University of Posts and Telecommunications(北京邮电大学);JIUTIAN Research(中移九天);Nanyang Technological University(南洋理工大学);Chongqing University of Posts and Telecommunications(重庆邮电大学)
Progressive Residual Warmup for Language Model Pretraining
The Hong Kong University of Science(香港科学与技术大学);NVIDIA, Santa Clara, US(NVIDIA公司);The University of Hong Kong, Hong Kong, China(香港大学);University of Surrey, Guildford, UK(萨里大学)
School of AI, Shanghai Jiao Tong University(上海交通大学人工智能学院);Dots Studio, Xiaohongshu Inc.(小红书公司点点工作室);University of Science and Technology of China(中国科学技术大学);School of CS, Peking University(北京大学计算机科学学院);The Chinese University of Hong Kong(香港中文大学)
Reasoning Errors Have a Region and a Direction in the Residual-Stream Trajectory of LLMs
Australian Institute for Machine Learning(澳大利亚机器学习研究所);Adelaide University(阿德莱德大学);Naval Group Pacific(太平洋海军集团);Responsible AI Research Centre(负责任人工智能研究中心)
Associative memory inspires improvements for in-context learning using a novel attention residual stream architecture
SciAI Center, Cornell University, USA(SciAI中心,康奈尔大学,美国);Neural Coding and Brain Computing Unit, OIST, Japan(神经编码与脑计算单元,海洋研究所,日本);SciAI Center, Center for Applied Mathematics, School of Civil and Environmental Engineering, Cornell University, USA(SciAI中心,应用数学中心,土木与环境工程学院,康奈尔大学,美国)