arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.19874cs.CLcs.AIcs.LG
收藏

上下文学习是否足以实现大语言模型的指令遵循?

Is In-Context Learning Sufficient for Instruction Following in LLMs?

EPFL(洛桑联邦理工学院)

Hao Zhao, Maksym Andriushchenko, Francesco Croce, Nicolas Flammarion

AI总结:

本研究探讨上下文学习(ICL)对大语言模型指令遵循的充分性,发现URIAL的ICL对齐虽有效但仍逊于MT-Bench上的指令微调,揭示解码参数关键作用并通过添加高质量演示改进URIAL,首次系统比较低数据场景下ICL与IFT,促进对ICL作为对齐技术及其与IFT关系的理解。

摘要:

上下文学习(ICL)允许大语言模型(LLMs)无需改变权重即可从示例中学习:这对能够从大量示例中学习的长上下文LLMs而言是一项极具前景的能力。近期,Lin等人(2024)提出了URIAL方法,仅使用三个上下文示例来对齐基础LLMs,取得了不错的指令遵循性能。本研究表明,尽管URIAL的上下文学习对齐方法有效,但与已确立的基准MT-Bench上的指令微调相比,其性能仍较低,尤其是在使用更强大的基础LLMs时。随后,我们揭示了成功进行上下文学习对齐的最相关要素,发现了解码参数的关键作用。基于这些见解,我们表明URIAL方法确实可以通过在上下文中添加高质量(可能通过贪心搜索精心选择)的演示来改进,使其性能更接近指令模型。最后,据我们所知,我们首次对低数据场景下指令遵循任务中的ICL和指令微调(IFT)进行了系统比较,其中ICL可作为IFT的可行替代方案。总体而言,我们的工作促进了对ICL作为一种对齐技术及其与IFT关系的理解。我们的代码可在https://github.com/tml-epfl/icl-alignment获取。

英文摘要:

In-context learning (ICL) allows LLMs to learn from examples without changing their weights: this is a particularly promising capability for long-context LLMs that can potentially learn from many examples. Recently, Lin et al. (2024) proposed URIAL, a method using only three in-context examples to align base LLMs, achieving non-trivial instruction following performance. In this work, we show that, while effective, ICL alignment with URIAL still underperforms compared to instruction fine-tuning on the established benchmark MT-Bench, especially with more capable base LLMs. We then uncover the most relevant elements for successful in-context alignment, finding the crucial role of the decoding parameters. Based on these insights, we show that the approach of URIAL can indeed be improved by adding high-quality, potentially carefully selected via greedy search, demonstrations in context, getting closer to the performance of instruct models. Finally, we provide the first, to our knowledge, systematic comparison of ICL and instruction fine-tuning (IFT) for instruction following in the low data regime, where ICL can be a viable alternative to IFT. Overall, our work advances the understanding of ICL as an alignment technique and its relationship to IFT. We provide our code at https://github.com/tml-epfl/icl-alignment.

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

↑