MatFormer:用于弹性推理的嵌套Transformer

1,364次阅读
没有评论

MatFormer: Nested Transformer for Elastic Inference

Devvrit, S Kudugunta, A Kusupati, T Dettmers, K Chen, I Dhillon, Y Tsvetkov, H Hajishirzi, S Kakade, A Farhadi, P Jain
[Google Research & University of Texas at Austin & University of Washington]

MatFormer:用于弹性推理的嵌套Transformer

  • MatFormer是一个新的Transformer架构,可以训练一个通用模型,然后从中提取成百上千个准确的小型子模型,实现弹性推理以适应各种约束。

  • MatFormer在标准Transformer块内部引入了嵌套的子结构,通过具有不同大小的多个前馈网络(FFN)块来共享参数。

  • MatFormer联合训练每层中的显式定义的几个(例如4个)嵌套的FFN块,导致4个共享参数的嵌套子模型。

  • 在推理时,可以通过跨层的“混合匹配”来生成更多无需额外训练的子模型。

  • MatFormer可应用于编码器(MatViT)和解码器(MatLM)。实验表明,MatLM与独立训练的等大小的基线Transformer语言模型的困惑度和下游性能相当。

  • 与对应基线模型相比,MatFormer子模型在MatLM中用于投机解码时可以实现更快的解码,在MatViT中,可以实现弹性编码器进行图像检索。

  • MatFormer展示了与基线Transformer模型相似的可靠缩放行为,同时产生准确一致的子模型,跨越计算与准确率的权衡。

动机:当前的Transformer模型在推断过程中存在多样的限制,需要训练不同大小的模型来满足不同的需求,但由于训练成本和性能限制,只能训练少数模型,限制了对相关权衡的精细控制。

方法:提出一种名为MatFormer的嵌套Transformer架构,通过联合优化每个前馈网络(FFN)块及其嵌套的较小FFN块,实现模型在不同层之间的粒度混合。可以从一个通用的MatFormer模型中提取数百个精确的较小模型,而这些模型从未经过显式优化。通过这种方式,MatFormer提供了在各种部署约束下的弹性。

优势:MatFormer的优势在于可以提供弹性推断,满足各种部署需求,实验证明其在不同模型类别、模态和规模上的有效性。

提出一种嵌套Transformer架构MatFormer,通过联合优化不同粒度的模型,实现弹性推断,从而满足不同的部署需求。

https://arxiv.org/abs/2310.07707 

MatFormer:用于弹性推理的嵌套Transformer
MatFormer:用于弹性推理的嵌套Transformer
MatFormer:用于弹性推理的嵌套Transformer

 

Read More 

正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 0
评论(没有评论)

文心AIGC

2023 年 10 月
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
文心AIGC
文心AIGC
人工智能ChatGPT,AIGC指利用人工智能技术来生成内容,其中包括文字、语音、代码、图像、视频、机器人动作等等。被认为是继PGC、UGC之后的新型内容创作方式。AIGC作为元宇宙的新方向,近几年迭代速度呈现指数级爆发,谷歌、Meta、百度等平台型巨头持续布局
文章搜索
热门文章
清库存!DeepSeek突然补全R1技术报告,训练路径首次详细公开

清库存!DeepSeek突然补全R1技术报告,训练路径首次详细公开

清库存!DeepSeek突然补全R1技术报告,训练路径首次详细公开 Jay 2026-01-08 20:18:...
2025最大AI赢家的凡尔赛年度总结,哈萨比斯Jeff Dean联手执笔

2025最大AI赢家的凡尔赛年度总结,哈萨比斯Jeff Dean联手执笔

2025最大AI赢家的凡尔赛年度总结,哈萨比斯Jeff Dean联手执笔 鹭羽 2025-12-24 09:1...
智能体落地元年,Agent Infra是关键一环|对话腾讯云&Dify

智能体落地元年,Agent Infra是关键一环|对话腾讯云&Dify

智能体落地元年,Agent Infra是关键一环|对话腾讯云&Dify 鹭羽 2025-12-23 1...
AI Coding新王登场!MiniMax M2.1拿下多语言编程SOTA

AI Coding新王登场!MiniMax M2.1拿下多语言编程SOTA

AI C++oding新王登场!MiniMax M2.1拿下多语言编程SOTA 克雷西 2025-12-24 ...
最新评论
ufabet ufabet มีเกมให้เลือกเล่นมากมาย: เกมเดิมพันหลากหลาย ครบทุกค่ายดัง
tornado crypto mixer tornado crypto mixer Discover the power of privacy with TornadoCash! Learn how this decentralized mixer ensures your transactions remain confidential.
ดูบอลสด ดูบอลสด Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
Obrazy Sztuka Nowoczesna Obrazy Sztuka Nowoczesna Thank you for this wonderful contribution to the topic. Your ability to explain complex ideas simply is admirable.
ufabet ufabet Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
ufabet ufabet You’re so awesome! I don’t believe I have read a single thing like that before. So great to find someone with some original thoughts on this topic. Really.. thank you for starting this up. This website is something that is needed on the internet, someone with a little originality!
ufabet ufabet Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
热评文章
易烊千玺的华为绿手机,真的AI了

易烊千玺的华为绿手机,真的AI了

Failed to fetch content Read More 
AI狼人杀大决战!GPT、Qwen、DeepSeek大乱斗,人类高玩汗流浃背

AI狼人杀大决战!GPT、Qwen、DeepSeek大乱斗,人类高玩汗流浃背

AI狼人杀大决战!GPT、Qwen、DeepSeek大乱斗,人类高玩汗流浃背 鹭羽 2025-12-23 14...
长城首个VLA车型发布,魏建军回应「赌上姓氏造车」

长城首个VLA车型发布,魏建军回应「赌上姓氏造车」

长城首个VLA车型发布,魏建军回应「赌上姓氏造车」 贾浩楠 2025-12-23 13:57:25 来源:量子...