Stable and low-precision training for large-scale vision-language models
By Mitchell Wortsman, Tim Dettmers, Luke S. Zettlemoyer, Ari S. Morcos, Ali Farhadi, Ludwig Schmidt. 2023
94 citations recorded by the source corpus.
We introduce new methods for 1) accelerating and 2) stabilizing training for large language-vision models. 1) For acceleration, we introduce SwitchBack, a linear layer for int8 quantized training which provides a speed-up of 13-25% while matching the performance of bfloat16 training within 0.1 percentage points for the 1B parameter CLIP ViT-Huge -- the largest int8 training to date. Our main focus is int8 as GPU support for float8 is rare, though we also analyze float8 training through simulation. While SwitchBack proves effective for float8, we show that standard techniques are also successful if the network is trained and initialized so that large feature magnitudes are discouraged, which we accomplish via layer-scale initialized with zeros. 2) For stability, we analyze loss spikes and find they consistently occur 1-8 iterations after the squared gradients become under-estimated by their AdamW second moment estimator. As a result, we recommend an AdamW-Adafactor hybrid which avoids loss spikes when training a CLIP ViT-Huge model and outperforms gradient clipping at the scales we test.
Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Multimodal Learning, Optimization & Training
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Luke S. Zettlemoyer
- Ari Holtzman
- Tim Dettmers
- Artidoro Pagnoni
- Yejin Choi
- Mohit Bansal
- Noah A. Smith
- Michael Lewis
In Computer Vision and Pattern Recognition
- Tim Dettmers
- Ari Holtzman
- Luke S. Zettlemoyer
- Artidoro Pagnoni
- Hannaneh Hajishirzi
- Yejin Choi
- Percy Liang
- Mohit Bansal
In Multimodal Learning
In Optimization & Training
Citations in the corpus
- QLoRA: Efficient Finetuning of Quantized LLMs (2023, background): “Besides our work, SwitchBack layers [66] is the only work that studies backpropagation through quantized weights at a scale beyond 1B parameters.”
- SpQR: A Sparse-Quantized Representation for Near-Lossless LLM Weight Compression (2023, unknown): “Recommendations are presented in”