FuseChat: 채팅 모델의 지식 융합
FuseChat: Knowledge Fusion of Chat Models
August 15, 2024
저자: Fanqi Wan, Longguang Zhong, Ziyi Yang, Ruijun Chen, Xiaojun Quan
cs.AI
초록
대형 언어 모델 (LLM)을 처음부터 훈련하는 것은 특정 능력과 강점을 갖춘 모델을 만들어낼 수 있지만, 상당한 비용이 소요되며 역량의 중복을 초래할 수 있습니다. 지식 융합은 다양한 아키텍처와 능력을 갖춘 기존 LLM을 가볍게 계속해서 훈련하여 비용이 많이 드는 LLM 개발 필요성을 줄이는 것을 목표로 합니다. 본 연구에서는 두 가지 주요 단계를 거친 채팅 LLM의 지식 융합을 위한 새로운 프레임워크를 제안합니다. 이를 통해 FuseChat이라는 결과물이 탄생합니다. 먼저, 다양한 구조와 규모의 원본 채팅 LLM에 대해 쌍별 지식 융합을 실시하여 가벼운 미세 조정을 통해 동일한 구조와 크기의 여러 대상 LLM을 생성합니다. 이 과정에서 통계 기반의 토큰 정렬 접근 방식이 서로 다른 구조의 LLM을 융합하는 데 중요한 역할을 합니다. 둘째, 이러한 대상 LLM을 매개 변수 공간 내에서 병합하는데, 미세 조정 전후의 매개 변수 업데이트 크기를 기반으로 병합 계수를 결정하는 새로운 방법을 제안합니다. 우리는 OpenChat-3.5-7B, Starling-LM-7B-alpha, NH2-SOLAR-10.7B, InternLM2-Chat-20B, Mixtral-8x7B-Instruct, Qwen-1.5-Chat-72B를 포함한 다양한 아키텍처와 규모의 6가지 주요 채팅 LLM을 사용하여 FuseChat을 구현하고 검증합니다. AlpacaEval 2.0 및 MT-Bench 두 가지 명령 따르기 벤치마크 실험 결과는 FuseChat-7B가 다양한 크기의 기준선보다 우월함을 입증합니다. 우리의 모델은 심지어 더 큰 Mixtral-8x7B-Instruct와 MT-Bench에서 GPT-3.5-Turbo-1106에 근접합니다. 우리의 코드, 모델 가중치 및 데이터는 https://github.com/fanqiwan/FuseAI에서 공개되어 있습니다.
English
While training large language models (LLMs) from scratch can indeed lead to
models with distinct capabilities and strengths, it incurs substantial costs
and may lead to redundancy in competencies. Knowledge fusion aims to integrate
existing LLMs of diverse architectures and capabilities into a more potent LLM
through lightweight continual training, thereby reducing the need for costly
LLM development. In this work, we propose a new framework for the knowledge
fusion of chat LLMs through two main stages, resulting in FuseChat. Firstly, we
conduct pairwise knowledge fusion on source chat LLMs of varying structures and
scales to create multiple target LLMs with identical structure and size via
lightweight fine-tuning. During this process, a statistics-based token
alignment approach is introduced as the cornerstone for fusing LLMs with
different structures. Secondly, we merge these target LLMs within the parameter
space, where we propose a novel method for determining the merging coefficients
based on the magnitude of parameter updates before and after fine-tuning. We
implement and validate FuseChat using six prominent chat LLMs with diverse
architectures and scales, including OpenChat-3.5-7B, Starling-LM-7B-alpha,
NH2-SOLAR-10.7B, InternLM2-Chat-20B, Mixtral-8x7B-Instruct, and
Qwen-1.5-Chat-72B. Experimental results on two instruction-following
benchmarks, AlpacaEval 2.0 and MT-Bench, demonstrate the superiority of
FuseChat-7B over baselines of various sizes. Our model is even comparable to
the larger Mixtral-8x7B-Instruct and approaches GPT-3.5-Turbo-1106 on MT-Bench.
Our code, model weights, and data are public at
https://github.com/fanqiwan/FuseAI.Summary
AI-Generated Summary