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

当部分大于整体:单个LLM组件可优于完整模型

When Parts Are Greater Than Sums: Individual LLM Components Can Outperform Full Models

University of Southern California(南加州大学)

Ting-Yun Chang, Jesse Thomason, Robin Jia

AI总结:

该研究通过分解LLM的注意力头与MLP组件贡献探究ICL,发现特殊组件现象,提出基于少量标注样本的组件重加权方法,在Llama-2-7B的8项任务上较24-shot ICL平均提升6.0%准确率,兼具理论与实践价值。

摘要:

本文通过将大语言模型的输出分解为注意力头与MLP(多层感知机,即组件)的各自贡献,对上下文学习(ICL)展开研究。我们观察到三类特殊组件:表现优异的组件——即便模型整体表现不佳,其单个组件在分类任务上仍表现出色;表现较差的组件——性能远低于随机猜测水平;以及标签偏置组件——始终预测同一标签。研究发现,组件准确率在不同示范集与提示模板扰动下具有强相关性。基于上述发现,我们提出组件重加权方法,该方法利用少量标注样本学习对组件激活值进行线性重缩放。在Llama-2-7B模型的8项任务上,仅需24个标注样本,我们的方法相比24-shot ICL平均提升6.0个准确率百分点。总体而言,本文既深化了我们对ICL的理解,也通过探究模型内部结构提供了一种实用的性能提升方法。

英文摘要:

This paper studies in-context learning by decomposing the output of large language models into the individual contributions of attention heads and MLPs (components). We observe curious components: good-performing ones that individually do well on a classification task, even when the model performs poorly; bad-performing ones that do much worse than chance; and label-biased components that always predict the same label. We find that component accuracies are well-correlated across different demonstration sets and perturbations of prompt templates. Based on our findings, we propose component reweighting, which learns to linearly re-scale the component activations from a few labeled examples. Given 24 labeled examples, our method improves by an average of 6.0% accuracy points over 24-shot ICL across 8 tasks on Llama-2-7B. Overall, this paper both enriches our understanding of ICL and provides a practical method for improvement by examining model internals.

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

↑