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

GQKVA:通过分组查询、键和值实现Transformer的高效预训练

GQKVA: Efficient Pre-training of Transformers by Grouping Queries, Keys, and Values

Ascend Team, Toronto Research Center, Huawei Technologies(华为技术有限公司ascend团队,多伦多研究中心)

Farnoosh Javadi, Walid Ahmed, Habib Hajimolahoseini, Foozhan Ataiefard, Mohammad Hassanpour, Saina Asani, Austin Wen, Omar Mohamed Awad, Kangling Liu, Yang Liu

AI总结:

本文提出GQKVA方法,通过分组查询、键和值加速Transformer预训练并减小模型规模,在ViT图像分类中实现约0.3%精度提升和约4%模型缩减,最激进缩减达15%仅损失1%精度。

摘要:

基于Transformer的大规模模型面临多项挑战,包括预训练速度慢、计算强度大以及过度参数化。本文通过提出一种名为GQKVA的通用方法来解决这些挑战,该方法泛化了查询、键和值分组技术。GQKVA旨在加速Transformer预训练,同时减小模型规模。我们使用多种GQKVA变体进行的实验突显了性能与模型规模之间的明确权衡,允许根据资源和时间限制进行定制选择。我们的研究结果还表明,传统的多头注意力方法并非总是最佳选择,因为存在更轻量且更快速的替代方案。我们在ViT上测试了我们的方法,在图像分类任务中,模型规模减少了约4%,而准确率提高了约0.3%。此外,我们最激进的模型缩减实验使模型规模减少了约15%,而准确率仅下降了约1%。

英文摘要:

Massive transformer-based models face several challenges, including slow and computationally intensive pre-training and over-parametrization. This paper addresses these challenges by proposing a versatile method called GQKVA, which generalizes query, key, and value grouping techniques. GQKVA is designed to speed up transformer pre-training while reducing the model size. Our experiments with various GQKVA variants highlight a clear trade-off between performance and model size, allowing for customized choices based on resource and time limitations. Our findings also indicate that the conventional multi-head attention approach is not always the best choice, as there are lighter and faster alternatives available. We tested our method on ViT, which achieved an approximate 0.3% increase in accuracy while reducing the model size by about 4% in the task of image classification. Additionally, our most aggressive model reduction experiment resulted in a reduction of approximately 15% in model size, with only around a 1% drop in accuracy.

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

↑