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

减少截断可改善语言建模

Fewer Truncations Improve Language Modeling

AWS AI Labs(亚马逊云科技人工智能实验室)

Hantian Ding, Zijian Wang, Giovanni Paolini, Varun Kumar, Anoop Deoras, Dan Roth, Stefano Soatto

AI总结:

本文提出 Best-fit Packing 方法,通过长度感知的组合优化打包文档,在保持训练效率的同时消除不必要截断,从而提升文本与代码预训练性能并显著减少闭域幻觉。

摘要:

在大语言模型训练中,输入文档通常被拼接在一起,然后切分成等长序列以避免填充符。尽管这种方式效率较高,但拼接方法损害了数据完整性——它不可避免地会把许多文档拆成不完整的片段,导致过多截断,从而阻碍模型学习基于完整上下文生成逻辑连贯且事实一致的内容。为解决该问题,我们提出 Best-fit Packing,一种可扩展且高效的方法,通过长度感知的组合优化将文档打包进训练序列。我们的方法在保持与拼接方法相同训练效率的同时,完全消除了不必要的截断。来自文本和代码预训练的实验结果表明,我们的方法取得了更优的性能(例如,阅读理解相对提升 +4.7%;上下文遵循提升 +16.8%;程序合成提升 +9.2%),并将闭域幻觉有效降低最多 58.3%。

英文摘要:

In large language model training, input documents are typically concatenated together and then split into sequences of equal length to avoid padding tokens. Despite its efficiency, the concatenation approach compromises data integrity -- it inevitably breaks many documents into incomplete pieces, leading to excessive truncations that hinder the model from learning to compose logically coherent and factually consistent content that is grounded on the complete context. To address the issue, we propose Best-fit Packing, a scalable and efficient method that packs documents into training sequences through length-aware combinatorial optimization. Our method completely eliminates unnecessary truncations while retaining the same training efficiency as concatenation. Empirical results from both text and code pre-training show that our method achieves superior performance (e.g., relatively +4.7% on reading comprehension; +16.8% in context following; and +9.2% on program synthesis), and reduces closed-domain hallucination effectively by up to 58.3%.

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

↑