Core Concepts
Adapprox는 Adam 최적화기의 두 번째 모멘트를 무작위 저차원 행렬 근사를 통해 효과적으로 근사하여 메모리 사용량을 크게 줄이면서도 성능 저하를 최소화하는 새로운 접근법이다.
Abstract
이 논문은 대규모 딥러닝 모델 학습 시 Adam 최적화기의 높은 메모리 사용량 문제를 해결하기 위한 Adapprox 알고리즘을 제안한다.
핵심 내용은 다음과 같다:
Adam 최적화기의 두 번째 모멘트 행렬은 대부분의 경우 낮은 랭크 구조를 가지고 있음을 관찰하고, 이를 활용하여 메모리 사용량을 줄이는 방법을 제안한다.
무작위 저차원 행렬 근사 기법을 활용하여 두 번째 모멘트 행렬을 효과적으로 압축하는 Adapprox 알고리즘을 개발한다.
적응형 랭크 선택 메커니즘을 도입하여 정확도와 메모리 효율성의 균형을 유지한다.
코사인 유사도 기반 가이드 전략을 선택적으로 적용하여 수렴 속도와 안정성을 향상시킨다.
GPT-2 모델 학습 및 다운스트림 태스크 실험을 통해 Adapprox가 기존 메모리 효율적 최적화기들에 비해 우수한 성능을 보임을 입증한다.
Stats
GPT-2 117M 모델 학습 시 AdamW 대비 34.5%에서 49.9%의 메모리 사용량 절감
GPT-2 345M 모델 학습 시 AdamW 대비 33.8%에서 49.9%의 메모리 사용량 절감
첫 번째 모멘트를 제거할 경우 GPT-2 117M 모델에서 84.5%에서 99.9%, GPT-2 345M 모델에서 83.8%에서 99.9%의 메모리 사용량 절감
Quotes
"As deep learning models exponentially increase in size, optimizers such as Adam encounter significant memory consumption challenges due to the storage of first and second moment data."
"Adapprox features an adaptive rank selection mechanism, finely balancing accuracy and memory efficiency, and includes an optional cosine similarity guidance strategy to enhance stability and expedite convergence."
"In GPT-2 training and downstream tasks, Adapprox surpasses AdamW by achieving 34.5% to 49.9% and 33.8% to 49.9% memory savings for the 117M and 345M models, respectively, with the first moment enabled, and further increases these savings without the first moment."