M1: Towards Scalable Test-Time Compute with Mamba Reasoning Models

Junxiong Wang 1 , Wen-Ding Li 2 , Daniele Paliotta 3 Daniel Ritter 2 , Alexander M. Rush 2 , Tri Dao 1,4 · 2025

Read M1: Towards Scalable Test-Time Compute with Mamba Reasoning Models by Junxiong Wang 1 , Wen-Ding Li 2 , Daniele Paliotta 3 Daniel Ritter 2 , Alexander M. Rush 2 , Tri Dao 1,4 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-10449.txt.

Introduction

Long reasoning chains run faster on a leaner architecture in Junxiong Wang and co-authors' 2025 paper. Standard transformers pay steep memory and time costs as chains grow, since attention scales badly. Their M1 model swaps in a hybrid design built on the Mamba sequence architecture.

Skills were distilled from strong reasoning models, then sharpened with reinforcement learning. On hard math contest sets, M1 matches top distilled rivals of like size and beats earlier lean models. Generation ran over three times faster than a tuned transformer engine of the same size. Cheaper test-time reasoning could widen access to strong math help and cut serving costs for labs.

Catalog record

CREATORJunxiong Wang 1 , Wen-Ding Li 2 , Daniele Paliotta 3 Daniel Ritter 2 , Alexander M. Rush 2 , Tri Dao 1,4
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE33 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-10449

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

