arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.22329cs.CL
收藏

大规模语言模型中大规模激活的精细化分析

A Refined Analysis of Massive Activations in LLMs

BluOrion(蓝猎户座)

Louis Owen, Nilabhra Roy Chowdhury, Abhay Kumar, Fabian Güra

AI总结:

本文对多种LLM架构的大规模激活进行精细化分析,发现并非所有激活有害,并提出TVR与Attention KV bias或DyT的混合策略,有效平衡缓解与性能。

摘要:

大规模语言模型(LLMs)中的大规模激活,部分因其与低精度训练和量化相关而受到关注,近期成为研究热点。然而,现有分析范围有限,且跨架构的泛化性尚不明确。本文通过分析一系列广泛的大规模语言模型(包括基于GLU和非GLU的架构)中的大规模激活,帮助填补了部分空白。我们的发现挑战了先前的一些假设,最重要的是:(1)并非所有大规模激活都是有害的,即抑制它们不会导致困惑度爆炸或下游任务性能崩溃;(2)提出的缓解策略如Attention KV bias具有模型特异性,在某些情况下无效。因此,我们研究了新颖的混合缓解策略;特别是将目标方差重缩放(TVR)与Attention KV bias或动态Tanh(DyT)配对,在我们研究的场景中成功平衡了大规模激活的缓解与下游模型性能的保持。我们的代码可在以下网址获取:https://github.com/bluorion-com/refine_massive_activations。

英文摘要:

Motivated in part by their relevance for low-precision training and quantization, massive activations in large language models (LLMs) have recently emerged as a topic of interest. However, existing analyses are limited in scope, and generalizability across architectures is unclear. This paper helps address some of these gaps by conducting an analysis of massive activations across a broad range of LLMs, including both GLU-based and non-GLU-based architectures. Our findings challenge several prior assumptions, most importantly: (1) not all massive activations are detrimental, i.e. suppressing them does not lead to an explosion of perplexity or a collapse in downstream task performance; (2) proposed mitigation strategies such as Attention KV bias are model-specific and ineffective in certain cases. We consequently investigate novel hybrid mitigation strategies; in particular pairing Target Variance Rescaling (TVR) with Attention KV bias or Dynamic Tanh (DyT) successfully balances the mitigation of massive activations with preserved downstream model performance in the scenarios we investigated. Our code is available at: https://github.com/bluorion-com/refine_massive_activations.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