ChatPaper.aiChatPaper

중재자: 메모리 효율적인 LLM 병합과 매개변수 충돌 및 불확실성 기반 라우팅

Mediator: Memory-efficient LLM Merging with Less Parameter Conflicts and Uncertainty Based Routing

February 6, 2025
저자: Kunfeng Lai, Zhenheng Tang, Xinglin Pan, Peijie Dong, Xiang Liu, Haolan Chen, Li Shen, Bo Li, Xiaowen Chu
cs.AI

초록

모델 병합은 서로 다른 작업에서 세밀 조정된 대형 언어 모델(Large Language Models, LLMs)을 강력한 모델로 통합합니다. 그러나 모델 간의 매개변수 충돌은 평균화에서 성능 저하로 이어집니다. 모델 라우팅은 추론 중에 개별 모델을 선택하여 이 문제를 해결하지만, 과도한 저장 및 계산 비용을 요구하며 서로 다른 모델의 공통 지식을 활용하지 못합니다. 본 연구에서는 다른 레이어가 다양한 수준의 매개변수 충돌을 나타내는 것을 관찰했습니다. 이 통찰력을 기반으로, 우리는 최소한의 매개변수 충돌을 가진 레이어를 평균화하고 중요한 충돌이 있는 레이어에 대해 새로운 작업 수준 전문가 라우팅을 사용합니다. 저장 비용을 더욱 줄이기 위해, 작업 산술 희소성에서 영감을 받아 여러 번 세밀하게 조정된 전문가들을 밀집 전문가와 여러 희소 전문가로 분리합니다. 분포 밖 샘플을 고려하여, 입력 데이터의 작업 불확실성에 기초하여 적절한 전문가를 선택하고 병합합니다. 우리는 다양한 매개변수 규모를 갖는 LLaMA와 Qwen에서 광범위한 실험을 수행하고 실제 추론 작업에서 평가합니다. 결과는 우리의 방법이 기존 방법과 비교하여 시스템 비용이 적게 들면서도 일관되게 중요한 성능 향상을 달성한다는 것을 입증합니다.
English
Model merging aggregates Large Language Models (LLMs) finetuned on different tasks into a stronger one. However, parameter conflicts between models leads to performance degradation in averaging. While model routing addresses this issue by selecting individual models during inference, it imposes excessive storage and compute costs, and fails to leverage the common knowledge from different models. In this work, we observe that different layers exhibit varying levels of parameter conflicts. Building on this insight, we average layers with minimal parameter conflicts and use a novel task-level expert routing for layers with significant conflicts. To further reduce storage costs, inspired by task arithmetic sparsity, we decouple multiple fine-tuned experts into a dense expert and several sparse experts. Considering the out-of-distribution samples, we select and merge appropriate experts based on the task uncertainty of the input data. We conduct extensive experiments on both LLaMA and Qwen with varying parameter scales, and evaluate on real-world reasoning tasks. Results demonstrate that our method consistently achieves significant performance improvements while requiring less system cost compared to existing methods.

Summary

AI-Generated Summary

PDF42February 13, 2025