FedMKT: Federated Mutual Knowledge Transfer for Large and Small Language Models
Tao Fan, Guoqiang Ma, Yan Kang, Hanlin Gu, Yuanfeng Song, Lixin Fan, Kai Chen, Qiang Yang
TL;DR
FedMKT tackles the problem of mutually enhancing server large language models (LLMs) and client small language models (SLMs) in a federated setting. It introduces two key components: Bidirectional Token Alignment using a minimum edit distance-based vocabulary mapping and a DualMinCE-driven selective knowledge transfer framework that leverages LoRA adapters and distillation losses $\\mathcal{L}_2$ and $\\mathcal{L}_3$ to transfer knowledge in both directions via a public dataset $\\mathcal{D}_p$. Empirical results across heterogeneous, homogeneous, and one-to-one configurations on multiple public LLMs/SLMs and 6 QA plus 2 instruction-following tasks demonstrate that FedMKT consistently boosts SLM performance and brings the server LLM close to Centralized fine-tuning performance, while preserving data privacy. This approach offers a scalable, privacy-conscious pathway for cross-model knowledge sharing in real-world deployments where clients have limited resources and data heterogeneity.
Abstract
Recent research in federated large language models (LLMs) has primarily focused on enabling clients to fine-tune their locally deployed homogeneous LLMs collaboratively or on transferring knowledge from server-based LLMs to small language models (SLMs) at downstream clients. However, a significant gap remains in the simultaneous mutual enhancement of both the server's LLM and clients' SLMs. To bridge this gap, we propose FedMKT, a parameter-efficient federated mutual knowledge transfer framework for large and small language models. This framework is designed to adaptively transfer knowledge from the server's LLM to clients' SLMs while concurrently enriching the LLM with clients' unique domain insights. We facilitate token alignment using minimum edit distance (MinED) and then selective mutual knowledge transfer between client-side SLMs and a server-side LLM, aiming to collectively enhance their performance. Through extensive experiments across three distinct scenarios, we evaluate the effectiveness of FedMKT using various public LLMs and SLMs on a range of NLP text generation tasks. Empirical results demonstrate that FedMKT simultaneously boosts the performance of both LLMs and SLMs.
