An Empirical Study of Mamba-based Language Models

作者
Roger Waleffe,Wonmin Byeon,Duncan Riach,Brandon Norick,Vijay Anand Korthikanti,Tri Dao,Albert Gu,Ali Hatamizadeh,Singh, Sudhakar,Deepak Narayanan,Garvit Kulshreshtha,Vartika Singh,Jared Casper,Jan Kautz,Mohammad Shoeybi,Bryan Catanzaro
出处
期刊:Cornell University - arXiv [Cornell University]
被引量:19
标识
DOI:10.48550/arxiv.2406.07887
摘要

Selective state-space models (SSMs) like Mamba overcome some of the shortcomings of Transformers, such as quadratic computational complexity with sequence length and large inference-time memory requirements from the key-value cache. Moreover, recent studies have shown that SSMs can match or exceed the language modeling capabilities of Transformers, making them an attractive alternative. In a controlled setting (e.g., same data), however, studies so far have only presented small scale experiments comparing SSMs to Transformers. To understand the strengths and weaknesses of these architectures at larger scales, we present a direct comparison between 8B-parameter Mamba, Mamba-2, and Transformer models trained on the same datasets of up to 3.5T tokens. We also compare these models to a hybrid architecture consisting of 43% Mamba-2, 7% attention, and 50% MLP layers (Mamba-2-Hybrid). Using a diverse set of tasks, we answer the question of whether Mamba models can match Transformers at larger training budgets. Our results show that while pure SSMs match or exceed Transformers on many tasks, they lag behind Transformers on tasks which require strong copying or in-context learning abilities (e.g., 5-shot MMLU, Phonebook) or long-context reasoning. In contrast, we find that the 8B Mamba-2-Hybrid exceeds the 8B Transformer on all 12 standard tasks we evaluated (+2.65 points on average) and is predicted to be up to 8x faster when generating tokens at inference time. To validate long-context capabilities, we provide additional experiments evaluating variants of the Mamba-2-Hybrid and Transformer extended to support 16K, 32K, and 128K sequences. On an additional 23 long-context tasks, the hybrid model continues to closely match or exceed the Transformer on average. To enable further study, we release the checkpoints as well as the code used to train our models as part of NVIDIA's Megatron-LM project.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
邓仕文完成签到,获得积分10
刚刚
小航爱学习完成签到,获得积分10
刚刚
雪花完成签到,获得积分10
刚刚
1秒前
兜兜有糖完成签到,获得积分10
1秒前
1秒前
aaa完成签到,获得积分10
1秒前
1秒前
zeran发布了新的文献求助10
2秒前
prinzt的应助被研友_Y59785采纳,获得10
2秒前
小二郎的应助被研友_Y59785采纳,获得10
2秒前
香蕉觅云的应助被研友_Y59785采纳,获得10
2秒前
感动傀斗完成签到,获得积分20
2秒前
2秒前
张三完成签到,获得积分10
2秒前
kaida完成签到,获得积分10
2秒前
俊逸的平卉完成签到 ,获得积分10
3秒前
_nichts完成签到,获得积分10
3秒前
3秒前
3秒前
4秒前
4秒前
7D完成签到,获得积分10
4秒前
4秒前
植物蛋白完成签到,获得积分20
4秒前
Theprisoners的应助被一颗桃芭乐采纳,获得10
4秒前
5秒前
5秒前
Orange的应助被小猴采纳,获得10
5秒前
llllliu发布了新的文献求助10
5秒前
小小的梦想完成签到,获得积分10
5秒前
负责雨安发布了新的文献求助10
5秒前
爱吃冻梨发布了新的文献求助10
5秒前
5秒前
hao完成签到,获得积分10
5秒前
5秒前
5秒前
重要元灵完成签到 ,获得积分10
6秒前
6秒前
orixero的应助被bx采纳,获得10
6秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Energie-Contracting 1500
Spec 401: Standards for Jet Fuel Facility and Equipment Commissioning and Flushing at Airports, 2026.1 (Original Issue) 1000
Spec 103: Standard for Jet Fuel Quality Control at Airports, Revision 2026.1 1000
Mathematical models in hydrology 1000
Klimaschutzrecht durch den Energiesektor im Mehrebenensystem – Ein Rechtsvergleich 1000
Oncology Clinical Trials: Successful Design, Conduct, and Analysis, Second Edition 800
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 工程类 有机化学 化学工程 生物化学 物理 复合材料 内科学 催化作用 光电子学 人工智能 细胞生物学 无机化学 物理化学 数学
热门帖子
关注 科研通微信公众号,转发送积分 8085084
求助须知:如何正确求助?哪些是违规求助? 9499523
关于积分的说明 21413570
捐赠科研通 7653580
什么是DOI,文献DOI怎么找? 3402725
关于科研通互助平台的介绍 2531849
邀请新用户注册赠送积分活动 2441373