CAME: Confidence-guided Adaptive Memory Efficient Optimization

Yang Luo, Xiaozhe Ren, Zangwei Zheng, Zhuo Jiang, Xin Jiang +1 more
7/5/2023
cs.CL

No official code found. Best implementation: huawei-noah/Pretrained-Language-Model (3,162 stars, last commit 2024-01-22). 1 more below.

Abstract

Adaptive gradient methods, such as Adam and LAMB, have demonstrated excellent performance in the training of large language models. Nevertheless, the need for adaptivity requires maintaining second-moment estimates of the per-parameter gradients, which entails a high cost of extra memory overheads. To solve this problem, several memory-efficient optimizers (e.g., Adafactor) have been proposed to obtain a drastic reduction in auxiliary memory usage, but with a performance penalty. In this paper, we first study a confidence-guided strategy to reduce the instability of existing memory efficient optimizers. Based on this strategy, we propose CAME to simultaneously achieve two goals: fast convergence as in traditional adaptive methods, and low memory usage as in memory-efficient methods. Extensive experiments demonstrate the training stability and superior performance of CAME across various NLP tasks such as BERT and GPT-2 training. Notably, for BERT pre-training on the large batch size of 32,768, our proposed optimizer attains faster convergence and higher accuracy compared with the Adam optimizer. The implementation of CAME is publicly available.

View on arXivView PDF

Code Implementations(2)

Pretrained language model and its related optimization techniques developed by Huawei Noah's Ark Lab.

3,162640C++, ShellDec 2, 20192 years ago
knowledge-distillationlarge-scale-distributedmodel-compressionpretrained-modelsquantization
yangluo7/CAMECommunity100%
MIT

[ACL 2023] The official implementation of "CAME: Confidence-guided Adaptive Memory Optimization"

1009PythonJul 20, 20231 years agoMIT
deep-learningdiffusion-transformerlarge-language-modelsmemory-efficientoptimizer

Similar Papers

Cite this paper

@article{luo2023came,
  title  = {CAME: Confidence-guided Adaptive Memory Efficient Optimization},
  author = {Yang Luo and Xiaozhe Ren and Zangwei Zheng and Zhuo Jiang and Xin Jiang and Yang You},
  year   = {2023},
  eprint = {2307.02047},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.02047v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.02047.svg)](https://codeofpaper.com/paper/2307.02047)

Discussion