HuggingFace教你怎样做出SOTA视觉模型

【VAE学习笔记】全面通透地理解VAE(Variational Auto Encoder) 完整笔记:http://www.gwylab.com/note-vae.html 李宏毅老师的教程视频:https://www.bilibili.com/video/av15889450/?p=33 —————————————————————————————————   依据李宏毅老师的讲解,我整理了一番VAE的笔记。先简单介绍一下VAE,VAE作为一个生成模型,其基本思路是很容易理解的:把一堆真... 阅读详情

前有OpenAI的GPT-4o,后有谷歌的系列王炸,先进的多模态大模型接连炸场。

其他从业者在震撼之余,也再次开始思考怎么追赶这些超级模型了。

刚好在这时,HuggingFace和法国索邦大学的一篇论文,总结出了构建视觉大模型的关键经验,给开发者指明了一条路。

图片

这些经验涵盖了模型架构选择、训练方法、训练数据等多个方面,作者在多方比较之后给出了详尽的总结,核心要点包括这些内容:

  • 想把视觉大模型搞好,架构的选择很重要。
  • 语言模型对整体表现的影响,比视觉模块更大。
  • 采用分阶段预训练策略,更有利于构建模型能力。
  • 训练数据应包含多种类型,并注意之间的比例平衡。

可以说,HF能够打造出同规模SOTA的视觉模型Idefics2,背后依靠的都是这些经验。

Idefics2基于Mistral-7B打造,整体拥有8B的参数量,可以准确识别出手写字体。

图片

专业人士评价称,这是一篇很好的调查报告,对视觉模型开发者很有帮助,不过同时也提醒说不要当成万金油来看。

图片

当然也有人打趣说,什么架构数据都是浮云,有GPU才是最关键的。

图片

倒也有些道理,不过玩笑归玩笑,还是来看看HuggingFace都带给了我们哪些经验。

来自SOTA模型开发实战

HuggingFace论文中的这些经验,来自于视觉模型Idefics2的开发过程。

与前一代Idefics1和Flamingo等同规模前SOTA相比,Idefics2在多个数据集上表现优异,甚至还超过了更大的13B模型。

同时,和在COCO数据集上略胜于Idefics2的MM1相比,Idefics2在每张图上消耗的token大幅减少。

Python邮件自动化实战:基于imaplib和email库的高效邮件管理方案 本文详细介绍了如何使用Python的imaplib和email库实现高效邮件自动化管理。通过实战案例展示自动收取、解析邮件、下载附件等核心功能,帮助开发者快速构建企业级邮件处理系统,大幅提升工作效率。特别适合需要处理大量邮件的金融、数据分析等场景。 阅读详情

相关推荐

IMU预积分--详细推导过程

IMU预积分推导

weixin_51547017的博客 2万+

2025年北京市职工职业技能大赛第六届信息通信行业网络安全技能大赛复赛CTF部分WP-哥斯拉流量分析

题目没有任何提示,附件gzl.pcap解题哥斯拉流量300多KB包很多,没啥经验只能挨个看回来之后又狠狠得撸了一把哥斯拉流量分析我这里用的是哥斯拉4.0.1测试链接这里发了两个包,我们进行分析。

深耕网络安全领域,聚焦护网行动(HW)、渗透测试、等级保护(等保)、CTF 竞赛四大核心方向,提供技术干货、实战经验与行业洞察。 1811

学Simulink——基于大数据处理与云计算的场景实例:无人机与云计算中心之间的高效数据传输链路设计

本文以无人机与云计算中心的高效数据传输链路设计为例,手把手指导使用Simulink进行系统级建模。针对智慧城市、灾害监测等场景中无人机采集的海量数据(视频、图像、点云等),构建包含数据源、传输协议、无线链路、云接入和性能分析的五层架构模型。通过智能数据压缩、多链路聚合和QoS优先级调度等关键技术,实现5G+Wi-Fi等多通信技术的自适应切换。仿真结果表明,5G+Wi-Fi链路聚合在城市环境中表现最优,而4G+卫星组合适合偏远地区。该模型为无人机实时数据传输提供了有效的设计方法和优化方向,可拓展至边缘计算、A

xiaoheshang_123的博客 120

2025年全国青少年信息素养大赛初赛真题(算法创意实践挑战赛C++初中组:文末附答案)

2025年全国青少年信息素养大赛初赛真题(算法创意实践挑战赛C++初中组:文末附答案)

王老师青少年编程 3397

STM32H743的FDCAN使用方法(1):STM32CubeMX初始化代码生成

STM32H743的FDCAN使用方法(1):STM32CubeMX初始化代码生成。

kevin1499的博客 2566

Flink CDC 中 StartupOptions 模式详解

Flink CDC 的 StartupOptions 模式用于指定作业启动时从源数据读取数据的起始位置,不同的模式适用于不同的业务场景,可满足多样化的数据处理需求,主要有 Initial 模式、Earliest 模式、Latest 模式、SpecificOffset 模式和 Timestamp 模式。

RodJohnsonDoctor的专栏 849

4、教育数据挖掘:公共数据集与研究进展

本文综述了教育数据挖掘(EDM)领域的研究进展与公共数据集应用情况。从2013年至2020年,EDM在电子学习系统、大规模开放在线课程(MOOC)等方面快速发展,涵盖了多种研究任务、工具与方法。文章梳理了UCI、Mendeley、DataShop等平台的公开数据集,分析了其特点与局限性,并介绍了KDD Cup、Kaggle等竞赛中的教育数据集及其评价指标。同时,探讨了多模态、心理行为等特色数据集的应用场景。最后指出当前EDM面临的主要挑战是缺乏系统性数据集综述、数据预处理复杂及可重复性不足,呼吁加强数据共享

rgv2345678的博客 171

基于卷积神经网络的球罐结构损伤识别

球罐结构损伤识别方法研究 摘要:本研究针对球形储罐(球罐)结构健康监测需求,提出基于卷积神经网络(CNN)的损伤识别方法。通过ANSYS有限元仿真构建包含5种裂纹深度的500组振动信号数据集,设计包含卷积层、池化层和全连接层的CNN网络架构。实验结果表明,该方法在训练集和测试集上分别达到98.4%和96.0%的准确率,验证了其在球罐焊缝损伤识别中的有效性。研究提供了完整的MATLAB实现代码,为球罐结构智能化监测提供了技术参考。 关键词:球罐结构;卷积神经网络;损伤识别;振动信号;深度学习

AI的内部世界的博客 120

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

OV9734 DATASHEET,完整规格书

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

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

上一篇: 值得细读的8个视觉大模型生成式预训练方法
下一篇: 你想在本地部署大模型吗?本地部署大模型的三种工具
普通网友
博客等级 码龄3年 4493粉丝 309原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值