跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 计算与语言

arXiv:2107.02027 (cs)
[提交于 2021年6月29日]

标题:Efficient Sequence Packing without Cross-contamination: Accelerating Large Language Models without Impacting Performance

作者:Mario Michael Krell, Matej Kosec, Sergio P. Perez, Andrew Fitzgibbon
查看论文《Efficient Sequence Packing without Cross-contamination: Accelerating Large Language Models without Impacting Performance》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Effective training of today's large language models (LLMs) depends on large batches and long sequences for throughput and accuracy. To handle variable-length sequences on hardware accelerators, it is common practice to introduce padding tokens, so that all sequences in a batch have the same length. We show in this paper that the variation in sequence lengths in common NLP datasets is such that up to 50% of all tokens can be padding. In less common, but not extreme, cases (e.g. GLUE-cola with sequence length 128), the ratio is up to 89%. Existing methods to address the resulting inefficiency are complicated by the need to avoid cross-contamination in self-attention, by a reduction in accuracy when sequence ordering information is lost, or by customized kernel implementations only valid for specific accelerators. This paper introduces a new formalization of sequence packing in the context of the well-studied bin packing problem, and presents new algorithms based on this formulation which, for example, confer a 2x speedup for phase 2 pre-training in BERT. We show how existing models can be adapted to ensure mathematical equivalence between the original and packed models, meaning that packed models can be trained with existing pre-training and fine-tuning practices.
评论: Significantly new version with different authors and much more content. Much larger variety in experiments and exhaustive SOTA analysis
主题: 计算与语言 (cs.CL); 计算复杂性 (cs.CC); 信息论 (cs.IT); 机器学习 (cs.LG); 信息论 (math.IT)
引用方式: arXiv:2107.02027 [cs.CL]
  (或者 arXiv:2107.02027v1 [cs.CL] 对于此版本)
  https://doi.org/10.48550/arXiv.2107.02027

提交历史

来自:Mario Michael Krell
[v1] 2021年6月29日 星期二 04:37:23 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.CC
< 上一篇   |   下一篇 >
最新 | 近期 | 2021-06
切换浏览方式为:
cs
cs.CL
cs.IT
cs.LG
math.IT

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站