arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2204.07288cs.CLcs.LG
收藏

描述长上下文NLP模型的效率与准确性权衡

Characterizing the Efficiency vs. Accuracy Trade-off for Long-Context NLP Models

Duke University(杜克大学)

Phyllis Ang, Bhuwan Dhingra, Lisa Wu Wills

摘要:

随着自然语言处理(NLP)的许多实际应用都包含长文本,NLP基准测试已经出现,这些基准测试可以衡量可以处理更长输入序列的模型的准确性。然而,这些基准测试没有考虑输入大小或模型大小变化时精度、速度和功耗之间的权衡。在这项工作中,我们对两个广泛使用的长序列模型- Longformer-Encoder-Decoder(LED)和Big Bird -在对SCROLLS基准测试的四个数据集进行微调和推理期间,对这种精度与效率的权衡进行了系统的研究。为了研究这种权衡在超参数设置中的差异,我们在固定资源预算下比较了四种序列长度(1024,2048,3072,4096)和两种模型大小(基础和大)的模型。我们发现LED始终比Big Bird以更低的能源成本实现更高的精度。对于总结,我们发现,增加模型大小比增加序列长度更节能,以获得更高的准确性。然而,这是以推理速度大幅下降为代价的。对于问答,我们发现较小的模型更有效,更准确,因为在固定的资源预算下可能有更大的训练批量。

英文摘要:

With many real-world applications of Natural Language Processing (NLP) comprising of long texts, there has been a rise in NLP benchmarks that measure the accuracy of models that can handle longer input sequences. However, these benchmarks do not consider the trade-offs between accuracy, speed, and power consumption as input sizes or model sizes are varied. In this work, we perform a systematic study of this accuracy vs. efficiency trade-off on two widely used long-sequence models - Longformer-Encoder-Decoder (LED) and Big Bird - during fine-tuning and inference on four datasets from the SCROLLS benchmark. To study how this trade-off differs across hyperparameter settings, we compare the models across four sequence lengths (1024, 2048, 3072, 4096) and two model sizes (base and large) under a fixed resource budget. We find that LED consistently achieves better accuracy at lower energy costs than Big Bird. For summarization, we find that increasing model size is more energy efficient than increasing sequence length for higher accuracy. However, this comes at the cost of a large drop in inference speed. For question answering, we find that smaller models are both more efficient and more accurate due to the larger training batch sizes possible under a fixed resource budget.

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

↑