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

CLIP训练的反向缩放定律

An Inverse Scaling Law for CLIP Training

UC Santa Cruz(加州大学圣克鲁兹分校)

Xianhang Li, Zeyu Wang, Cihang Xie

AI总结:

本文发现CLIP训练存在反向缩放定律——编码器越大所需token序列越短,据此在有限算力下高效训练CLIP,并以G/14刷新ImageNet-1k零样本准确率至83.0%,同时加速训练约33倍。

摘要:

CLIP作为连接图像与文本的开创性基础模型之一,推动了计算机视觉领域近年来的诸多突破。然而,其训练成本极其高昂,对其广泛探索构成了重大障碍。本文呈现了一个令人惊讶的发现:CLIP训练存在一种反向缩放定律,即所使用的图像/文本编码器越大,训练中可采用的图像/文本token序列长度越短。此外,我们展示了减少图像/文本token长度的策略在决定该缩放定律质量方面起着关键作用。基于这一发现,我们能够在计算资源有限的情况下成功训练CLIP。例如,使用8块A100 GPU,我们的CLIP模型在约2天内达到63.2%的ImageNet-1k零样本top-1准确率,约3天内达到67.8%,约4天内达到69.3%。我们的方法在扩大规模时同样表现良好——使用G/14,我们刷新了ImageNet-1k零样本准确率的新纪录,达到83.0%,同时相比其OpenCLIP对应模型加速训练约33倍。通过降低CLIP相关的计算门槛,我们希望激发该领域更多研究,尤其是来自学术界的研究。我们的代码可在https://github.com/UCSC-VLAA/CLIPA获取。

英文摘要:

CLIP, one of the pioneering foundation models that connect images and text, has enabled many recent breakthroughs in computer vision. However, its associated training cost is prohibitively high, imposing a significant barrier to its widespread exploration. In this paper, we present a surprising finding that there exists an inverse scaling law for CLIP training, whereby the larger the image/text encoders used, the shorter the sequence length of image/text tokens that can be applied in training. Moreover, we showcase that the strategy for reducing image/text token length plays a crucial role in determining the quality of this scaling law. As a result of this finding, we are able to successfully train CLIP even with limited computational resources. For example, using 8 A100 GPUs, our CLIP models achieve zero-shot top-1 ImageNet-1k accuracies of 63.2% in ~2 days, 67.8% in ~3 days, and 69.3% in ~4 days. Our method also works well when scaling up -- with G/14, we register a new record of 83.0% ImageNet-1k zero-shot accuracy, and meanwhile accelerate the training by ~33x compared to its OpenCLIP counterpart. By reducing the computation barrier associated with CLIP, we hope to inspire more research in this field, particularly from academics. Our code is available at https://github.com/UCSC-VLAA/CLIPA.

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

↑