Mamba 发布90天:30篇论文追着 Transformer 打,73% 宣称刷新纪录
Mamba-Palooza: 90 Days of Mamba-Inspired Research with Jason Meaux: Part 1
Nathan 与 Jason Meaux 梳理 Mamba 架构的机制原理、上下文能力,以及它在图像分割等计算机视觉多模态任务上的表现。
2023年12月,Mamba 论文挂上 arXiv。90天之内,围绕它冒出30多篇后续论文和项目,其中73%宣称拿到了 state-of-the-art。更有戏剧性的是,这篇点燃整个研究圈的论文,自己在同行评审里至少吃过一次态度坚决的拒稿。
这是《Cognitive Revolution》的一期特别节目。主持人 Nathan Labenz 是创业者和 AI 投资人,嘉宾 Jason Meaux 是网站 statespace.info 的创建者,专门追踪 Mamba 和状态空间模型研究。两人把原论文发布后90天里的第一批30篇研究逐篇过了一遍,本文是上半场。
Jason 的背景很有意思。过去十年他在能源基础设施行业做工程师,用他自己的话说,一直待在「原子的世界」,没进过「比特的世界」。他跟着 DeepMind 的早期工作和 GPT-3 看热闹,真正的转折点是2022年11月。他手头有些用例特别需要计算量随序列长度线性增长的模型,于是去研究状态空间模型,看着看着发现不够懂,干脆建了个网站当学习笔记。这份学习笔记,现在成了这个领域最重要的追踪站之一。
Mamba 动了 Transformer 哪块蛋糕
Transformer 的注意力机制有个昂贵的特权:处理每个词时都能回头看序列里所有之前的词,两两之间算一遍关联。代价是计算量随序列长度平方增长,序列翻倍,计算翻四倍。
Mamba 换了个思路。它维护一个固定大小的状态,可以理解成一个容量有限的记事本,每来一个新 token,就把新信息压缩进去,记事本不随时间变厚。每步推理都是常数时间,训练和推理整体都是线性复杂度。
光省算力没用,得打得过才行。原论文最硬的数据是:纯 Mamba 架构在语言建模的核心指标 loss 上压过了 Transformer。这是第一个不靠注意力机制,还能在主战场上赢 Transformer 的架构。Nathan 的判断是,未来大概率由两种核心机制共存,注意力加选择性状态空间,他称之为「混合架构时代」的开端。
赢的秘诀在「选择机制」。之前的状态空间模型 S4 用一套固定权重处理所有输入,来什么一律同等对待。Mamba 的版本叫 S6,把 B、C、delta 三个参数改成依赖输入,模型可以根据内容动态决定每个 token 怎么处理、记多少、忘多少。Nathan 强调,这叫动态计算,一直是 Transformer 独有的能力,现在状态空间模型也有了。
节目里还有个更正。Nathan 在去年12月那期说 A100 显卡的 SRAM 只有几百 KB,有听友写信纠正:那是每个计算核心的量,整张卡加总有几十 MB。这个细节重要,因为 Mamba 硬件感知算法的核心设计,就是让状态全程待在 SRAM 里,离计算单元最近的地方。
不过两人也承认,有些基础问题论文没写清楚。比如一个20层的 Mamba 模型,是有20个状态,还是一个共享状态?Jason 翻了代码也只给出模糊答案:状态肯定在 SRAM 里,其他细节「还有点模糊」。这个领域的研究者,集体处在边跑边搞懂的阶段。
90天成绩单:60%在做视觉,73%宣称 SOTA
数字先摆出来。30多篇论文里,60%在做视觉和图像处理,这个比例出乎意料,因为原论文只做了语言、DNA 测序和音频。15篇视觉论文里9篇做图像分割,生物医学是重头。语言约占四分之一。剩下的在玩各种边缘场景,图神经网络、音频、选股,什么都往墙上扔,看什么能粘住。
另外两个数字:80%的论文没有直接套用原版,而是改了架构再上;73%宣称达到了 state-of-the-art。
Nathan 和 Jason 花了不少时间泼冷水。这些论文从动手到发表只有几个月,最快的原论文发布30天就出现了。没经过同行评审,数据集普遍偏小,baseline 优化到什么程度全凭作者自觉。Nathan 说,大量阅读这个领域的论文,让他重新体会到了同行评审的价值。
论文宣称 state-of-the-art 是一回事,拿一个玩具例子做正面对比是另一回事。你那个 Transformer baseline,到底优化到位没有?
反方向的水也得泼。Mamba 论文自己就被拒过稿。两边都别迷信,这个领域的一切结论都带着「90天速成」的水印。
易用性是爆发的原因之一。原论文发布后最早出现的衍生内容里,有一篇 Lucas Nell 的博客,他把 Andrej Karpathy 的 nanoGPT 改成了 Mamba 版本,还放了 Colab notebook 让人直接跑。他在博客里写道:
Mamba 在语音合成任务上击败了 Transformer,而且非常省显存,在 Colab 上玩 Transformer 总是 GPU 空间不够。Mamba block 就是自注意力块的即插即用替换。
Jason 自己动手训过不少 Mamba 模型。他的体验是开箱即用,兼容 Hugging Face 训练库和 FSDP 全分片训练,CUDA 层碰都没碰过。原论文作者之一 Tri Dao 以写高性能 CUDA 代码出名,Jason 说他不敢乱动那些内核,怕把东西改坏。
但速度有坑。后面提到的国际象棋项目里,Mamba 训练比同尺寸 Transformer 慢7.6倍,把 batch size 从256调到64之后,变成慢3
In this first part of a two episode series, Nathan and AI scout Jason Meaux provide a sweeping overview of the first 90 days of Mamba-inspired research. They discuss the mechanistic underpinnings of Mamba architecture, Mamba's context capabilities, multi-modal applications in image segmentation and computer vision tasks, and much more. Try the Brave search API for free for up to 2000 queries per month at https://brave.com/api
RECOMMENDED PODCAST: Autopilot explores the adoption and rollout of AI in the industries that drive the economy and the dynamic founders bringing rapid change to slow-moving industries. From law, to hardware, to aviation, Will Summerlin interviews founders backed by Benchmark, Greylock, and more to learn how they're automating at the frontiers in entrenched industries.
Listen on Spotify: https://open.spotify.com/show/6YQZkKHN7EP2yWedAvSxBC?si=18377c69a2804333
Listen on Apple: https://podcasts.apple.com/ca/podcast/autopilot-with-will-summerlin/id1738163836
LINKS:
Show Notes and Paper Links: https://docs.google.com/document/d/1NK_a3deVL_aczORmSRw8LyujNPotpO7Kd90sIRj9Qx0/edit?usp=sharing
Nathan's original Mamba Deep Dive
Spotify: https://open.spotify.com/episode/3b3zeDVU6fE2yV9vdNVLqX?si=dc7a885d601d4a58
Apple: https://podcasts.apple.com/us/podcast/emergency-pod-mamba-memory-and-the-ssm-moment/id1669813431?i=1000639397566
X/SOCIAL:
@labenz (Nathan)
SPONSORS: ORACLE | OMNEKY | SQUAD | BRAVE
Oracle Cloud Infrastructure (OCI) is a single platform for your infrastructure, database, application development, and AI needs. OCI has four to eight times the bandwidth of other clouds; offers one consistent price, and nobody does data better than Oracle. If you want to do more and spend less, take a free test drive of OCI at https://oracle.com/cognitive
Omneky is an omnichannel creative generation platform that lets you launch hundreds of thousands of ad iterations that actually work customized across all platforms, with a click of a button. Omneky combines generative AI and real-time advertising data. Mention "Cog Rev" for 10% off www.omneky.com
💥 Access global engineering without the headache and at a fraction of the cost: head to choosesquad.com and mention “Turpentine” to skip the waitlist.
The Brave search API can be used to assemble a data set to train your AI models and help with retrieval augmentation at the time of inference. All while remaining affordable with developer first pricing, integrating the Brave search API into your workflow translates to more ethical data sourcing and more human representative data sets. Try the Brave search API for free for up to 2000 queries per month at https://brave.com/api
ODF is where top founders get their start. Apply to join the next cohort and go from idea to conviction-fast. ODF has helped over 1000 companies like Traba, Levels and Finch get their start. Is it your turn? Go to http://beondeck.com/revolution to learn more.
本集资源与出处
- 视频在 YouTube 收看
- 音频节目 MP3 直链来自官方播客 RSS
- 订阅Apple Podcasts
- 官网节目官方页面
- 文本精读 Markdown 版便于引用与 AI 读取


