Skip to main content
QUICK REVIEW

[论文解读] MambaByte: Token-free Selective State Space Model

Junxiong Wang, Tushaar Gangavarapu|arXiv (Cornell University)|Jan 24, 2024
Cellular Automata and ApplicationsComputer Science被引用 7
一句话总结

MambaByte 是一个基于选择性状态空间模型的无标记字节级语言模型,在子词 Transformer 上具备竞争性能且生成更快、可扩展。

ABSTRACT

Token-free language models learn directly from raw bytes and remove the inductive bias of subword tokenization. Operating on bytes, however, results in significantly longer sequences. In this setting, standard autoregressive Transformers scale poorly as the effective memory required grows with sequence length. The recent development of the Mamba state space model (SSM) offers an appealing alternative approach with a fixed-sized memory state and efficient decoding. We propose MambaByte, a token-free adaptation of the Mamba SSM trained autoregressively on byte sequences. In terms of modeling, we show MambaByte to be competitive with, and even to outperform, state-of-the-art subword Transformers on language modeling tasks while maintaining the benefits of token-free language models, such as robustness to noise. In terms of efficiency, we develop an adaptation of speculative decoding with tokenized drafting and byte-level verification. This results in a $2.6 imes$ inference speedup to the standard MambaByte implementation, showing similar decoding efficiency as the subword Mamba. These findings establish the viability of SSMs in enabling token-free language modeling.

研究动机与目标

  • 推动无标记语言建模,以缓解分词偏差和鲁棒性问题。
  • 开发一个能够高效扩展到长序列的字节级模型,无需打补丁。
  • 利用 Mamba 的选择性状态空间架构实现线性时间序列处理。
  • 在计算和参数匹配的条件下,与 Transformers、MegaByte 和 SSM 基线进行性能评估。
  • 展示字节级自回归设定下的生成效率优势。

提出的方法

  • 将 Mamba 的选择性状态空间模型适配为直接在字节序列上运行。
  • 将连续时间 SSM 动力学离散化,输入选择性 B、C 和 Delta 作为输入的函数。
  • 在训练过程中使用并行扫描高效计算线性递推。
  • 将 SSM 层嵌入到用于语言建模的门控网络架构中。
  • 在长文本数据集(PG19、Stories、Books、ArXiv、Code)上进行计算和参数匹配的实验。
  • 与字节级 Transformer、SSM、MegaByte 以及子词基线进行比较。
Figure 1 : Benchmarking byte-level models with a fixed parameter budget. Language modeling results on PG19 ( $8,192$ consecutive bytes), comparing the standard Transformer (Vaswani et al., 2017 ; Su et al., 2021 ) , MegaByte Transformer (Yu et al., 2023 ) , gated diagonalized S4 (Mehta et al., 2023
Figure 1 : Benchmarking byte-level models with a fixed parameter budget. Language modeling results on PG19 ( $8,192$ consecutive bytes), comparing the standard Transformer (Vaswani et al., 2017 ; Su et al., 2021 ) , MegaByte Transformer (Yu et al., 2023 ) , gated diagonalized S4 (Mehta et al., 2023

实验结果

研究问题

  • RQ1无标记字节级模型在长文本语言建模中是否能够达到甚至超过分词子词 Transformer 的表现?
  • RQ2选择性状态空间模型是否为字节序列提供计算和生成速度方面的优势?
  • RQ3在计算和参数匹配的条件下,MambaByte 与现有字节级和子词体系结构相比有什么表现?

主要发现

  • 在相同的 FLOPs-per-byte 预算下,MambaByte 在多份长序列数据集上持续优于 MegaByte。
  • 较小的 MambaByte(353M)在 BPB 指标上平均优于字节级 Transformer 与 PerceiverAR。
  • 拥有 972M 参数的 MambaByte,在对大量字节进行训练后,在 PG19 上达到与最先进子词模型相当或更好的困惑度。
  • 由于其循环、基于状态空间的设计,MambaByte 的生成速度比 MegaByte 更快。
  • 在计算匹配的设置下,MambaByte 达到接近 Transformer 的损失但所需的计算和数据更少。
  • 无标记字节模型可以成为依赖标记化模型的长上下文语言任务的可行替代方案。
Figure 2 : Illustration of the Mamba SSM. (a) The discrete-time input $x[k]$ , along with input-selective $\Delta[k]$ . (b) The continuous-time signal $x(t)$ . (c) Mathematically, the SSM transforms the continuous-time $x(t)$ through an $n$ -dimensional hidden state (here, $n=4$ ) using parameters $
Figure 2 : Illustration of the Mamba SSM. (a) The discrete-time input $x[k]$ , along with input-selective $\Delta[k]$ . (b) The continuous-time signal $x(t)$ . (c) Mathematically, the SSM transforms the continuous-time $x(t)$ through an $n$ -dimensional hidden state (here, $n=4$ ) using parameters $

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。