2025_NIPS_FP4 All the Way: Fully Quantized Training of LLMs

文章核心总结与翻译

一、主要内容

该研究首次实现了大型语言模型(LLMs)的全量化训练(FQT),采用以4位浮点数(FP4)精度为主,对权重、激活值和梯度进行量化,并在高达1万亿token的数据集上完成训练。研究重点探索了FP4训练的关键设计选择,包括块大小、缩放格式和舍入方式,发现NVFP4格式(16个FP4值为一个块,采用E4M3格式存储缩放因子)效果最优;提出了拆分舍入策略(前向传播用就近舍入,反向传播和更新过程用随机舍入)以提升训练稳定性;推导并验证了量化训练的临界阈值(当全精度梯度标准差低于量化噪声标准差的√3倍时,训练效果显著下降);最后通过量化感知微调(QAF)阶段弥补了FP4与BF16基线模型的训练损失差距。

实验中,研究者在256台Intel Gaudi2加速器上成功训练了70亿参数的LLaMA2模型,经过QAF阶段后,模型在下游任务上的性能与BF16基线模型相当,证实了FP4全量化训练在大规模LLM训练中的实用性和高效性。

二、创新点

  1. FP4格式优化:系统研究了FP4的块大小和缩放格式,发现16个元素的块大小性价比最优,E4M3缩放格式(NVFP4采用)在动态范围和精度间达到最佳平衡,验证了NVIDIA Blackwell架构的硬件设计合理性。
  2. 拆分舍入策略:首次提出前向传播用就近舍入(RtN)、反向传播和参数更新用随机舍入(SR)的组合方案,相比单一舍入方式显著提升了训练稳定性和模型精度。
  3. 精度转换阈值理论:推导并
船载 OpenHarmony AIS 航海工作台:告警与防碰撞预警系统 船载OpenHarmony AIS航海工作台的告警与防碰撞系统,集成十余类告警(超速、偏航、会遇、SOS等),通过网格空间索引实现高效邻近判定,保障实时性。告警管理器统一调度规则、去重、通知与日志,支持悬浮球、语音、跑马灯、弹窗多渠道触达,确保航行安全。SOS紧急通道独立运行,避免干扰。系统设计强调性能优化与多场景适配,为航海安全提供核心支撑。 阅读详情

相关推荐

AI 应用开发:四维架构落地实战——以 HR Agent 为例拆解感知·推理·记忆·执行【意图路由、规划编排、长期记忆、工具执行、面试题】

本文基于四维架构(感知·推理·记忆·执行),以HR Agent为例,系统拆解大模型应用从“聊天”到“生产可用”的落地路径。通过Spring AI实现意图路由、规划编排、RAG检索与工具调用,结合真实踩坑复盘,揭示架构化设计对安全、成本与可维护性的关键价值,为AI Agent工程化提供可复用的实战框架。

王大师企业官方博客 1252

从原理到代码:拆解UniFormer中动态位置嵌入(DPE)的3D卷积实现

本文深入解析了UniFormer模型中动态位置嵌入(DPE)模块的3D卷积实现原理与代码。DPE通过一个轻量的3D深度可分离卷积,替代传统静态位置编码,使模型能自动学习视频数据的时空位置关系。文章对比了其与Swin Transformer相对位置偏置的优劣,并提供了PyTorch实现代码与高级定制方案,为视频理解任务提供了高效灵活的动态位置编码解决方案。

weixin_29207149的博客 310

配置 Druid 数据源及密码加密-SpringBoot 实战基础

在SpringBoot中配置 Druid 数据源及密码加密的方法前文集成 MyBatis Plus,实现了一组增删改查接口。在启动服务时,从控制台中可以看出 Spring Boot 默认使用 Hikari 作为数据库连接池,Hikari性能很优秀。在国内使用较多的连接池还属阿里开源的 Druid,中文发音为德鲁伊。Druid 结合了 C3P0、DBCP 等 DB 池的优点,同时还加入了日志监控,可以很好的监控 DB 池连接和 SQL 的执行情况。...

m0_67698950的博客 955

u3d逆向学习之纯C内存读写与ImGui绘制(Android)

方法:需要在/proc/pid/maps文件查找模块名,一行行遍历所有内存,第一个参数为模块名,第二个参数为索引index(因为该模块会有多个,index为正序遍历第index个该模块),若找到了则使用。32位游戏的指针大小采用4字节,而64位游戏的指针大小采用8字节(这里需要注意),数据地址以16进制存储,使用unsigned long类型 ,该函数只有一个参数,数据地址,返回该地址的指针跳转地址。文件,比较其中的内容是否与传入的包名相同,如果相同,则返回该进程的PID。

zhoujunjie2004的博客 1689

Java代码实现opc ua 事件订阅和数据变化订阅

OPC UA (Open Platform Communications Unified Architecture) 提供了两种主要的订阅机制:数据变化订阅(Data Change Subscription)和事件订阅(Event Subscription)。这两种订阅机制允许客户端实时接收来自服务器的数据更新或事件通知。

洛阳泰山的博客 2371

英伟达DeepStream学习笔记7——DeepStream接入USB相机并实现广角摄像头的畸变矫正

deepstream官方提供了一个畸变矫正的例子,包含了鱼眼和普通广角的矫正。我目前准备做一个广角的畸变矫正,我已经使用opencv实现功能,目前增加到deepstream框架中。示例代码在\opt\nvidia\deepstream\deepstream-5.0\sources\apps\sample_apps\deepstream-dewarper-test 中,鱼眼矫正——deepstream官方版 https://developer.nvidia.com/blog/calibration-trans

耶律大石的博客 1602

第18章:Ingestion Pipeline 数据摄取流水线

本文介绍了LlamaIndex的IngestionPipeline如何解决合同文档处理中的四大核心问题:不可重复、无追溯、无容错和无法缓存。通过标准化数据处理流程,将手工操作升级为工厂流水线模式,实现数据的可复用、可追踪和高效处理。文章详细阐述了Pipeline的设计原理,包括Transformation的串行编排、缓存机制(基于输入和Transformation的哈希值)以及数据血缘追踪(通过Node的metadata记录处理过程)。

davidwang456的专栏 65

用 Joule 点燃 ABAP 开发者的舞台感:SAP BTP 上的 ABAP AI 能力实战解读

摘要:SAP推出的Joule for developers和ABAP AI功能为开发者提供了智能辅助工具,旨在优化ABAP开发流程。主要功能包括上下文感知的代码预测补全、代码解释、单元测试生成和开发问题实时解答。这些能力特别适合应对Cloud环境下ABAP开发的复杂约束,如Clean Core原则和受限语法范围。通过减少重复劳动和提升代码理解效率,该工具帮助开发者将注意力集中在业务逻辑而非技术细节上。随着企业加速向S/4HANA迁移,这些AI功能将在遗留代码改造和云适配中发挥更大作用,建议团队将其纳入工程体

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 300

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

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

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

怀旧版电脑GBC模拟器

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

上一篇: 2025_NIPS_Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon Layers
下一篇: 2025_NIPS_Table as a Modality for Large Language Models
UnknownBody
博客等级 码龄16年 5601粉丝 4749原创
评论
成就一亿技术人!
拼手气红包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、付费专栏及课程。

余额充值