Skip to main content
QUICK REVIEW

[논문 리뷰] Effective Long-Context Scaling of Foundation Models

Wenhan Xiong, Jingyu Liu|arXiv (Cornell University)|2023. 09. 27.
Topic ModelingComputer Science인용 수 9
한 줄 요약

본 논문은 Llama 2로부터의 지속적 사전학습을 통해 최대 32k tokens의 긴 문맥 LLM 시리즈를 제시하고, 경량화된 지시 학습으로 강력한 긴 문맥 성능과 경쟁력 있는 짧은 문맥 성능을 달성하는 한편, 위치 인코딩과 학습 커리큘럼을 분석한다.

ABSTRACT

We present a series of long-context LLMs that support effective context windows of up to 32,768 tokens. Our model series are built through continual pretraining from Llama 2 with longer training sequences and on a dataset where long texts are upsampled. We perform extensive evaluation on language modeling, synthetic context probing tasks, and a wide range of research benchmarks. On research benchmarks, our models achieve consistent improvements on most regular tasks and significant improvements on long-context tasks over Llama 2. Notably, with a cost-effective instruction tuning procedure that does not require human-annotated long instruction data, the 70B variant can already surpass gpt-3.5-turbo-16k's overall performance on a suite of long-context tasks. Alongside these results, we provide an in-depth analysis on the individual components of our method. We delve into Llama's position encodings and discuss its limitation in modeling long dependencies. We also examine the impact of various design choices in the pretraining process, including the data mix and the training curriculum of sequence lengths -- our ablation experiments suggest that having abundant long texts in the pretrain dataset is not the key to achieving strong performance, and we empirically verify that long context continual pretraining is more efficient and similarly effective compared to pretraining from scratch with long sequences.

연구 동기 및 목표

  • Open 소스에서 기존 오픈 모델을 넘어선 강력한 긴 문맥 능력 시연.
  • 아주 긴 문맥을 지원하도록 아키텍처와 학습을 어떻게 수정할지 비용 문제 없이 조사.
  • 데이터 혼합, 커리큘럼, 지시 학습이 긴 문맥 성능에 미치는 영향 평가.
  • 긴 거리 모델링에 영향을 주는 위치 인코딩 및 기타 설계 선택 분석.
  • 긴 문맥 벤치마크에서 안전성을 평가하고 기존 독점 모델과의 비교.

제안 방법

  • Llama 2로부터의 지속적 사전학습을 통해 더 긴 시퀀스(최대 32,768 토큰)와 긴 텍스트의 데이터 업샘플링.
  • RoPE 위치 인코딩(기초 주파수)을 수정하여 더 긴 문맥에서의 어텐던스를 가능하게 함.
  • 긴 텍스트 존재와 데이터 품질의 영향을 평가하기 위한 데이터 혼합 실험.
  • 인적 긴 문맥 주석 없이 짧은 프롬프트 RLHF 데이터와 자체 지시(Long) 데이터를 활용한 비용 효율적인 지시 학습.
  • 32k 및 34B/70B를 각각 16k–32k 시퀀스로 훈련; 언어 모델링, 합성 프로브, 다양한 벤치마크로 평가.
  • 계속적 사전훈련과 처음부터 긴 시퀀스 사전학습 비교를 위한 학습 커리큘럼 검토.
Figure 1 : We show that our model’s validation loss can be fit as a function of the context length: $L(c)=(\frac{\alpha}{c})^{\beta}+\gamma$ with a different set of $\alpha,\beta,\gamma$ for each model size. This power-law relationship also suggests that context length is another important axis of s
Figure 1 : We show that our model’s validation loss can be fit as a function of the context length: $L(c)=(\frac{\alpha}{c})^{\beta}+\gamma$ with a different set of $\alpha,\beta,\gamma$ for each model size. This power-law relationship also suggests that context length is another important axis of s

실험 결과

연구 질문

  • RQ1오픈 소스 긴 문맥 LLM이 긴 문맥 벤치마크에서 독점적 긴 문맥 모델과 같거나 능가할 수 있는가?
  • RQ2무거운 컴퓨트 없이 긴 문맥 모델링에 가장 적합한 아키텍처 및 학습 선택은 무엇인가?
  • RQ3데이터 혼합, 커리큘럼, 지시 학습이 긴 문맥 및 짧은 문맥 성능에 어떤 영향을 미치는가?
  • RQ4위치 인코딩이 장거리 주의에 어느 정도 제한을 두며, 간단한 수정으로 문맥 길이를 효과적으로 확장할 수 있는가?
  • RQ5긴 문맥 지시 학습 모델의 안전성은 기존 기준선과 비교해 어느 정도인가?

주요 결과

  • 모델은 최대 32,768 토큰의 유효한 문맥 창을 달성하며, 문맥 길이에 따른 검증 손실의 거듭제곱 법칙(scale)적 증가를 보인다.
  • 연구 벤치마크에서 긴 문맥 모델이 Llama 2를 개선하며, 긴 문맥 작업에서 뚜렷한 이익을 보이고 일부 짧은 문맥 작업에서 완만한 이익을 보인다.
  • 70B 지시 학습 모델은 인간 주석이 없는 긴 문맥 데이터 없이도 긴 문맥 벤치마크에서 gpt-3.5-turbo-16k를 능가할 수 있다.
  • RoPE ABF(수정된 기초 주파수)가 긴 문맥 모델링에 대해 다른 위치 인코딩 변형을 능가하며, 32k 토큰에서도 성능을 유지한다.
  • 데이터 품질이 긴 텍스트의 양 자체보다 더 중요한 것으로 나타났으며, 긴 텍스트 데이터가 제한적이어도 긴 문맥 이득이 지속된다; 긴 데이터가 포함된 혼합은 짧은 문맥 지식 작업에 도움이 된다.
  • 더 긴 시퀀스를 사용하는 지속적 사전학습은 처음부터 긴 시퀀스를 훈련하는 것보다 훨씬 적은 FLOPs로 유사하거나 더 나은 결과를 달성한다.
Figure 2 : Performance on long-context tasks as the maximum context lengths of prompts increase.
Figure 2 : Performance on long-context tasks as the maximum context lengths of prompts increase.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.