ChatPaper.aiChatPaper

FuseChat: Kennisintegratie van Chatmodellen

FuseChat: Knowledge Fusion of Chat Models

February 25, 2024
Auteurs: Fanqi Wan, Ziyi Yang, Longguang Zhong, Xiaojun Quan, Xinting Huang, Wei Bi
cs.AI

Samenvatting

Hoewel het trainen van grote taalmodelen (LLMs) vanaf nul inderdaad kan leiden tot modellen met unieke capaciteiten en sterke punten, brengt deze aanpak aanzienlijke kosten met zich mee en kan het leiden tot potentiële redundantie in vaardigheden. Een alternatieve strategie is om bestaande LLMs te combineren tot een robuuster LLM, waardoor de noodzaak voor dure pre-training wordt verminderd. Echter, vanwege de diverse architecturen van LLMs blijkt directe parameterblending onhaalbaar. Recentelijk introduceerde FuseLLM het concept van kennisfusie om de collectieve kennis van meerdere structureel verschillende LLMs over te dragen naar een doel-LLM via lichtgewicht continue training. In dit rapport breiden we de schaalbaarheid en flexibiliteit van het FuseLLM-framework uit om de fusie van chat-LLMs te realiseren, wat resulteert in FuseChat. FuseChat bestaat uit twee hoofdstadia. Ten eerste ondernemen we kennisfusie voor structureel en schaalvariërende bron-LLMs om meerdere doel-LLMs van identieke structuur en grootte te verkrijgen via lichtgewicht fine-tuning. Vervolgens worden deze doel-LLMs samengevoegd binnen de parameterruimte, waarbij we een nieuwe methode voorstellen om de samenvoegingsgewichten te bepalen op basis van de variatieratio van parametermatrices voor en na fine-tuning. We valideren onze aanpak met drie prominente chat-LLMs met diverse architecturen en schalen, namelijk NH2-Mixtral-8x7B, NH2-Solar-10.7B en OpenChat-3.5-7B. Experimentele resultaten over verschillende chatdomeinen tonen de superioriteit van \textsc{FuseChat-7B} aan over een breed spectrum van chat-LLMs op 7B en 34B schalen, waarbij het zelfs GPT-3.5 (maart) overtreft en Mixtral-8x7B-Instruct benadert. Onze code, modelgewichten en data zijn openbaar toegankelijk op https://github.com/fanqiwan/FuseLLM.
English
While training large language models (LLMs) from scratch can indeed lead to models with distinct capabilities and strengths, this approach incurs substantial costs and may lead to potential redundancy in competencies. An alternative strategy is to combine existing LLMs into a more robust LLM, thereby diminishing the necessity for expensive pre-training. However, due to the diverse architectures of LLMs, direct parameter blending proves to be unfeasible. Recently, FuseLLM introduced the concept of knowledge fusion to transfer the collective knowledge of multiple structurally varied LLMs into a target LLM through lightweight continual training. In this report, we extend the scalability and flexibility of the FuseLLM framework to realize the fusion of chat LLMs, resulting in FuseChat. FuseChat comprises two main stages. Firstly, we undertake knowledge fusion for structurally and scale-varied source LLMs to derive multiple target LLMs of identical structure and size via lightweight fine-tuning. Then, these target LLMs are merged within the parameter space, wherein we propose a novel method for determining the merging weights based on the variation ratio of parameter matrices before and after fine-tuning. We validate our approach using three prominent chat LLMs with diverse architectures and scales, namely NH2-Mixtral-8x7B, NH2-Solar-10.7B, and OpenChat-3.5-7B. Experimental results spanning various chat domains demonstrate the superiority of \textsc{FuseChat-7B} across a broad spectrum of chat LLMs at 7B and 34B scales, even surpassing GPT-3.5 (March) and approaching Mixtral-8x7B-Instruct. Our code, model weights, and data are openly accessible at https://github.com/fanqiwan/FuseLLM.
PDF405December 15, 2024