arXiv:2411.03945cs.LGcs.AI2024-11

探索混合模型在上下文学习中的表现,发现特定结构组合能提升性能。

Can Custom Models Learn In-Context? An Exploration of Hybrid Architecture Performance on In-Context Learning Tasks

  • 构建GPT-2/LLaMa与LLaMa/Mamba混合架构,研究序列变换块对ICL的影响
  • 部分混合模型在上下文学习中准确率显著提升,但某些结构导致收敛变慢或效果下降
  • 提出可量化ICL性能的回归评分,适合关注模型架构设计的研究者

上下文学习(ICL)指模型通过提示序列完成任务而无需参数更新。当前研究多聚焦于使用绝对位置编码的多头注意力机制。本文对比GPT-2与LLaMa、LLaMa与Mamba的架构差异,扩展了Garg等(2022)与Park等(2024)的工作,构建GPT-2/LLaMa与LLaMa/Mamba混合模型,探究序列变换模块与上下文学习性能之间的关系。结果表明,某些架构调整会导致训练效率降低或收敛至次优预测器,而另一些混合模型则表现出优异性能,为未来专注ICL的架构改进提供依据。此外,本文提出‘ICL回归得分’这一标量指标,用于衡量模型在特定任务上的整体表现。受计算资源限制,实验覆盖的架构空间、训练时长、运行次数、函数类复杂度及基准复杂度均有限。为促进可复现与可扩展研究,我们发布了类型化、模块化且可扩展的Python工具包,所有实验均基于该包开展。

原文摘要 · Abstract (English)

In-Context Learning (ICL) is a phenomenon where task learning occurs through a prompt sequence without the necessity of parameter updates. ICL in Multi-Headed Attention (MHA) with absolute positional embedding has been the focus of more study than other sequence model varieties. We examine implications of architectural differences between GPT-2 and LLaMa as well as LlaMa and Mamba. We extend work done by Garg et al. (2022) and Park et al. (2024) to GPT-2/LLaMa hybrid and LLaMa/Mamba hybrid models - examining the interplay between sequence transformation blocks and regressive performance in-context. We note that certain architectural changes cause degraded training efficiency/ICL accuracy by converging to suboptimal predictors or converging slower. We also find certain hybrids showing optimistic performance improvements, informing potential future ICL-focused architecture modifications. Additionally, we propose the "ICL regression score", a scalar metric describing a model's whole performance on a specific task. Compute limitations impose restrictions on our architecture-space, training duration, number of training runs, function class complexity, and benchmark complexity. To foster reproducible and extensible research, we provide a typed, modular, and extensible Python package on which we run all experiments.

上下文学习模型混合架构设计

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。