使用单 GPU 在 24 小时内从零开始训练 Vision Transformer
计算机视觉与模式识别
2022-11-11 v1
摘要
Transformer 已成为近期计算机视觉进展的核心。然而,从零开始训练一个视觉 Transformer (ViT) 模型可能既耗费资源又耗时。在本文中,我们旨在探索降低 ViT 模型训练成本的方法。我们引入了一些算法改进,以在有限的硬件(1 GPU)和时间(24 小时)资源下从零开始训练 ViT 模型。首先,我们提出了一种向 ViT 架构添加局部性的高效方法。其次,我们开发了一种新的图像尺寸课程学习策略,该策略允许在训练初期减少从每张图像中提取的图块数量。最后,我们通过添加硬件和时间约束,提出了流行的 ImageNet1k 基准测试的一个新变体。我们在该基准测试上评估了我们的贡献,并表明在给定的训练预算下,它们可以显著提高性能。我们将在 https://github.com/BorealisAI/efficient-vit-training 分享代码。
引用
@article{arxiv.2211.05187,
title = {Training a Vision Transformer from scratch in less than 24 hours with 1 GPU},
author = {Saghar Irandoust and Thibaut Durand and Yunduz Rakhmangulova and Wenjie Zi and Hossein Hajimirsadeghi},
journal= {arXiv preprint arXiv:2211.05187},
year = {2022}
}
备注
7 pages, 2 figures, 1 table, published in "Has it Trained Yet? Workshop at the Conference on Neural Information Processing Systems (NeurIPS 2022)"