Skip to main content
QUICK REVIEW

[논문 리뷰] Get more for less: Principled Data Selection for Warming Up Fine-Tuning in LLMs

Feiyang Kang, Hoang Anh Just|arXiv (Cornell University)|2024. 05. 05.
Natural Language Processing TechniquesComputer Science인용 수 3
한 줄 요약

이 논문은 최적 운반(optimal transport)을 사용하여 사전 훈련 분포와 대상 분포 간의 분포 이탈을 측정함으로써 사전 미세조정 전에 사전 훈련 분포를 대상 분포에 더 가깝게 만드는 원리적인 데이터 선택 방법인 GOT-D를 제안한다. 이는 GPT-2 XL 및 최대 2.7B 파라미터 모델을 사용한 자연어 이해(NLU), 자연어 생성(NLG), 제로샷 태스크에서 뛰어난 성능을 기록하며, 단일 GPU 시간 내에 수백만 개의 샘플로 확장 가능하다.

ABSTRACT

This work focuses on leveraging and selecting from vast, unlabeled, open data to pre-fine-tune a pre-trained language model. The goal is to minimize the need for costly domain-specific data for subsequent fine-tuning while achieving desired performance levels. While many data selection algorithms have been designed for small-scale applications, rendering them unsuitable for our context, some emerging methods do cater to language data scales. However, they often prioritize data that aligns with the target distribution. While this strategy may be effective when training a model from scratch, it can yield limited results when the model has already been pre-trained on a different distribution. Differing from prior work, our key idea is to select data that nudges the pre-training distribution closer to the target distribution. We show the optimality of this approach for fine-tuning tasks under certain conditions. We demonstrate the efficacy of our methodology across a diverse array of tasks (NLU, NLG, zero-shot) with models up to 2.7B, showing that it consistently surpasses other selection methods. Moreover, our proposed method is significantly faster than existing techniques, scaling to millions of samples within a single GPU hour. Our code is open-sourced (Code repository: https://anonymous.4open.science/r/DV4LLM-D761/ ). While fine-tuning offers significant potential for enhancing performance across diverse tasks, its associated costs often limit its widespread adoption; with this work, we hope to lay the groundwork for cost-effective fine-tuning, making its benefits more accessible.

연구 동기 및 목표

  • 희소하고 작업 특화된 데이터셋에 대해 대규모 언어 모델을 미세조정하는 데 드는 높은 비용과 제한된 데이터 효율성 문제를 해결하기 위해.
  • 모수화된 오픈 라벨 없음 데이터 세트에서 선택된 서브셋을 사전 미세조정하여 목표 미세조정 성능을 향상시키기 위해.
  • 저비용 조건에서도 확장 가능하고 일반화 가능하며 효과적인 데이터 선택 전략을 설계하기 위해.
  • 기존 방법들이 대상 분포에 가까운 샘플을 우선시함으로써 사전 훈련에서 이미 잘 표현된 샘플을 선택하는 한계를 극복하기 위해.
  • 이중 단계 미세조정에서 데이터 선택을 위한 이론적으로 탄탄하고 계산적으로 효율적인 방법을 수립하기 위해.

제안 방법

  • 최적 운반 거리가 사전 훈련 분포와 대상 분포 간의 최소화가 되는 데이터를 선택하는 GOT-D(Goals of Optimal Transport for Data Selection)를 제안한다.
  • 사전 훈련 분포를 나타내기 위해 프록시 사전 훈련 데이터(예: 일반적인 오픈소스 데이터셋)를 사용하고 분포 이탈을 계산한다.
  • 효율적인 최적 운반 거리 계산을 위해 문장 임베딩(예: sentence-transformer, distill-BERT)을 활용하여 데이터 포인트를 임bedding한다.
  • 예산 제약 조건 하에서 다양성과 커버리지 보장을 위해 데이터 선택을 서브모듈러 최적화 문제로 공식화한다.
  • 확장 가능한 GPU 가속 선택을 가능하게 하기 위해 최적 운반 목적함수에 기반한 기울기 기반 근사 기법을 적용한다.
  • 선택된 데이터를 이중 단계 미세조정 파이프라인에 통합한다: 먼저 선택된 오픈 데이터에서 사전 미세조정을 수행하고, 그 다음 제한된 라벨 데이터에서 목표 지향적 미세조정을 수행한다.
Figure 2: Data Selection Setting. Given a pretrained model trained on pretraining data (red), we select additional data (blue) to fine-tune the model for a target task. We divide fine-tuning into two parts: I. Pre-Fine-Tuning and II. Targeted Fine-Tuning. Since labeled target data (green) can be exp
Figure 2: Data Selection Setting. Given a pretrained model trained on pretraining data (red), we select additional data (blue) to fine-tune the model for a target task. We divide fine-tuning into two parts: I. Pre-Fine-Tuning and II. Targeted Fine-Tuning. Since labeled target data (green) can be exp

실험 결과

연구 질문

  • RQ1사전 훈련 데이터와 대상 데이터 간의 분포 간격을 최소화하는 데이터 선택이 후속 미세조정 성능 향상에 기여하는가?
  • RQ2GOT-D는 분포 일치 기반 베이스라인(DSIR, TAPT/c)과 비교해 데이터 효율성과 성능 향상 측면에서 어떻게 다른가?
  • RQ3GOT-D는 대규모 오픈 데이터셋에 얼마나 잘 확장될 수 있으며, 계산 비용은 얼마나 낮게 유지되는가?
  • RQ4임bedding 공간의 선택이 데이터 선택 파이프라인 성능에 상당한 영향을 미치는가?
  • RQ5GOT-D는 자연어 이해(NLU), 자연어 생성(NLG), 제로샷 설정을 포함한 다양한 NLP 작업에 일반화 가능한가?

주요 결과

  • GPT-2 XL을 사용한 AGNews 데이터셋에서 GOT-D는 20,000개의 사전 미세조정 샘플에서 61.4%의 정확도를 기록했으며, 베이스라인 대비 11.9% 향상되었고, DSIR(53.1%)와 TAPT/c(57.0%)를 모두 능가했다.
  • gpt-neo(2.7B)를 사용한 BoolQ 데이터셋에서 GOT-D는 40,000개 샘플에서 57.7%의 정확도를 기록했으며, 베이스라인 대비 6.6% 향상되었고, DSIR(53.3%)와 TAPT/c(51.2%)를 초월했다.
  • GOT-D는 다양한 작업에서 최고 성능을 기록했으며, 제로샷 평가를 포함하여 작업 유형이나 모델 크기와 관계없이 일관된 성능 향상을 보였다.
  • 이 방법은 단일 GPU 시간 내에 수백만 개의 샘플로 확장되었으며, 기존 기울기 기반 또는 재학습 기반 방법 대비 계산 효율성 측면에서 뚜렷한 승리를 거두었다.
  • 제거 실험 결과, sentence-transformer 임베딩이 distill-BERT와 유사한 성능을 보였으며, 의미적 구조를 잘 포착하는 한 임베딩 공간의 선택은 중요하지 않음을 시사했다.
  • LDA 단어 클라우드를 통한 시각화 결과, GOT-D는 후보 세트에서 희귀하지만 대상 작업에 중요한 형식적인 비즈니스 뉴스 콘텐츠(예: '은행', '시장')를 선택한 것으로 확인되었다.
Figure 3: Consider an LLM pre-trained on a large corpus of $99$ % cat examples and $1$ % dog examples. The target task consists of 50% cat examples and 50% dog examples. The model’s relative lack of knowledge of dogs will be its performance bottleneck on the target task. Before deploying the LLM on
Figure 3: Consider an LLM pre-trained on a large corpus of $99$ % cat examples and $1$ % dog examples. The target task consists of 50% cat examples and 50% dog examples. The model’s relative lack of knowledge of dogs will be its performance bottleneck on the target task. Before deploying the LLM on

이 논문 읽기

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

누빈트에서 이 논문 읽기

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