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

语言模型的嵌入回收

Embedding Recycling for Language Models

Allen Institute for Artificial Intelligence (AI2)(艾伦人工智能研究所(AI2));Northwestern University(西北大学);Yale University(耶鲁大学)

Jon Saad-Falcon, Amanpreet Singh, Luca Soldaini, Mike D'Arcy, Arman Cohan, Doug Downey

摘要:

神经语言模型的实际应用通常涉及在同一语料库上运行许多不同的模型。这些运行的高计算成本导致了人们对可以重用先前运行中产生的上下文嵌入的技术的兴趣,以加快未来的训练和推理。我们将这种方法称为嵌入回收(ER)。虽然已经提出了多种ER技术,但它们的实际有效性仍然未知,因为现有的评估考虑的模型很少,并且没有充分考虑间接成本。我们在8个不同的模型(1700万至9亿个参数)和14个英语任务中对ER进行了广泛的评估。我们展示了一种简单的ER技术,该技术从预训练模型的中间层缓存激活,并在后面的层上学习特定于任务的适配器,这是如何广泛有效的。对于我们实验中性能最好的基线(DeBERTa-v2 XL),添加预计算缓存会导致训练过程中的加速超过90%,推理加速87-91%,对准确性的影响可以忽略不计。我们的分析揭示了未来工作的重要领域。

英文摘要:

Real-world applications of neural language models often involve running many different models over the same corpus. The high computational cost of these runs has led to interest in techniques that can reuse the contextualized embeddings produced in previous runs to speed training and inference of future ones. We refer to this approach as embedding recycling (ER). While multiple ER techniques have been proposed, their practical effectiveness is still unknown because existing evaluations consider very few models and do not adequately account for overhead costs. We perform an extensive evaluation of ER across eight different models (17 to 900 million parameters) and fourteen tasks in English. We show how a simple ER technique that caches activations from an intermediate layer of a pretrained model, and learns task-specific adapters on the later layers, is broadly effective. For the best-performing baseline in our experiments (DeBERTa-v2 XL), adding a precomputed cache results in a >90% speedup during training and 87-91% speedup for inference, with negligible impact on accuracy. Our analysis reveals important areas of future work.

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

↑