Mixture-of-LoRAs: An Efficient Multitask Tuning for Large Language Models

本文是LLM系列文章,针对《Mixture-of-LoRAs: An Efficient Multitask Tuning for Large Language Models》的翻译。

LoRA的混合:一种适用于大型语言模型的高效多任务调优

摘要

指令调优有可能激发或增强大型语言模型(LLM)的特定功能。然而,实现正确的数据平衡对于防止灾难性的遗忘和任务之间的干扰至关重要。为了解决这些局限性并增强训练灵活性,我们提出了LoRA的混合(MoA)架构——一种新颖且参数有效的调整方法,用于LLM的多任务学习。在本文中,我们首先使用相应的监督语料库数据单独训练多个领域特定的LoRA模块。这些LoRA模块可以和专家混合(MoE)中的专家设计原则相一致。随后,我们使用显式路由策略将LORA组合起来,并引入域标签来促进多任务学习,这有助于防止任务之间的干扰,并最终提高每个单独任务的性能。此外,每个LoRA模型都可以迭代地适应新的领域,从而实现快速的领域特定适应。在不同任务上的实验证明了我们的方法优越而稳健的性能,这也将进一步促进特定领域LLM的应用。

1 引言

2 相关工作

3 方法

4 实验

5 结论

我们介绍了MoA架构,它为LLM提供了一种有效的多任务微调方法,解决了任务之间的干扰和训练的不稳定性。每个LoRA模型都可以单独迭代,以快速适应新的领域。同时,MoA使用路由策略灵活选择合适的LoRA专家来解决问题。它可以任意组合多个领域特定的LoRA模块

Macaron-V1-Preview:Mixture-of-LoRA驱动的Agent架构范式革新 大模型智能体(Agent)正从‘单一大模型微调’迈向‘可组合式技能调度’新阶段。Mixture-of-LoRA作为一种任务粒度动态路由的参数高效架构,通过解耦基座模型与领域专家能力,在保持低显存开销的同时显著提升工具调用、多步推理和跨模态整合等核心Agent能力。其技术价值在于兼顾工业级性能与工程敏捷性——兼容主流框架、支持零侵入集成、便于模块化迭代。典型应用场景包括智能客服、自动化办公Agent、科研辅助工具链及金融/医疗等强监管领域的可审计决策系统。本文深入解析Macaron-V1-Preview如何以 阅读详情

相关推荐

【UE5】多用户协同编辑实战:从配置到实时协作

本文详细介绍了在虚幻引擎5中配置和使用多用户协同编辑功能的完整流程。从启用Multi-User Editing插件、配置UDP Messaging网络通信,到启动服务器、创建会话并实现实时协作,提供了从环境准备到实战协作的清晰指南。文章还分享了资产同步、场景分批、对象锁定等实用技巧,并强调了网络配置与版本一致性等关键避坑点,旨在帮助中小型团队提升关卡设计和原型开发的协作效率。

weixin_29001683的博客 272

别再只盯着GPS了!手把手教你用Python仿真UWB定位,30厘米精度是怎么算出来的?

本文详细解析了UWB(超宽带)室内定位技术的原理与实现,通过Python代码演示如何从三边测量法到实现30厘米精度的定位。文章涵盖了UWB的核心数学模型、Python仿真环境搭建、误差分析及优化策略,为开发者提供了实用的技术指南和应用场景。

weixin_26873711的博客 259

如何构建智能聊天系统

聊天分为听、思考、读,简单的通过ASR、LLM、TTS三类模型的组合可以实现,最近openai推出支持多模态的GPT-4o模型,可以把三个模型真正融合成在一起。现在市面上的模型百花齐放,各有所长。要实现可落地的方案,需要结合业务,验证模型效果,同时也要考虑方案的可行性,有些模型在国内能用,有些在国内不能用。

xsgnzb的专栏 2119

Windows电脑如何用MobaXterm连接宇树G1机器人?保姆级SSH配置指南

本文提供了一份详细的保姆级教程,指导Windows用户使用MobaXterm通过SSH连接宇树G1机器人。内容涵盖从物理网络配置、MobaXterm安装与SSH会话创建,到文件传输、X11转发等高级功能,并包含常见问题排查与安全加固建议,帮助开发者快速建立稳定可靠的远程开发连接。

purple的博客 886

【原创,解决CLodop安装后无法调用的问题】已经安装过CLodop,但是网页上仍然提示“clodop云打印服务(localhost本地)未安装启动,点击这里执行安装....”

在某些国内web网站中,需要安装一个名为“CLodop”的插件;但在实际使用过程中,即使安装了CLodop插件,网页试图调用它时还是会提示“clodop云打印服务(localhost本地)未安装启动,点击这里执行安装...”,且无法完成相关打印任务 本文属原创博客,分析了解决CLodop无法被调用的问题,并附上了原理和解决方法,本质上是和跨域请求以及CORS类安全组策略相关

link_in_csdn的博客 2万+

FFmpeg + Qt 实现摄像头采集与 MP3 背景音乐 RTSP 推流

在直播或视频监控场景中,我们经常需要将摄像头画面与背景音乐混合后推送到 RTSP 服务器。本文将详细介绍如何使用Qt框架结合摄像头实时采集(Windows 下使用dshow,Linux 使用v4l2视频预览(显示为 QImage)视频 H.264 编码 + RTSP 推流从 MP3 文件读取音频,重采样为 AAC 编码并推流循环播放音频文件解决中文文件路径打开失败的问题文章将剖析每个技术环节的关键代码,并给出完整的类实现。

weixin_45397344的博客 506

手把手教你学Simulink——基于经典PID控制的电机系统场景实例:步进电机PID位置控制系统的实现

步进电机(Stepper Motor)是一种将电脉冲信号转化为角位移的执行元件,具有结构简单、控制方便、定位精度高等优点,广泛应用于数控机床、机器人、打印机、3D打印机等需要精确定位的场合。传统的步进电机多采用开环控制,但在高速或负载变化较大的情况下容易出现丢步、振荡等问题。为提高控制精度与响应性能,闭环PID控制被引入步进电机的位置控制中,通过编码器或旋转变压器等反馈装置,实现高精度、高稳定性的位置控制。本教程将带你使用构建一个基于PID控制的步进电机位置控制系统仿真模型步进电机建模。

MHD0815的博客 9701

39、高频 LLC 谐振转换控制系统动态优化算法分析与研究

本文针对高频下LLC谐振转换器动态性能差的问题,提出一种基于谐振电容器充放电估计动态切换时间的优化控制算法。通过改进状态轨迹控制方法,突破传统算法在谐振频率与开关频率相等条件下的限制,并结合新型采样策略有效抑制电压过冲。算法在MATLAB和SABER中完成仿真验证,并搭建基于STM32F407的原型系统进行测试,结果表明该方法显著缩短动态响应时间,提升系统稳定性。研究为高频、高功率密度开关电源的动态优化提供了可行解决方案。

linux6sysadmin的博客 118

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

上一篇: Angry Men, Sad Women: Large Language Models Reflect Gendered Stereotypes in Emotion Attribution
下一篇: CLongEval: A Chinese Benchmark for Evaluating Long-Context Large Language Models
UnknownBody
博客等级 码龄16年 5602粉丝 4808原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

UnknownBody

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址