Document detail
ID

oai:arXiv.org:2410.03810

Topic
Computer Science - Machine Learnin... Computer Science - Artificial Inte... Computer Science - Computation and...
Author
Ren, Ruifeng Li, Zhicong Liu, Yong
Category

Computer Science

Year

2024

listing date

10/9/2024

Keywords
dp sequence size transformers
Metrics

Abstract

Transformers have been the cornerstone of current Large Language Models (LLMs); however, its linear growth in overhead during inference with respect to sequence length poses challenges for modeling long sequences.

In this context, Mamba has gradually attracted attention due to its constant-level size during inference and existing empirical results have shown that it can perform comparably to Transformers in sequence modeling while offering significant savings.

However, one may ask that, can Mamba always enjoy the ``free lunch"?

In this paper, we focus on analyzing the expressive ability of Mamba from a theoretical standpoint.

First, inspired by the connection between Mamba and linear attention, we investigate potential shortcomings of the Mamba when performing the COPY operation.

Our results indicate that Mamba with constant size may encounter bottlenecks when handling COPY, while it can achieve perfect performance when the size scales linearly with sequence length.

Based on this observation, we analyze Mamba's ability to tackle DP problems when equipped with Chain of Thought (CoT).

Our findings suggest that to solve arbitrary DP problems, the total cost of Mamba is comparable to standard and efficient Transformers.

However, similar to efficient Transformers, when facing DP problems with favorable properties such as locality, Mamba can provide savings in overhead.

Our results contribute to a deeper understanding of Mamba.

Ren, Ruifeng,Li, Zhicong,Liu, Yong, 2024, Can Mamba Always Enjoy the "Free Lunch"?

Document

Open

Share

Source

Articles recommended by ES/IODE AI

Skin cancer prevention behaviors, beliefs, distress, and worry among hispanics in Florida and Puerto Rico
skin cancer hispanic/latino prevention behaviors protection motivation theory florida puerto rico variables rico psychosocial behavior response efficacy levels skin cancer participants prevention behaviors spanish-preferring tampeños puerto hispanics