search
HomeTechnology peripheralsAIZhiyuan and other institutions released the multi-skill large model governance strategy of the LM-Cocktail model

With the development and implementation of large model technology, "model governance" has become a proposition that currently receives major attention. However, in practice, researchers often face multiple challenges.

On the one hand, in order to improve its performance on the target task, researchers will collect and construct target task data sets and fine-tune the large language model (LLM), but this method It usually results in a significant decrease in the performance of general tasks other than the target task, compromising the original general capabilities of LLM.

On the other hand, the number of models in the open source community is gradually increasing, and large model developers may also accumulate more and more models in multiple trainings, each model has its own Advantages, how to choose the appropriate model to perform the task or further fine-tune it becomes a problem.

Recently, the Information Retrieval and Knowledge Computing Group of Zhiyuan Research Institute released LM-Cocktail model governance strategy, aiming to provide large model developers with a low-cost and sustainable Ways to improve model performance: Calculate fusion weights through a small number of samples, and use model fusion technology to combine the advantages of the fine-tuned model and the original model to achieve efficient use of "model resources."

Zhiyuan and other institutions released the multi-skill large model governance strategy of the LM-Cocktail model


  • ##Technical report: https://arxiv.org/abs/2311.13534
  • Code: https://github.com/FlagOpen/FlagEmbedding/tree/master/LM_Cocktail

Model fusion technology can fuse multiple Each model improves the performance of a single model. Inspired by this, the LM-Cocktail strategy further calculates the importance of different models for the target task, gives different models different weights, and performs model fusion on this basis. While improving the performance on the target task, it remains universal Strong ability in tasks.

The LM-Cocktail strategy is similar to making a cocktail. It can combine the advantages and capabilities of each model and create a unique model by blending different models. "Versatile" model with multiple specialties

Method innovation

Specifically, LM-Cocktail can manually select model configurations Ratio, or input a small number of samples to automatically calculate the weighted weights to fuse existing models to generate a new model. This process does not require retraining the model and has models that can adapt to multiple structures, such as large language model Llama, semantic vector model BGE et al.

If developers lack label data for certain target tasks or lack computing resources for model fine-tuning, they can use the LM-Cocktail strategy to eliminate the step of model fine-tuning. You only need to construct a very small amount of data samples, and you can integrate existing large-scale language models in the open source community to prepare your own "LM cocktail"

Zhiyuan and other institutions released the multi-skill large model governance strategy of the LM-Cocktail model

As shown in the figure above, fine-tuning Llama on a specific target task can significantly improve the accuracy on the target task, but harms the general ability on other tasks. Adopting LM-Cocktail can solve this problem.

The core of LM-Cocktail is to fuse the fine-tuned model with the parameters of multiple other models, integrating the advantages of multiple models, while improving the accuracy of the target task. Maintain general ability on other tasks. The specific form is as follows: given a target task, a basic model, and a model obtained by fine-tuning the basic model on the task, while collecting models from the open source community or previously trained models to form a collection. Calculate the fusion weight of each model through a small number of samples on the target task, and perform a weighted sum of the parameters of these models to obtain a new model (for the specific process, please refer to the paper or open source code). If there are no other models in the open source community, the basic model and the fine-tuned model can also be directly integrated to improve the performance of downstream tasks without reducing general capabilities.

In actual application scenarios, due to data and resource limitations, users may not be able to fine-tune downstream tasks, that is, there is no model that has been fine-tuned for the target task. In this case, users can construct a very small amount of data samples and integrate existing large language models in the community to generate a model for new tasks and improve the accuracy of the target task without training the model.

Experimental results

1. Flexible fine-tuning to maintain general capabilities

Zhiyuan and other institutions released the multi-skill large model governance strategy of the LM-Cocktail model

As you can see from the above figure, after fine-tuning on a certain target task, the fine-tuned model greatly improves the accuracy on that task, but other Accuracy decreased on general tasks. For example, after fine-tuning on the AG News training set, Llama's accuracy on the AG News test set increased from 40.80% to 94.42%, but its accuracy on other tasks dropped from 46.80% to 38.58%.

However, by simply fusing the parameters of the fine-tuned model and the original model, a competitive performance of 94.46% is achieved on the target task, which is comparable to the fine-tuned model, while achieving a competitive performance of 94.46% on other tasks. The accuracy is 47.73%, which is even slightly better than the performance of the original model. Under certain tasks, such as Helleswag, the fused model can even surpass the fine-tuned model on this fine-tuning task, and surpass the original general model on other tasks. That is, while inheriting the advantages of the fine-tuned model and the original model, it surpasses got them. It can be seen that calculating the fusion ratio through LM-Cocktail and further integrating other fine-tuned models can further improve the general performance on other tasks while ensuring the accuracy of the target task.

