arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2410.06718cs.LGcs.CLcs.CV
收藏

MatMamba:一种套娃式状态空间模型

MatMamba: A Matryoshka State Space Model

Scaled Foundations;University of Washington(华盛顿大学)

Abhinav Shukla, Sai Vemprala, Aditya Kusupati, Ashish Kapoor

AI总结:

本研究提出结合套娃式学习与Mamba2的状态空间模型MatMamba,通过嵌套维度实现联合训练与自适应推理,单一大模型可免费获得多个嵌套小模型且性能优异,缩放效果媲美Transformer且推理更高效,支持弹性部署。

摘要:

Mamba2 等状态空间模型(SSMs)是 Transformer 的一类极具潜力的替代方案,理论上训练和推理速度更快,尤其在长上下文场景下优势明显。近期套娃表示学习(Matryoshka Representation Learning)相关研究,以及 MatFormer 等将其应用于 Transformer 骨干网络的工作,展示了如何在一个通用弹性模型中引入嵌套粒度的更小子模型。\n本文提出 MatMamba:一种将套娃式学习与 Mamba2 相结合的状态空间模型,通过修改模块使其包含嵌套维度,实现联合训练与自适应推理。MatMamba 支持跨多种模型规模的高效、自适应部署。我们训练单个大型 MatMamba 模型,即可免费获得多个更小的嵌套模型,且性能保持或优于从头训练的同规模基线小模型。\n我们训练了参数规模从 35M 到 1.4B 不等的语言模型和图像模型。在 ImageNet 和 FineWeb 上的实验结果表明,MatMamba 模型的缩放效果与 Transformer 相当,同时具备更高效的推理特性。这使得 MatMamba 成为根据可用推理算力弹性部署大规模模型的实用可行选项。代码与模型已开源至 https://github.com/ScaledFoundations/MatMamba。

英文摘要:

State Space Models (SSMs) like Mamba2 are a promising alternative to Transformers, with faster theoretical training and inference times -- especially for long context lengths. Recent work on Matryoshka Representation Learning -- and its application to Transformer backbones in works like MatFormer -- showed how to introduce nested granularities of smaller submodels in one universal elastic model. In this work, we present MatMamba: a state space model which combines Matryoshka-style learning with Mamba2, by modifying the block to contain nested dimensions to enable joint training and adaptive inference. MatMamba allows for efficient and adaptive deployment across various model sizes. We train a single large MatMamba model and are able to get a number of smaller nested models for free -- while maintaining or improving upon the performance of a baseline smaller model trained from scratch. We train language and image models at a variety of parameter sizes from 35M to 1.4B. Our results on ImageNet and FineWeb show that MatMamba models scale comparably to Transformers, while having more efficient inference characteristics. This makes MatMamba a practically viable option for deploying large-scale models in an elastic way based on the available inference compute. Code and models are open sourced at \url{https://github.com/ScaledFoundations/MatMamba}

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