00:00:00

Share Your Feedback 🏝️

Scaling Laws

Scaling Laws

MinWoo(Daniel) Park | Tech Blog

Read more
Previous: Principled Instructions Next: Model | MAP-Neo*

Scaling Laws

  • Related Project: Private
  • Category: Paper Review
  • Date: 2024-05-29

Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations

  • url: https://arxiv.org/abs/2405.18392
  • pdf: https://arxiv.org/pdf/2405.18392
  • html https://arxiv.org/html/2405.18392v1
  • abstract: Scale has become a main ingredient in obtaining strong machine learning models. As a result, understanding a model’s scaling properties is key to effectively designing both the right training setup as well as future generations of architectures. In this work, we argue that scale and training research has been needlessly complex due to reliance on the cosine schedule, which prevents training across different lengths for the same model size. We investigate the training behavior of a direct alternative - constant learning rate and cooldowns - and find that it scales predictably and reliably similar to cosine. Additionally, we show that stochastic weight averaging yields improved performance along the training trajectory, without additional training costs, across different scales. Importantly, with these findings we demonstrate that scaling experiments can be performed with significantly reduced compute and GPU hours by utilizing fewer but reusable training runs.

[DeepSeek 내용 및 Scaling 관련 논문]


Contents

TL;DR


대규모 언어모델의 학습 최적화: 상수 학습률과 쿨다운 접근 방식

  • learning schedule 최적화의 필요성: 기존의 코사인 learning schedule은 학습 길이 맞춤이 필수적이었으나, 이는 유연성을 제한합니다.
  • 상수 학습률 + 쿨다운 방식 제안: 학습 대부분을 상수 학습률로 진행 후 마지막에 급격한 감소를 적용한 쿨다운을 통해 성능을 유지하며 유연성을 증가시킵니다.
  • 쿨다운 방식의 이점: 연구 및 개발 비용을 절감하고 더 빈번한 실험을 가능하게 하여 학습 방법을 다양화합니다.

learning schedule의 중요성

대규모 언어모델(LLM)의 학습 과정에서 일정한 learning rate은 중요한 요소입니다. 일정한 learning rate은 모델이 데이터에서 패턴을 학습하고 최적의 성능을 발휘하는 데 결정적인 역할을 합니다. 기존의 연구들은 주로 코사인 일정한 learning rate을 사용했지만, 이 방식은 학습 길이를 사전에 결정해야 한다는 큰 제약이 있습니다.

기존 learning schedule의 문제점

코사인 learning schedule은 초기에는 학습률을 빠르게 증가시킨 후 점차 감소시키는 구조입니다. 이는 초기 탐색 후 점진적인 파인튜닝을 가능하게 하지만, 학습의 총 길이를 미리 알아야 하므로 실험적 유연성이 제한됩니다. 이런 문제를 해결하기 위해 본 논문에서는 새로운 learning schedule 방식을 제안합니다.

상수 학습률과 쿨다운 방식

상수 학습률과 쿨다운 접근 방식은 학습률을 대부분의 학습 동안 일정하게 유지하다가, 마지막 단계에서만 급격히 감소시키는 방식입니다. 이는 학습 초기에 충분한 탐색을 허용하고, 마지막에는 세밀한 조정을 통해 최적의 해를 찾을 수 있게 합니다.

  • 수학적 표현

    쿨다운 단계의 학습률 \(\eta\)는 다음과 같이 정의됩니다.

    \(\eta(n) = \begin{cases} \eta_{\text{max}} & \text{if } n < N_{\text{warmup}} \\ \eta_{\text{max}} \cdot f(n, N, N_{\text{decay}}) & \text{if } n > N - N_{\text{decay}} \end{cases}\)
    상기 수식에서 \(N_{\text{warmup}}\)은 워밍업 단계의 길이, \(N_{\text{decay}}\)는 쿨다운 단계의 길이, \(f(n, N, N_{\text{decay}})\)는 시간에 따라 감소하는 함수입니다.

  • 쿨다운 함수의 선택

    쿨다운 기능으로는 선형 감소가 일반적이지만, 본 논문에서는 \((1 - \sqrt{x})\) 형태를 제안하여 더 나은 성능을 제공합니다.

실험 결과 및 분석

실험을 통해 상수 학습률과 쿨다운 방식이 기존의 코사인 learning schedule과 유사하거나 더 나은 결과를 제공함을 확인했습니다. 특히, 쿨다운 단계에서 급격한 학습률 감소가 모델의 성능을 크게 향상시키는 주요 요인으로 작용했습니다.

결론 및 향후 연구 방향

이 논문은 대규모 언어모델 학습에서 코사인 learning schedule을 대체할 수 있는 새로운 learning schedule 방식을 제안하며, 이를 통해 학습 비용을 절감하고 연구의 유연성을 증가시킬 수 있음을 보여줍니다. 향후 연구에서는 다양한 모델과 데이터셋에 대한 이 방법의 적용 가능성을 더 폭넓게 탐색할 예정이라고 합니다.

Previous: Principled Instructions Next: Model | MAP-Neo*

post contain ""

    No matching posts found containing ""