paper-with-me

홈 › Papers

Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modeling

2024-06-11 · Liliang Ren, Yang Liu, Yadong Lu, Yelong Shen, Chen Liang, Weizhu Chen

Efficiently modeling sequences with infinite context length has long been a challenging problem. Previous approaches have either suffered from quadratic computational complexity or limited extrapolation ability in length generalization. In this work, we present Samba, a simple hybrid architecture that layer-wise combines Mamba, a selective State Space Model (SSM), with Sliding Window Attention (SWA). Samba selectively compresses a given sequence into recurrent hidden states while still maintaining the ability to precisely recall recent memories with the attention mechanism. We scale Samba up to 3.8B parameters with 3.2T training tokens and demonstrate that it significantly outperforms state-of-the-art models across a variety of benchmarks. Pretrained on sequences of 4K length, Samba shows improved perplexity in context lengths of up to 1M in zero-shot. When finetuned on 4K-length sequences, Samba efficiently extrapolates to a 256K context length with perfect memory recall on the Passkey Retrieval task, and exhibits superior retrieval extrapolation on the challenging Phonebook task compared to full-attention models. As a linear-time sequence model, Samba achieves a 3.73x higher throughput compared to Transformers with grouped-query attention for user prompts of 128K length, and a 3.64x speedup when generating 64K tokens with unlimited streaming. Our code for training on open source data is publicly available at https://github.com/microsoft/Samba.

📄 PDF Abstract BibTeX arXiv:2406.07522

Code (2)

microsoft/Samba 공식 구현 pytorch
sustcsonglin/flash-linear-attention 공식 구현 pytorch

Tasks

4kLanguage ModelingLanguage ModellingMambaRetrievalState Space Models

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Feedforward Network A Feedforward Network, or a Multilayer Perceptron (MLP), is a neural network with solely densely connected layers. This is the classic neural network architecture of the…
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Grouped-query attention 설명 없음

Similar Papers 제목 키워드 기반

Hybrid Transformer-Mamba for Weakly Supervised Volumetric Medical Segmentation

2025-12-11 · Yiheng Lyu, Lian Xu, Coen Arrow, Mohammed Bennamoun 외 arxiv

Weakly supervised segmentation enables model training from plane-level labels. Existing methods often rely on 2D encoders, neglecting the volumetric nature of medical data. We propose TranSamba, a hybrid Transformer-Mamb…

Object Localization

Decoder-Hybrid-Decoder Architecture for Efficient Reasoning with Long Generation

2025-07-09 · Liliang Ren, Congcong Chen, Haoran Xu, Young Jin Kim 외 arxiv

Recent advances in language modeling have demonstrated the effectiveness of State Space Models (SSMs) for efficient sequence modeling. While hybrid architectures such as Samba and the decoder-decoder architecture, YOCO, …

Reinforcement Learning

Samba-ASR: State-Of-The-Art Speech Recognition Leveraging Structured State-Space Models

2025-01-06 · Syed Abdul Gaffar Shakhadri, Kruthika KR, Kartik Basavaraj Angadi

We propose Samba ASR,the first state of the art Automatic Speech Recognition(ASR)model leveraging the novel Mamba architecture as both encoder and decoder,built on the foundation of state space models(SSMs).Unlike transf…

Automatic Speech RecognitionAutomatic Speech Recognition (ASR)Computational EfficiencyMamba+3

Samba: Semantic Segmentation of Remotely Sensed Images with State Space Model

2024-04-02 · Qinfeng Zhu, Yuanzhi Cai, Yuan Fang, Yihan Yang 외

High-resolution remotely sensed images pose a challenge for commonly used semantic segmentation methods such as Convolutional Neural Network (CNN) and Vision Transformer (ViT). CNN-based methods struggle with handling su…

DecoderMambaSegmentationSemantic Segmentation

SSAMBA: Self-Supervised Audio Representation Learning with Mamba State Space Model

2024-05-20 · Siavash Shams, Sukru Samet Dindar, Xilin Jiang, Nima Mesgarani

Transformers have revolutionized deep learning across various tasks, including audio representation learning, due to their powerful modeling capabilities. However, they often suffer from quadratic complexity in both GPU …

Audio ClassificationGPUKeyword SpottingMamba+3