EAC-MoE: Expert-Selection Aware Compressor for Mixture-of-Experts Large Language Models

文章主要内容总结

本文针对混合专家模型(Mixture-of-Experts, MoE)在大语言模型(LLMs)中面临的两大核心挑战——高额GPU内存消耗(需加载所有专家权重)和推理加速与激活参数减少不匹配(低激活参数未转化为等效速度提升),提出了一种名为EAC-MoE的专家选择感知压缩方法。该方法从量化和剪枝两个角度深度适配MoE特性,包含两个核心模块:

  1. 基于专家选择校准的量化(QESC):低比特量化会导致专家选择偏差(即路由器可能选错专家),QESC通过逐层校准MoE中的路由器,减轻这种偏差,从而保留量化模型的性能。
  2. 基于专家选择频率的剪枝(PESF):针对当前任务中不常被选中的专家,动态剪枝这些专家以减少推理延迟,显著提升推理速度且性能损失极小。

实验表明,EAC-MoE在多个MoE模型(如Mixtral-8x7B、Phi3.5-moe等)上实现了显著的内存占用减少(如Mixtral-8x7B内存减少4.92倍)和推理速度提升(平均1.64倍),同时性能损失控制在1%以内,适用于资源受限场景。

创新点

  1. 聚焦专家选择机制:不同于传统针对密集型LLM的量化和剪枝方法,EAC-MoE深度结合MoE的动态路由特性,从专家选择的角度优化压缩策略。
  2. QESC缓解专家选择偏差:通过校准路由器输出,解决低比特量化导致的专家选择偏移问题,而非仅优化量化误
纳米尺度仿真软件:Quantum Espresso_(13).非线性光学性质计算 通过 Quantum Espresso,可以高效地计算材料的非线性光学性质,包括二阶和三阶非线性极化率。这些性质在许多现代技术中具有重要的应用价值。在准备输入文件时,需要详细描述系统的晶格结构和原子位置,选择合适的基组和赝势,并设置计算参数和微扰设置。通过优化计算参数和使用并行计算,可以提高计算效率和精度。最后,使用适当的工具进行结果分析和可视化,可以更好地理解材料的非线性光学行为。 阅读详情

相关推荐

TS808效果器制作教程

TS808效果器制作教程 可以在立创商城购买到大部分的电阻电容和IC,音频接口,踩钉,电位器和电源接口可以去某宝看看都买得到的。链接https//pan.baidu.com/s/1QId1eIE3fJ2u5NLBSISvGA。安装过程过于繁琐,把所有元器件按照图纸焊接完成就可以调试了,祝你们成功!这是TS808经典效果器制作过程的记录。IC是JRC4558。...

qq_18948149的博客 3429

虚拟化Esxi 和 华为交换机--配置链路捆绑

在这种模式下,Eth-Trunk的建立和成员接口的加入都需要手工配置,没有LACP协议的参与。● 在没有配置802.3ad聚合时,启用基于IP哈希的路由将中断网络,因此必须先对虚拟交换机进行更改。再去修改交换机的链路聚合模式(交换机配置为手动模式的链路聚合)当服务器需要通过交换机从远端服务器获取配置文件后才可以启动链路聚合时,交换机的链路聚合口需要配置lacp force-forward。● 交换机必须设置手动模式的链路聚合,虚拟交换机的负载平衡方法必须设置为基于IP哈希的路由。

ling 2117

保姆级教程:用STM32标准库搞定TIM1的PWM输出(附完整代码和避坑点)

本文提供STM32F103高级定时器TIM1的PWM输出保姆级教程,涵盖从工程搭建到完整代码实现的详细步骤。重点解析TIM1作为高级定时器的特殊配置要点,包括时钟初始化、PWM通道设置和GPIO复用功能,并附常见问题排查指南和动态调整占空比的实用技巧,帮助开发者高效实现精准PWM控制。

weixin_30673611的博客 433

23、工业物流中的多智能体路径规划与碰撞处理策略

本文探讨了工业4.0背景下工业物流中的多智能体路径规划(MAPF)与碰撞处理策略。分析了自动导引车(AGV)等移动资源的应用现状,综述了主流路径规划算法如A*、D*Lite、M*等,以及集中式与分布式碰撞检测方法。重点比较了五种碰撞避免策略:路径交叉、优先级、起始时间调整、无交叉路径和速度调整,提出了基于环境条件的策略选择流程,并通过流程图展示了评估、组合、测试与优化的全过程。文章强调应根据订单不确定性、时间约束、优先级和生产组织等因素综合选择或组合策略,以提升物流效率与系统可靠性。

mac99的博客 126

AI一键生成带货短视频:电商直播的未来

随着电子商务行业的快速发展,直播带货已成为一种极为有效的营销手段。然而,传统的人工直播方式存在诸多局限性,如人力成本高、主播培训周期长等问题。为了解决这些挑战,一种基于AI技术的一键生成带货视频解决方案应运而生——这就是“Anchor Crafter”。这项创新技术不仅能够自动创建高质量的带货视频,而且还能实现人物与商品之间的自然交互,极大地提升了用户体验。

这里汇聚了前沿的技术分享与实用的开发技巧,带你探索从创意到企业的技术创业之路。 2208

电源防反接保护电路全攻略实战A04

本文深入剖析了硬件设计中电源保护电路的关键技术与实战经验。文章指出,保护电路虽小但至关重要,通过对比分析二极管与MOSFET防反接方案,揭示了MOSFET在效率、温控方面的优势。针对过压保护,重点讲解了TVS二极管选型要点,强调钳位电压而非击穿电压才是保护核心。文章结合工业案例(如48V通信模块烧毁、5V系统MOSFET过热等),详细阐述了PCB布局规范、热设计路径等工程细节,并提供了USB接口ESD防护的完整选型方案。最后强调硬件设计必须考虑最坏工况,在成本与性能间找到平衡点,避免因小失大。

启芯硬件的博客 778

激光雷达的64线,32线,16线,你弄懂了吗?

激光雷达的 64 线、32 线、16 线是指激光雷达系统中能够同时发射和接收激光脉冲的激光线的数量5。

谢谢大家的关注和点赞!这里只有纯纯的知识干货,没有一句废话。希望能实实在在帮到大家~要是觉得有用,别忘了给我点支持哟,你 2640

Android 13 RK3588 编译烧写实录全程

本文详细记录了RK3588主板在Android 13系统下的各项功能测试与编译过程。主要内容包括:1)网络功能测试(以太网、WiFi、蓝牙连接);2)外设接口测试(耳机、麦克风、USB、TF卡);3)硬件功能验证(RTC时钟、ADC采样、MIPI摄像头);4)系统设置(手势导航、开发者选项);5)Android 13 SDK编译环境搭建与源码获取方法。通过图文并茂的方式展示了各功能的配置方法、操作步骤和测试结果,为开发者提供了全面的参考指南。

hnjzfwy的博客 239

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

深度学习工具包 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")

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

上一篇: From Pixels to Places: A Systematic Benchmark for Evaluating Image Geolocalization Ability in Lar...
下一篇: Joint Lossless Compression and Steganography for Medical Images via Large Language Models
UnknownBody
博客等级 码龄16年 5601粉丝 4742原创
评论
成就一亿技术人!
拼手气红包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、付费专栏及课程。

余额充值