dhkim0225 / 1day_1paper

read 1 paper everyday (only weekday)
53 stars 1 forks source link

[88] Training Compute-Optimal Large Language Models (Chinchilla) #117

Open dhkim0225 opened 2 years ago

dhkim0225 commented 2 years ago

현재 LLM 들은 학습이 덜 되었다 !! Gopher 모델을 주된 비교군으로 놓았음. Gopher 에서 4배만큼 parameter 를 줄이고, 4배만큼 training 데이터를 늘렸더니, SOTA 를 찍더라.

paper

아래 그림에서 FLOPs 는 Training cost 로 이해하면 된다. 비슷하게 COST 를 쓴 상태에서 적은 parameter, 더 많은 iteration 과 함께라면,,,, SOTA !! image

image

결국 이 논문에서 하고 싶은 건, Scaling-Law 를 찾는 일이다. ~사실 PaLM #116 에서 보여주었듯이 정말정말 큰 모델에서는 해당 work의 Law가 적용되지 않을 수 있다.~

Scaling Law 찾기 실험 3개

N == Model Parameters D == Training Tokens

Scaling laws for neural language models. 논문에서도 scaling law 를 찾아나가는데, 이게 좀 더 최적화된 lr schedule 등을 넣었더니 완전히 양상이 달라지더라.

image final pre-training loss 를 L(N, D) 로 두고 같은 training cost 내에서 이를 최소화 시키는 N, D 를 𝑁_𝑜𝑝𝑡, 𝐷_𝑜𝑝𝑡 라고 함

Fix model sizes & vary number of training tokens

paramter 는 70M 에서 10B 까지 중에서 고르고, 각 모델마다 4개의 lr schedule 을 적용하며, 각 모델마다 4개의 다른 training token 개수를 사용토록 했다. 즉, 모델 하나마다 16개 실험. image

여기서 다음과 같이 두 식을 정의하고, 𝑁_𝑜𝑝𝑡 ∝ 𝐶^a 𝑁_𝑜𝑝𝑡 ∝ 𝐶^b a 와 b coefficient 를 계산해 보니까, 각각 0.5, 0.5 가 나오더라.

IsoFLOP profiles

같은 training FLOPs 를 두고, paramter 는 70M 에서 10B 까지 모델을 키워나가고, training token 수는 그에 맞춰서 줄여나갔다. image

여기서도 다음과 같이 두 식을 정의하고, 𝑁_𝑜𝑝𝑡 ∝ 𝐶^a 𝑁_𝑜𝑝𝑡 ∝ 𝐶^b a 와 b coefficient 를 계산해 보니까, 각각 0.49, 0.51 이 나오더라.

Fitting a parametric loss function

1 approach, 2 approach 의 모든 실험을 갖고, (𝐴, 𝐵, 𝐸, 𝛼, 𝛽) 를 huber loss 로 fitting 해 봤다. huber loss 가 outlier 에 robust 해서 정확도가 좋았다고 한다. image

image

결과는 a == 0.46, b == 0.54

결과 정리

image

Chinchilla

따라서 다음과 같이 Chinchilla 를 정의한다 image ahepfdms 4배 줄이고, training token 은 4배 늘리고.

Results

Language Modelling

Pile Evaluation

image

MMLU (Massive Multitask Language Understanding)

image

Reading comprehension

image

BIG-bench

image

Closed book QA

image

Gender bias and toxicity

image image