让大模型像生物一样进化,用群体繁殖快速适应新任务。
Nature-Inspired Population-Based Evolution of Large Language Models
- 用交叉、突变、选择等操作让多个大模型群体自我演化。
- 仅需200样本即可在12个数据集上提升54.8%准确率。
- 支持多任务并行演化,单张4090显卡即可复现。
进化是地球上生命生存与繁衍的驱动力,其核心是基于种群的繁殖过程。受此启发,本文首次形式化定义了大语言模型(LLMs)的群体演化问题,并提出一种新框架。该框架从一组父模型出发,通过四种关键操作实现种群演化:(i) 交叉,融合不同父模型权重生成子模型;(ii) 突变,对模型权重引入微小随机扰动以增强多样性;(iii) 选择,优先保留高性能模型;(iv) 继承,将父模型的经验传递给子模型。仅需每新任务200个样本,该框架即可无梯度地快速适应任务。在12个数据集上的实验表明,其性能持续优于现有多种大模型合并与适应方法,最高较初始最优模型提升54.8%准确率。此外,该框架可同时演化多个新任务,支持高达40个模型的种群规模,并实现对未见任务的零样本泛化。代码已开源,10个基于gemma-2-2b-it微调的父模型权重已发布于HuggingFace,仅需单张4090显卡(24GB内存)即可复现,且无性能损失。
原文摘要 · Abstract (English)
Evolution, the engine behind the survival and growth of life on Earth, operates through the population-based process of reproduction. Inspired by this principle, this paper formally defines a newly emerging problem -- the population-based evolution of large language models (LLMs) -- and introduces a novel framework. Starting with a population of parent LLMs, our framework enables the population to evolve through four key operations: (i) crossover, merging the weights of different parents to create offspring LLMs, (ii) mutation, introducing small, random changes to model weights to foster diversity, (iii) selection, prioritizing high-performing models, and (iv) succession, transferring the learned experience from parent to offspring LLMs. With only 200 samples per new task, the LLM population evolves rapidly to adapt to the task at hand, without any gradients. Experiments on 12 datasets show that our framework consistently outperforms existing multi-LLM merging and adaptation methods, achieving accuracy gains of up to 54.8% over the best LLM in the initial population. Moreover, our framework allows for the evolution of LLMs across multiple new tasks simultaneously, scaling effectively with populations of up to 40 LLMs, and even zero-shot generalization to unseen held-out tasks. We have open-sourced the code on GitHub and released the weights of 10 parent LLMs, fine-tuned from gemma-2-2b-it, on HuggingFace$, enabling reproduction of our proposed framework using just a single 4090 GPU with 24GB memory, without any performance degradation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。