arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.04931cs.CLcs.AI
收藏

多实例的上下文学习

In-Context Learning with Many Demonstration Examples

Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);The University of HongKong(香港大学)

Mukai Li, Shansan Gong, Jiangtao Feng, Yiheng Xu, Jun Zhang, Zhiyong Wu, Lingpeng Kong

摘要:

大型预训练语言模型(PLM)已经显示出很有前途的上下文学习能力。然而,由于骨干Transformer架构,现有的PLM在扩展到大的上下文大小时会受到存储器和计算成本的影响,从而使许多演示示例的指令微调和上下文学习以及长距离语言建模未被探索。在这项研究中,我们提出了一个基于高效Transformer机制的远程语言模型EVALM。EVALM每批处理线使用8k个令牌进行训练,并且可以通过外推测试多达256k个上下文,是现有PLM(例如GPT3)极限的128倍。基于EVALM,我们在指令微调和上下文学习中有效地扩展了示例的大小,以探索更多注释数据的好处的边界。在不同任务集上的实验结果表明,EVALM平均提高了4.1%的准确率,并且在任务上实现最佳准确率得分的平均长度约为12k。我们发现,在多次指令微调(8k)下,上下文学习可以获得更高的性能,并且进一步延长指令长度(16k)可以进一步提高缩放上下文学习的上界。

英文摘要:

Large pre-training language models (PLMs) have shown promising in-context learning abilities. However, due to the backbone transformer architecture, existing PLMs are bottlenecked by the memory and computational cost when scaling up to a large context size, leaving instruction tuning and in-context learning of many demonstration examples, as well as long-range language modeling under-explored. In this study, we propose a long-range language model EVALM based on an efficient transformer mechanism. EVALM is trained with 8k tokens per batch line and can test up to 256k-lengthed contexts with extrapolation, 128 times to the limit of existing PLMs (e.g. GPT3). Based on EVALM, we scale up the size of examples efficiently in both instruction tuning and in-context learning to explore the boundary of the benefits from more annotated data. Experimental results on a diverse set of tasks show that EVALM achieves 4.1% higher accuracy on average, and the average length of achieving the best accuracy score over tasks is around 12k. We find that in-context learning can achieve higher performance with more demonstrations under many-shot instruction tuning (8k), and further extending the length of instructions (16k) can further improve the upper bound of scaling in-context learning.

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

↑