적은 토큰으로 소규모 기본 언어 모델 사전 학습하기
Pre-training Small Base LMs with Fewer Tokens
April 12, 2024
저자: Sunny Sanyal, Sujay Sanghavi, Alexandros G. Dimakis
cs.AI
초록
우리는 기존의 대형 기본 언어 모델(LM)에서 출발하여 소형 기본 언어 모델을 개발하는 간단한 접근 방식의 효과를 연구합니다: 먼저 더 큰 LM의 몇 개의 트랜스포머 블록을 상속받은 다음, 이 더 작은 모델을 더 큰 모델의 원시 사전 학습 데이터의 매우 작은 부분집합(0.1%)으로 학습시킵니다. 우리는 이 간단한 방법을 Inheritune이라고 명명하고, 3B 파라미터의 더 큰 LM의 시작 몇 개 레이어를 사용하여 1B 토큰으로 1.5B 파라미터의 소형 기본 LM을 구축하는 데 이를 처음으로 시연합니다; 이를 위해 단일 A6000 GPU를 사용하여 반나절도 채 걸리지 않습니다. 9개의 다양한 평가 데이터셋과 MMLU 벤치마크에서, 결과 모델은 1B-2B 크기의 공개적으로 사용 가능한 기본 모델들과 비교하여 유리한 성능을 보이며, 이들 중 일부는 50-1000배 더 많은 토큰으로 학습되었습니다.
우리는 Inheritune을 약간 다른 설정에서 조사합니다. 여기서는 더 큰 LM과 그들의 전체 사전 학습 데이터셋을 활용하여 소형 LM을 학습시킵니다. 여기서 우리는 GPT2-medium(355M)과 GPT-2-large(770M)의 일부 레이어를 활용하여 학습된 소형 LM이 9B 토큰의 OpenWebText 데이터셋에서 동일한 학습 스텝 수로 처음부터 학습된 더 큰 모델의 검증 손실을 효과적으로 맞출 수 있음을 보여줍니다. 우리는 광범위한 실험을 통해 이 방법을 분석하고 다양한 설정에서 그 효능을 입증합니다. 우리의 코드는 https://github.com/sanyalsunny111/LLM-Inheritune에서 확인할 수 있습니다.
English
We study the effectiveness of a simple approach to develop a small base
language model (LM) starting from an existing large base LM: first inherit a
few transformer blocks from the larger LM, and then train this smaller model on
a very small subset (0.1\%) of the raw pretraining data of the larger model. We
call our simple recipe Inheritune and first demonstrate it for building a small
base LM with 1.5B parameters using 1B tokens (and a starting few layers of
larger LM of 3B parameters); we do this using a single A6000 GPU for less than
half a day. Across 9 diverse evaluation datasets as well as the MMLU benchmark,
the resulting model compares favorably to publicly available base models of
1B-2B size, some of which have been trained using 50-1000 times more tokens.
We investigate Inheritune in a slightly different setting where we train
small LMs utilizing larger LMs and their full pre-training dataset. Here we
show that smaller LMs trained utilizing some of the layers of GPT2-medium
(355M) and GPT-2-large (770M) can effectively match the val loss of their
bigger counterparts when trained from scratch for the same number of training
steps on OpenWebText dataset with 9B tokens. We analyze our recipe with
extensive experiments and demonstrate it efficacy on diverse settings. Our code
is available at https://github.com/sanyalsunny111/LLM-Inheritune.Summary
AI-Generated Summary