arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2303.10464cs.LGcs.CL
收藏

SPDF:面向大型语言模型的稀疏预训练与密集微调

SPDF: Sparse Pre-training and Dense Fine-tuning for Large Language Models

Cerebras Systems Inc.(赛瑞巴斯系统公司)

Vithursan Thangarasa, Abhay Gupta, William Marshall, Tianda Li, Kevin Leong, Dennis DeCoste, Sean Lie, Shreyas Saxena

AI总结:

为降低LLM预训练计算成本,提出SPDF方法,通过非结构化权重稀疏性在预训练时仅训练部分权重并在微调时恢复,使GPT-3 XL预训练FLOPs减少2.5倍且几乎无精度损失。

摘要:

预训练与微调范式为自然语言处理(NLP)带来了诸多突破。语言模型并非直接在下游任务上训练,而是首先在包含跨领域知识的大型数据集(例如 Pile、MassiveText 等)上进行预训练,随后在特定任务数据(例如自然语言生成、文本摘要等)上进行微调。扩大模型和数据集规模有助于提升 LLM 的性能,但不幸的是,这也导致了极其高昂的计算成本。预训练 LLM 通常需要比微调高出数个数量级的 FLOPs,且两阶段间的模型容量往往保持不变。为了实现关于训练 FLOPs 的训练效率,我们提出解耦两阶段间的模型容量,并引入稀疏预训练与密集微调(SPDF)。在本研究中,我们展示了利用非结构化权重稀疏性在预训练期间仅训练权重子集(稀疏预训练),随后通过允许被置零的权重进行学习以恢复表征容量(密集微调)的益处。我们证明,可以向 1.3B 参数的 GPT-3 XL 模型引入高达 75% 的稀疏度,使预训练 FLOPs 减少 2.5 倍,且相对于密集基线,在下游任务上没有显著的准确率损失。通过严格评估多个下游任务,我们还确立了稀疏度、任务复杂度与数据集规模之间的关系。本研究提出了一条有前景的方向,即利用权重稀疏性以极低比例的训练 FLOPs 训练大型 GPT 模型,同时保留预训练文本表征对下游任务的益处。

英文摘要:

The pre-training and fine-tuning paradigm has contributed to a number of breakthroughs in Natural Language Processing (NLP). Instead of directly training on a downstream task, language models are first pre-trained on large datasets with cross-domain knowledge (e.g., Pile, MassiveText, etc.) and then fine-tuned on task-specific data (e.g., natural language generation, text summarization, etc.). Scaling the model and dataset size has helped improve the performance of LLMs, but unfortunately, this also lead to highly prohibitive computational costs. Pre-training LLMs often require orders of magnitude more FLOPs than fine-tuning and the model capacity often remains the same between the two phases. To achieve training efficiency w.r.t training FLOPs, we propose to decouple the model capacity between the two phases and introduce Sparse Pre-training and Dense Fine-tuning (SPDF). In this work, we show the benefits of using unstructured weight sparsity to train only a subset of weights during pre-training (Sparse Pre-training) and then recover the representational capacity by allowing the zeroed weights to learn (Dense Fine-tuning). We demonstrate that we can induce up to 75% sparsity into a 1.3B parameter GPT-3 XL model resulting in a 2.5x reduction in pre-training FLOPs, without a significant loss in accuracy on the downstream tasks relative to the dense baseline. By rigorously evaluating multiple downstream tasks, we also establish a relationship between sparsity, task complexity and dataset size. Our work presents a promising direction to train large GPT models at a fraction of the training FLOPs using weight sparsity, while retaining the benefits of pre-trained textual representations for downstream tasks.

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

↑