Skip to main content
QUICK REVIEW

[논문 리뷰] Arcee's MergeKit: A Toolkit for Merging Large Language Models

Charles Goddard, Shamane Siriwardhana|arXiv (Cornell University)|2024. 03. 20.
Topic ModelingComputer Science인용 수 3
한 줄 요약

이 논문은 재학습 없이도 대규모 언어 모델 체크포인트를 효율적으로 병합할 수 있도록 해주는 오픈소스 툴킷인 MergeKit을 소개한다. 선형 보간법(LERP) 및 구면 보간법(SLERP), TIES와 같은 기법을 활용하여 동일한 아키텍처를 가진 모델을 병합한다. 주요 기여는 재학습 없이도 확장 가능하고 하드웨어에 유연한 프레임워크로서, Open LLM 리더보드에서 상위 성능을 기록한 오픈소스 모델들을 생성한 점이다.

ABSTRACT

The rapid expansion of the open-source language model landscape presents an opportunity to merge the competencies of these model checkpoints by combining their parameters. Advances in transfer learning, the process of fine-tuning pretrained models for specific tasks, has resulted in the development of vast amounts of task-specific models, typically specialized in individual tasks and unable to utilize each other's strengths. Model merging facilitates the creation of multitask models without the need for additional training, offering a promising avenue for enhancing model performance and versatility. By preserving the intrinsic capabilities of the original models, model merging addresses complex challenges in AI - including the difficulties of catastrophic forgetting and multitask learning. To support this expanding area of research, we introduce MergeKit, a comprehensive, open-source library designed to facilitate the application of model merging strategies. MergeKit offers an extensible framework to efficiently merge models on any hardware, providing utility to researchers and practitioners. To date, thousands of models have been merged by the open-source community, leading to the creation of some of the worlds most powerful open-source model checkpoints, as assessed by the Open LLM Leaderboard. The library is accessible at https://github.com/arcee-ai/MergeKit.

연구 동기 및 목표

  • 각각 별도의 저장소와 추론 리소스가 필요한 작업별 특화된 LLM을 배포하고 유지보수하는 과제를 해결한다.
  • 지속적 학습 및 다중 작업 학습에서의 치명적 기억 상실 문제를 해결하기 위해 피팅 트레이닝 없이 사전 학습된 모델을 융합한다.
  • 연구자 및 실무자들이 전문 모델(예: 의료, 코딩 등)의 장점을 통합하여 통합된 고성능 모델을 구축할 수 있도록 한다.
  • 다양한 병합 전략을 지원하고 CPU와 GPU 모두에서 확장 가능한 커뮤니티 기반의 확장성 있는 프레임워크를 제공한다.
  • 모델 개발 및 배포의 비용과 복잡성을 줄여 고급 LLM 기능에 대한 접근성을 보다 널리 확산시킨다.

제안 방법

  • LERP, SLERP, TIES, DARE-TIES와 같은 다양한 모델 병합 전략을 지원하는 모듈식이고 확장 가능한 아키텍처를 구현한다.
  • 선형 모드 연결성(LMC)과 순열 대칭성을 활용하여 동일한 베이스에서 시작한 모델들의 가중치 공간을 정렬함으로써 안정적인 병합을 가능하게 한다.
  • 동일한 아키텍처이지만 다른 초기화를 가진 모델의 병합을 위해 TIES와 같은 기법을 활용하여 기울기 기반 최적화를 통한 병합 가중치를 최적화한다.
  • CPU와 GPU 하드웨어에서 모두 효율적으로 작동하도록 툴킷을 설계하여 광범위한 접근성과 배포의灵活性를 확보한다.
  • Hugging Face 모델 허브와 통합하여 커뮤니티 내에서 모델 탐색, 공유, 상호 운용성을 용이하게 한다.
  • 재현 가능성과 사용 편의성을 높이기 위해 YAML 기반 사양을 사용하는 구성 기반 인터페이스를 제공하여 병합 파이프라인을 정의한다.
Figure 1: Classification of model merging methods. We currently support the model merging methods outlined on the left, and we are actively working to incorporate additional merging techniques such as ZipIt, OT Fusion, and Git Rebasin.
Figure 1: Classification of model merging methods. We currently support the model merging methods outlined on the left, and we are actively working to incorporate additional merging techniques such as ZipIt, OT Fusion, and Git Rebasin.

실험 결과

연구 질문

  • RQ1재학습 없이도 작업별 특화된 LLM을 체계적으로 병합하여 단일 통합 모델로 조합할 수 있는 방법은 무엇인가? 특별히 치명적 기억 상실을 방지할 수 있는가?
  • RQ2LERP, SLERP, TIES와 같은 기법 중에서 원본 모델의 능력을 유지하고 향상시키는 데 가장 효과적인 병합 기법은 무엇인가?
  • RQ3의료, 코딩, 일반 지시 따르기 등 특수 분야에서 병합된 모델이 개별 기반 모델보다 얼마나 뛰어난 성능을 보일 수 있는가?
  • RQ4병합된 모델의 성능는 특히 파rameter 효율성과 추론 품질 측면에서 최신 기술 수준의 더 큰 규모의 모델과 비교해 어떻게 되는가?
  • RQ5다양한 하드웨어와 사용 사례에 걸쳐 확장 가능하고 커뮤니티가 확장 가능한 모델 병합 툴킷을 설계하기 위한 아키텍처 및 엔지니어링 원칙은 무엇인가?

주요 결과

  • 모든 병합된 모델들이 USMLE, MedMCQA, PubMedQA 등의 의료 벤치마크에서 Meditron-7B 모델을 모두 초월하여 도메인 특화 성능이 향상됨을 입증했다.
  • SLERP 및 LERP 기법을 사용해 병합한 모델들이 일반 벤치마크에서 Llama2-7B 챗 모델의 성능을 초월하여 일반화 능력과 다중 작업 처리 능력이 향상됨을 보였다.
  • 'RubielLabarta/LogoS-7Bx2-MoE-13B-v0.2'라는 병합 모델이 Open LLM 리더보드에서 17위를 기록하여 높은 성능을 달성했으며, 뿌리가 130억 파라미터에 불과함에도 불구하고 350억~700억 파라미터가 넘는 많은 병합되지 않은 모델들을 능가했다.
  • 혼합 전문가(MoE) 아키텍처를 포함한 병합 모델들은 계산 효율성을 최적화하면서도 놀라운 성능을 보였으며, 이는 모델 병합이 파라미터 효율적인 확장에 잠재력을 지닌다는 점을 시사한다.
  • 수천 개의 모델이 MergeKit를 통해 성공적으로 병합되었으며, 많은 경우 최신 기술 수준의 결과를 달성하여 프레임워크의 실제 영향력과 확장성을 확인했다.
  • 메모리 제약이 있는 CPU에서도 고성능 병합을 수행할 수 있도록 툴킷이 설계되어, 고성능 GPU가 없는 연구자들에게도 넓은 하드웨어 호환성과 접근성을 제공함을 입증했다.
Figure 2: MergeKit structure with key modules for adding new merge methods. The diagram depicts the workflow for introducing new merge methods in the MergeKit repository. Initially, tensors are extracted from two models, A and B, and processed by the ‘Architecture’ module to ensure their structural
Figure 2: MergeKit structure with key modules for adding new merge methods. The diagram depicts the workflow for introducing new merge methods in the MergeKit repository. Initially, tensors are extracted from two models, A and B, and processed by the ‘Architecture’ module to ensure their structural

이 논문 읽기

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

누빈트에서 이 논문 읽기

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