ChatPaper.aiChatPaper

소형 언어 모델을 활용한 대형 언어 모델 미세 조정을 위한 에뮬레이터

An Emulator for Fine-Tuning Large Language Models using Small Language Models

October 19, 2023
저자: Eric Mitchell, Rafael Rafailov, Archit Sharma, Chelsea Finn, Christopher D. Manning
cs.AI

초록

널리 사용되는 언어 모델(LMs)은 일반적으로 두 단계의 학습 파이프라인을 확장하여 구축됩니다: 매우 크고 다양한 텍스트 데이터셋을 사용하는 사전 학습 단계와, 원하는 행동을 위한 타겟 예제나 기타 명세를 사용하는 미세 조정(때로는 '정렬'이라고도 함) 단계입니다. 지식과 기술이 사전 학습에서 비롯되고, 미세 조정은 주로 이러한 지식과 기술을 필터링한다는 가설이 제기되었지만, 이 직관은 광범위하게 검증되지 않았습니다. 이를 돕기 위해, 우리는 이 두 단계에서 얻은 지식과 기술을 분리하는 새로운 기법을 소개하여, "대형 모델이 사전 학습 중에 습득한 지식과 소형 모델이 미세 조정 중에 습득한 지식을 결합하면(또는 그 반대의 경우) 어떤 일이 발생할까?"라는 질문에 직접 답할 수 있도록 합니다. 인간 선호도 학습의 최근 발전에서 파생된 RL 기반 프레임워크를 사용하여, 우리는 사전 학습과 미세 조정의 결과를 근사(또는 '에뮬레이트')하는 분포에서 샘플링하는 원칙적이고 실용적인 방법인 에뮬레이트된 미세 조정(EFT)을 소개합니다. EFT를 사용한 실험 결과, 미세 조정을 확장하면 도움성이 향상되는 반면, 사전 학습을 확장하면 사실성이 향상되는 경향이 있음을 보여줍니다. 규모 분리 외에도, EFT는 추가 학습 없이 도움성과 무해성과 같은 경쟁적인 행동 특성을 테스트 시간에 조정할 수 있음을 보여줍니다. 마지막으로, 에뮬레이트된 미세 조정의 특수한 경우인 LM 업스케일링은 대형 사전 학습 모델의 자원 집약적인 미세 조정을 피하고, 소형 미세 조정 모델과 앙상블하여 대형 사전 학습 모델을 미세 조정한 결과를 에뮬레이트합니다. 업스케일링은 추가 하이퍼파라미터나 학습 없이도 Llama, Llama-2, Falcon 패밀리의 명령어 수행 모델의 도움성과 사실성을 지속적으로 개선합니다.
English
Widely used language models (LMs) are typically built by scaling up a two-stage training pipeline: a pre-training stage that uses a very large, diverse dataset of text and a fine-tuning (sometimes, 'alignment') stage that uses targeted examples or other specifications of desired behaviors. While it has been hypothesized that knowledge and skills come from pre-training, and fine-tuning mostly filters this knowledge and skillset, this intuition has not been extensively tested. To aid in doing so, we introduce a novel technique for decoupling the knowledge and skills gained in these two stages, enabling a direct answer to the question, "What would happen if we combined the knowledge learned by a large model during pre-training with the knowledge learned by a small model during fine-tuning (or vice versa)?" Using an RL-based framework derived from recent developments in learning from human preferences, we introduce emulated fine-tuning (EFT), a principled and practical method for sampling from a distribution that approximates (or 'emulates') the result of pre-training and fine-tuning at different scales. Our experiments with EFT show that scaling up fine-tuning tends to improve helpfulness, while scaling up pre-training tends to improve factuality. Beyond decoupling scale, we show that EFT enables test-time adjustment of competing behavioral traits like helpfulness and harmlessness without additional training. Finally, a special case of emulated fine-tuning, which we call LM up-scaling, avoids resource-intensive fine-tuning of large pre-trained models by ensembling them with small fine-tuned models, essentially emulating the result of fine-tuning the large pre-trained model. Up-scaling consistently improves helpfulness and factuality of instruction-following models in the Llama, Llama-2, and Falcon families, without additional hyperparameters or training.
PDF131December 15, 2024