Skip to main content
QUICK REVIEW

[논문 리뷰] Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Models

Xindi Wang, Mahsa Salmani|arXiv (Cornell University)|2024. 02. 03.
Topic ModelingComputer Science인용 수 3
한 줄 요약

이 종합 검토는 대규모 언어 모델(Large Language Models, LLMs)의 컨텍스트 길이를 연장하는 기법을 종합적으로 검토한다. 아키텍처적 수정(예: 수정된 위치 인코딩 및 어텐션 메커니즘)과 추론 단계 최적화(예: PagedAttention 및 FlashDecoding)에 중점을 두며, 계산 비용에 비례하지 않는 방식으로 장문의 시퀀스를 효율적으로 처리할 수 있도록 하여, 장문 컨텍스트 작업의 처리량과 확장성에 크게 기여한다.

ABSTRACT

Recently, large language models (LLMs) have shown remarkable capabilities including understanding context, engaging in logical reasoning, and generating responses. However, this is achieved at the expense of stringent computational and memory requirements, hindering their ability to effectively support long input sequences. This survey provides an inclusive review of the recent techniques and methods devised to extend the sequence length in LLMs, thereby enhancing their capacity for long-context understanding. In particular, we review and categorize a wide range of techniques including architectural modifications, such as modified positional encoding and altered attention mechanisms, which are designed to enhance the processing of longer sequences while avoiding a proportional increase in computational requirements. The diverse methodologies investigated in this study can be leveraged across different phases of LLMs, i.e., training, fine-tuning and inference. This enables LLMs to efficiently process extended sequences. The limitations of the current methodologies is discussed in the last section along with the suggestions for future research directions, underscoring the importance of sequence length in the continued advancement of LLMs.

연구 동기 및 목표

  • 대규모 언어 모델(LLMs)의 컨텍스트 길이를 연장하는 방법을 체계적으로 검토하고 분류하는 것.
  • 장시퀀스 처리에 적용 가능한 훈련, 피나이팅, 추론 단계의 기법을 분석하는 것.
  • 계산 비용, 메모리 제약, 모델 일관성과 같은 장문 시퀀스 처리의 핵심 과제를 규명하는 것.
  • 현재 기법의 한계를 부각하고 장문 컨텍스트 LLM 개발 분야의 향후 연구 방향을 제안하는 것.

제안 방법

  • 장문 컨텍스트 기법을 다섯 가지 주요 그룹으로 분류: 길이 외삽, 어텐션 근사, 어텐션 없는 트랜스포머, 모델 압축, 하드웨어 인지 트랜스포머.
  • 훈련된 컨텍스트 창을 초월한 외삽을 가능하게 하는 위치 인코딩 수정 기법(예: 로테이션 PE, 학습된 PE) 검토.
  • 스pars티티 어텐션, 스파ARSE 자기 어텐션, 스파ARSE Mixture-of-Experts와 같은 어텐션 메커니즘 변형 분석을 통해 제곱 복잡도를 감소시키는 것.
  • PagedAttention를 통한 동적 KV 캐시 관리 및 FlashDecoding를 통한 병렬 어텐션 계산 최적화와 같은 추론 단계 최적화 평가.
  • LLM-in-Flash와 같이 플래시 메모리를 활용해 DRAM 용량을 초월한 더 큰 모델을 저장하는 하드웨어 인지 방법 설문.
  • 프롬프트 압축 및 컨텍스트 창 분할을 통한 입력 길이 감소 기법 평가 — 의미 정보를 유지하면서도 모델 재학습 없이 효율성 향상.
Figure 1: Taxonomy of Long-context LLM literature, which includes five distinct sections: length extrapolation, attention approximation, attention-free transformers, model compression, and hardware-aware transformers. We also establish connections between the methodologies and their related applicab
Figure 1: Taxonomy of Long-context LLM literature, which includes five distinct sections: length extrapolation, attention approximation, attention-free transformers, model compression, and hardware-aware transformers. We also establish connections between the methodologies and their related applicab

실험 결과

연구 질문

  • RQ1LLMs는 원래 훈련 컨텍스트 창을 초월하는 더 긴 시퀀스를 어떻게 처리할 수 있는가?
  • RQ2최소한의 계산 오버헤드로 효율적인 장시퀀스 어텐션을 가능하게 하는 아키텍처 수정은 무엇인가?
  • RQ3PagedAttention 및 FlashDecoding와 같은 추론 단계 최적화는 처리량과 메모리 활용도를 어떻게 향상시키는가?
  • RQ4플래시 메모리 사용과 같은 하드웨어 인지 설계는 어떤 역할을 하는가?
  • RQ5현재 장문 컨텍스트 LLM 기법의 핵심 한계와 열린 과제는 무엇인가?

주요 결과

  • PagedAttention는 자동 생성 과정에서 메모리 분할을 줄이고 GPU 활용도를 향상시켜 더 높은 서빙 처리량을 가능하게 한다.
  • FlashDecoding는 키와 값에 대한 새로운 병렬화 차원을 도입함으로써 매우 긴 시퀀스에서 최대 8배 빠른 생성 속도를 달성한다.
  • LLM-in-Flash는 플래시 메모리와 온디맨드 로딩 및 희소성 인지 계산을 활용해 가용 DRAM보다 두 배 큰 모델을 실행할 수 있도록 한다.
  • 로테이션 PE와 같은 위치 인코딩 수정 기법은 미세조정 없이도 훈련 길이를 초월한 더 긴 시퀀스로 일반화할 수 있도록 한다.
  • 스pars티티 어텐션과 같은 어텐션 근사 기법은 제곱 복잡도를 감소시켜 장문 컨텍스트 처리의 계산 가능성을 높인다.
  • 프롬프트 압축 및 컨텍스트 창 분할은 필수 정보를 유지하면서 입력 길이를 줄여 모델 재학습 없이도 효율성을 향상시킨다.

이 논문 읽기

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

누빈트에서 이 논문 읽기

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