M1: Towards Scalable Test-Time Compute with Mamba Reasoning Models Junxiong Wang 1 , Wen-Ding Li 2 , Daniele Paliotta 3 Daniel Ritter 2 , Alexander M. Rush 2 , Tri Dao 1,4 Abstract Effective reasoning is crucial to solving complex mathematical problems. Recent large language models (LLMs) have boosted performance by scaling test-time computation through long chain-of-thought reasoning. However, transformer-based models are inherently limited in extending context length due to their quadratic computational complexity and linear memory requirements. In this paper, we introduce a novel hybrid linear RNN reasoning model, M1 , built on the Mamba architecture, which allows memory-efficient inference. Our approach leverages a distillation process from existing reasoning models and is further enhanced through RL training. Experimental results on the AIME and MATH benchmarks show that M1 not only outperforms previous linear RNN models but also matches the performance of state-of-the-art Deepseek R1 distilled reasoning models at a similar scale. We also compare our generation speed with a highly performant general purpose inference engine, vLLM, and observe more than a 3x speedup compared to a same size transformer. With throughput speedup, we are able to achieve higher accuracy compared to DeepSeek R1 distilled transformer reasoning models under a fixed generation time budget using self-consistency voting. Overall, we introduce a hybrid Mamba reasoning model and provide a more effective approach to scaling test-time generation using self-consistency or long chain of thought reasoning. 1 Introduction Robust and effective reasoning is the cornerstone for successfully performing tasks in domains such as mathematics and programming. Additionally, performance on reasoning tasks can often be boosted by generating longer sequences and/or generating many sequences in parallel ( Snell et al. 2024 ) . However, current transformer-based large language models (LLMs) face significant challenges when tasked with processing long sequences with large batch sizes. These models are constrained by a quadratic increase in computational complexity as the sequence length grows, coupled with a linear escalation in memory requirements. This combination makes it increasingly difficult for models to scale efficiently when handling large inputs. Although linear hybrid RNN models ( Gu & Dao 2024 ; Dao & Gu 2024 ; Beck et al. 2024 ; Yang et al. 2024 ; Peng et al. 2023 ) have shown great potential as an alternative to transformer-based on general language models, their effectiveness on reasoning tasks remains unclear. Since modern reasoning models typically generate long chains of thought for challenging math questions, it is uncertain whether the performance of hybrid linear RNNs diminishes in such scenarios. In this paper, we propose M1 and show that it is possible to derive strong hybrid reasoning models by efficiently transferring reasoning capabilities from a large transformer model. Our training process involves distilling knowledge, incorporating math and reasoning abilities through supervised fine-tuning (SFT), and finally, boosting performance using reinforcement learning (RL) training. In total, the training process requires fewer than 50 billion tokens. In contrast, DeepSeek-R1-Distill-Qwen-1.5B is finetuned from Qwen2.5 MATH 1.5B which is trained using over 1 trillion MATH tokens on top of Qwen2.5. We demonstrate that our hybrid models achieve a 3x speedup compared to transformers of the same size when served using a highly performant general purpose inference engine, vLLM, at large batch sizes. This gain is mainly due to large batches and long sequences, decoding being generally memory-bound. Lower memory usage of hybrid models can transform this advantage into a speed gain. The decoding speedup is approximately linear with the volume of model’s memory access ( Yuan et al. 2025 ) . Notably, this speedup can be converted to a gain in reasoning accuracy. Studies ( Snell et al. 2024 ; Li 2025 ; Chen et al. 2025 ) show that techniques such as self-consistency ( Wang et al. 2023 ) and verification ( Cobbe et al. 2021 ) at test time can significantly boost model reasoning performance. Under these conditions, a high-throughput model can further enhance its performance by generating more samples. The paper is organized as follows. Section 2 covers related work, Section 3 introduces our pipeline for distilling a hybrid reasoning model, and Section 4.1 presents our results evaluating M1 on math benchmarks. Sections 4.2 and 4.3 evaluate the performance gains of M1 in terms of both inference speed and scaling test-time compute. Section 5 provides some additional analysis of the impact of different generation lengths when training on RL, and of the impact of the different steps of the distillation pipeline we propose on performance. Overall, we show that M1 performs on par with DeepSeek-R1-Distill-Qwen-1.5B, achieving scores of 82 on MATH500 ( Hendrycks et al. 2021 ) , 22 on AIME25 ( MAA 2025 ) , 23 on AIME24 ( MAA 2024 ) , and 44 on OlympiadBench ( He et al. 2024 ) , while offering 3x faster inference throughput, even compared to the highly optimized vLLM ( Kwon et al. 2023 ) implementation for Transformer models. 2 Related Work 2.1 Reasoning models Recent models like Deepseek-R1 ( DeepSeek-AI et al. 2025 ) have shown the potential of RL training to improve performance on verifiable reasoning tasks, such as math problem solving and programming. Additional work has proposed methods for inducing this reasoning behavior via supervised fine-tuning, either on curated data ( Muennighoff et al. 2025 ) or on generated pairs of traces ( Yang et al. 2025 ) . Other approaches also combine search procedures such as MCTS with language models ( Qi et al. 2024 ) or alter standard RL training schemes to control the length of generated outputs ( Aggarwal & Welleck 2025 ) . After training, these models solve complex tasks by generating long chains of thought, which often include subtasks of the overall problem, multiple attempted solutions, and backtracking over prior attempts ( Gandhi et al. 2025 ) . Since the performance of these models, both during training and inference, relies on generating lengthy chains of thought, more efficient architectures can enable larger scale training and less costly generation. 2.2 Enhancing Reasoning via Scaled Inference Compute Increasing the computational budget during inference has become a promising approach to boost LLM performance. Methods like Chain of Thought (CoT) and its derivatives have achieved notable gains on reasoning benchmarks by breaking down complex tasks into intermediate steps ( Wei et al. 2023 ; Yao et al. 2023 ) . Although decomposing tasks improves reasoning, it also lengthens generation sequences and raises computational costs. Some recent studies even indicate that this extra computation might itself enhance model capabilities ( Pfau et al. 2024 ) . In addition, adaptive compute allocation during inference has been explored. For example, Goyal et al. 2024 incorporated pause tokens into the vocabulary, allowing models to distribute compute more efficiently and improve both reasoning and overall task performance. Another strategy involves generating several outputs and selecting the best one. Researchers have developed various sampling algorithms to diversify and enhance the quality of generated responses, thereby increasing the chances of retrieving the most accurate answer ( Wang et al. 2023 ; Renze & Guven 2024 ; Zhang et al. 2023 ) . Moreover, outcome and process reward models (ORMs and PRMs) have been introduced to evaluate responses and steer intermediate generation steps ( Lightman et al. 2023 ; Zhang

Read the complete text