arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.15674cs.CLcs.LG
收藏

TensorLLM:张量化多头注意力以增强大语言模型的推理与压缩

TensorLLM: Tensorising Multi-Head Attention for Enhanced Reasoning and Compression in LLMs

Department of Electrical and Electronic Engineering(电子与电气工程系)

Yuxuan Gu, Wuyang Zhou, Giorgos Iacovides, Danilo Mandic

AI总结:

提出 TensorLLM 框架,利用多头张量化与 Tucker 分解压缩并结构化去噪 MHA 权重,在无需训练或额外数据的情况下提升多种 LLM 架构的推理能力,并可与 FFN 去噪方法结合。

摘要:

通过对大语言模型(LLM)的权重进行结构化去噪,可以提升其推理能力;然而,现有技术主要关注对 transformer 块中前馈网络(FFN)的去噪,无法高效利用作为 transformer 架构核心的多头注意力(MHA)块。为解决这一问题,我们提出了一个新颖且直观的框架,其核心是通过多头张量化过程和 Tucker 分解来执行 MHA 压缩。该方法通过在多个注意力头的权重之间强制共享一个高维子空间,实现了对 MHA 权重的更高维结构化去噪与压缩。我们证明,该方法能够在多个基准数据集上持续增强 LLM 的推理能力,并且同时适用于仅编码器和仅解码器架构,同时在 MHA 权重上实现最高约 250 倍的压缩率,而这一切都不需要任何额外数据、训练或微调。此外,我们还表明,所提出的方法可以与现有仅基于 FFN 的去噪技术无缝结合,从而进一步提升 LLM 的推理性能。

英文摘要:

The reasoning abilities of Large Language Models (LLMs) can be improved by structurally denoising their weights, yet existing techniques primarily focus on denoising the feed-forward network (FFN) of the transformer block, and can not efficiently utilise the Multi-head Attention (MHA) block, which is the core of transformer architectures. To address this issue, we propose a novel intuitive framework that, at its very core, performs MHA compression through a multi-head tensorisation process and the Tucker decomposition. This enables both higher-dimensional structured denoising and compression of the MHA weights, by enforcing a shared higher-dimensional subspace across the weights of the multiple attention heads. We demonstrate that this approach consistently enhances the reasoning capabilities of LLMs across multiple benchmark datasets, and for both encoder-only and decoder-only architectures, while achieving compression rates of up to $\sim 250$ times in the MHA weights, all without requiring any additional data, training, or fine-tuning. Furthermore, we show that the proposed method can be seamlessly combined with existing FFN-only-based denoising techniques to achieve further improvements in LLM reasoning performance.

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

↑