2. Mix existing models to handle new tasks

Zhiyuan and other institutions released the multi-skill large model governance strategy of the LM-Cocktail model

Rewrite The following content: The chart shows the target task of the language model MMLU

Zhiyuan and other institutions released the multi-skill large model governance strategy of the LM-Cocktail model

The rewritten content: Picture: The target task of the vector model is to retrieve (information Retrieval)

Fine-tuning the model requires a large amount of data and a large amount of computing resources, especially fine-tuning large language models, which may not be possible in actual situations. When the target task cannot be fine-tuned, LM-Cocktail can achieve new capabilities by mixing existing models (from the open source community or its own historical training accumulation).

By giving only 5 pieces of sample data, LM-Cocktail automatically calculates the fusion weights, filters existing models and then fuses them to obtain a new model without using a large amount of data. Conduct training. Experiments have found that the generated new model can achieve higher accuracy on new tasks. For example, for Llama, LM-Cocktail is used to fuse 10 existing models (the training tasks of which are not related to the MMLU list), which can achieve significant improvements, and is higher than the Llama model that uses 5 sample data for context learning.

Please try LM-Cocktail, we welcome your feedback and suggestions via GitHub issue: https://github.com/FlagOpen/FlagEmbedding/tree/master/LM_Cocktail

The above is the detailed content of Zhiyuan and other institutions released the multi-skill large model governance strategy of the LM-Cocktail model. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
How to Build Your Personal AI Assistant with Huggingface SmolLMHow to Build Your Personal AI Assistant with Huggingface SmolLMApr 18, 2025 am 11:52 AM

Harness the Power of On-Device AI: Building a Personal Chatbot CLI In the recent past, the concept of a personal AI assistant seemed like science fiction. Imagine Alex, a tech enthusiast, dreaming of a smart, local AI companion—one that doesn't rely

AI For Mental Health Gets Attentively Analyzed Via Exciting New Initiative At Stanford UniversityAI For Mental Health Gets Attentively Analyzed Via Exciting New Initiative At Stanford UniversityApr 18, 2025 am 11:49 AM

Their inaugural launch of AI4MH took place on April 15, 2025, and luminary Dr. Tom Insel, M.D., famed psychiatrist and neuroscientist, served as the kick-off speaker. Dr. Insel is renowned for his outstanding work in mental health research and techno

The 2025 WNBA Draft Class Enters A League Growing And Fighting Online HarassmentThe 2025 WNBA Draft Class Enters A League Growing And Fighting Online HarassmentApr 18, 2025 am 11:44 AM

"We want to ensure that the WNBA remains a space where everyone, players, fans and corporate partners, feel safe, valued and empowered," Engelbert stated, addressing what has become one of women's sports' most damaging challenges. The anno

Comprehensive Guide to Python Built-in Data Structures - Analytics VidhyaComprehensive Guide to Python Built-in Data Structures - Analytics VidhyaApr 18, 2025 am 11:43 AM

Introduction Python excels as a programming language, particularly in data science and generative AI. Efficient data manipulation (storage, management, and access) is crucial when dealing with large datasets. We've previously covered numbers and st

First Impressions From OpenAI's New Models Compared To AlternativesFirst Impressions From OpenAI's New Models Compared To AlternativesApr 18, 2025 am 11:41 AM

Before diving in, an important caveat: AI performance is non-deterministic and highly use-case specific. In simpler terms, Your Mileage May Vary. Don't take this (or any other) article as the final word—instead, test these models on your own scenario

AI Portfolio | How to Build a Portfolio for an AI Career?AI Portfolio | How to Build a Portfolio for an AI Career?Apr 18, 2025 am 11:40 AM

Building a Standout AI/ML Portfolio: A Guide for Beginners and Professionals Creating a compelling portfolio is crucial for securing roles in artificial intelligence (AI) and machine learning (ML). This guide provides advice for building a portfolio

What Agentic AI Could Mean For Security OperationsWhat Agentic AI Could Mean For Security OperationsApr 18, 2025 am 11:36 AM

The result? Burnout, inefficiency, and a widening gap between detection and action. None of this should come as a shock to anyone who works in cybersecurity. The promise of agentic AI has emerged as a potential turning point, though. This new class

Google Versus OpenAI: The AI Fight For StudentsGoogle Versus OpenAI: The AI Fight For StudentsApr 18, 2025 am 11:31 AM

Immediate Impact versus Long-Term Partnership? Two weeks ago OpenAI stepped forward with a powerful short-term offer, granting U.S. and Canadian college students free access to ChatGPT Plus through the end of May 2025. This tool includes GPT‑4o, an a

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)