Search

Search papers and lessons

MiniMax-M1: Scaling Test-Time Compute Efficiently with Lightning Attention

MiniMax, :, Aili Chen et al. · 2025

MiniMax-M1 is an open-weight reasoning model with mostly linear attention, cheap long outputs, and CISPO, an RL rule that clips importance weights instead of dropping tokens.

On this page

  • Colour = topic mix
  • Discrete math
  • Probability
  • Reinforcement learning
  • Calculus
  • Neural network basics
  • Linear algebra
  • ReadReady to readNot yet

TL;DR

MiniMax-M1 is a large open-weight reasoning model that mixes two attention styles, so long outputs cost less to generate. It was trained with reinforcement learning using CISPO, a rule that clips the importance-sampling weight of each token instead of dropping tokens whose updates are large. The authors report a 1-million-token input window, an 80,000-token output setting, and results comparable to DeepSeek-R1 and Qwen3-235B on several benchmarks, with strengths in software engineering, tool use and long-context tasks.

Builds on: Linear Attention, Mixture of Experts, Group Relative Policy Optimization (GRPO), Chain-of-Thought Prompting · Leads to: test-time compute scaling

Why it mattered

Reasoning models get better when they are allowed to think for longer, so the cost of a long output decides how far a model can go. The authors call M1 the world's first open-weight, large-scale hybrid-attention reasoning model. Its blocks use lightning attention, a linear-attention variant, and one softmax block follows every seven lightning blocks. The paper reports that M1 uses less than 50% of the inference FLOPs of DeepSeek-R1 at a 64K-token generation length, and about 25% at 100K tokens. The model is a useful reference for anyone who wants to see what a long-output RL run looks like in practice, including the failures that appeared.

The problem

Two problems stood in the way. The first is that the standard transformer's Attention Mechanism has cost that grows quadratically with length, which makes very long reasoning expensive. Many alternatives existed, including sparse attention, linear attention and state space models, but the authors note that few had been validated in large reasoning models, and nearly all competitive reasoning models still used standard attention.

The second problem is the RL step itself. The authors found that the usual PPO and GRPO clipping removed exactly the tokens that matter most for long reasoning. Reflective tokens such as "However", "Recheck", "Wait" and "Aha" are rare and get low probability, so their importance ratios are large. Clipping then removes them after the first update, and the model stops learning to reflect. The hybrid architecture also brought new trouble: training and inference disagreed on token probabilities, which blocked reward growth, and long outputs caused gradient explosions and repetitive loops.

How it works

The model is built in five stages. The numbers are the paper's; the flow is summarised here.

flowchart LR
  A["MiniMax-Text-01 base"] --> B["Continual pretraining, 7.5T tokens"]
  B --> C["Cold-start SFT on long chain-of-thought data"]
  C --> D["RL with CISPO, 40K outputs"]
  D --> E["Staged length extension to 80K"]
  E --> F["MiniMax-M1-80k"]
  1. Start from a long-context base. The model begins as MiniMax-Text-01. Its context is extended in four stages, from a 32K window up to 1M tokens. The authors say that jumping too far too fast caused sudden gradient explosions, because early and late layers decay at different rates.

  2. Continue pretraining on reasoning data. The base is trained on another 7.5 trillion tokens, with the share of STEM, code, book and reasoning data raised to 70%. The learning rate is held at 8e-5 for 2.5T tokens, then decayed over 5T tokens to 8e-6. Check: 2.5T plus 5T is 7.5T, the number of new tokens.

  3. Teach the output format with SFT. Supervised fine-tuning on long chain-of-thought examples gives the model the reflective habit that RL will strengthen. Math and coding samples are about 60% of the data.

  4. Run RL with CISPO. The policy generates groups of answers, each is scored by a rule-based checker or a reward model, and the model is updated with CISPO (explained below). Training uses 512 H800 GPUs for three weeks.

  5. Extend the output length in steps. The 40K model is continued with its output limit raised to 48K, 56K, 64K, 72K and finally 80K. Each step waits for signs of stability, such as converging perplexity and the 99th percentile of output lengths nearing the current window.

Worked trace of the clipping rule. Take one rare "Wait" token with advantage A = +1 and importance ratio r = 1.5, and let the upper clip be 1.2 (an illustrative value, not the paper's). PPO and GRPO clip the token's update to zero once r passes 1 + ε. After the first update, the token is out of the gradient and never helps again. CISPO instead clips the weight, so the weight used is 1.2, and the token still pushes the model with that weight. Check: the update size is capped at 1.2 × A, and the token stays in the gradient. The paper's three stability fixes below are for other failure modes.

Three engineering fixes follow the algorithm. First, the output layer was moved to FP32 precision, which raised the correlation between training-mode and inference-mode token probabilities from about 0.9 to about 0.99. Second, AdamW was set to betas (0.9, 0.95) and epsilon 1e-15, because gradients spanned 1e-18 to 1e-5 and the paper says the default settings can fail to converge. Third, generation is halted when 3,000 consecutive tokens each have probability above 0.99, which catches repetition loops that would otherwise stall training.

The math

Background. For a question q from a dataset \mathcal{D}, a policy π_θ writes a response o. PPO clips a per-token importance ratio, and GRPO drops the value model by using group-relative advantages:

A^i,t=Ri−mean({Rj}j=1G)std({Rj}j=1G)\hat{A}_{i,t}=\frac{R_{i}-\text{mean}(\{R_{j}\}_{j=1}^{G})}{\text{std}(\{R_{j}\}_{j=1}^{G})}

Here R_i is the reward of response i and G responses are sampled per question.

Step 1 in symbols: the importance ratio

The ratio for token t of response i is

ri,t(θ)=πθ(oi,t∣q,oi,<t)πθold(oi,t∣q,oi,<t)r_{i,t}(\theta)=\frac{\pi_{\theta}(o_{i,t}\mid q,o_{i,<t})}{\pi_{\theta_{\text{old}}}(o_{i,t}\mid q,o_{i,<t})}

It corrects for the fact that the responses were sampled by an older policy π_θold. A ratio of 1 means no change.

Step 2 in symbols: PPO clips the token update

PPO's clipped term is min( r A, clip(r, 1 - ε, 1 + ε) A ). When A > 0 and r > 1 + ε, the clipped term is constant, so the token's gradient is zero. This is the mechanism that removed the rare reflective tokens.

Step 3 in symbols: CISPO clips the weight and keeps the gradient

CISPO starts from a REINFORCE-style objective in which the ratio is a stop-gradient weight multiplying the log-probability:

JCISPO(θ)=E[1∑i=1G∣oi∣∑i=1G∑t=1∣oi∣sg(r^i,t(θ)) A^i,t log⁡πθ(oi,t∣q,oi,<t)]\mathcal{J}_{\text{CISPO}}(\theta)=\mathbb{E}\left[\frac{1}{\sum_{i=1}^{G}|o_{i}|}\sum_{i=1}^{G}\sum_{t=1}^{|o_{i}|}\texttt{sg}(\hat{r}_{i,t}(\theta))\,\hat{A}_{i,t}\,\log\pi_{\theta}(o_{i,t}\mid q,o_{i,<t})\right]

where sg is stop-gradient and the clipped weight is

r^i,t(θ)=clip(ri,t(θ), 1−ϵlowIS, 1+ϵhighIS)\hat{r}_{i,t}(\theta)=\text{clip}\left(r_{i,t}(\theta),\,1-\epsilon^{IS}_{low},\,1+\epsilon^{IS}_{high}\right)

Without the clip, this reduces to the ordinary policy gradient. The paper sets ε_low very large, which removes the lower bound, and tunes only ε_high. There is no KL penalty term. The gradient is slightly biased by the clip, but every token keeps a contribution. The worked trace above is this formula with r = 1.5 and the upper bound 1.2.

Step 4 in symbols: the unified mask

The paper also writes a general form with a mask M_{i,t} on the same objective. The mask is zero when the advantage is positive and the ratio is above 1 + ε_high, or when the advantage is negative and the ratio is below 1 - ε_low. It is one otherwise. CISPO corresponds to keeping every token, so the mask is always one.

Results

Cost and efficiency. The full RL run took three weeks on 512 H800 GPUs, which the paper puts at about 0.53 million US dollars of rental cost. Relative to DeepSeek-R1, inference FLOPs are below 50% at 64K generated tokens and about 25% at 100K tokens, according to the authors' theoretical analysis.

Algorithm. In a zero-RL comparison on Qwen2.5-32B base, evaluated on AIME 2024, CISPO outperformed GRPO and DAPO at the same number of training steps. The paper says it matches DAPO's performance with 50% of the training steps, and gives a 2x speedup over DAPO in that controlled study.

Benchmarks. Results are the authors' own, using temperature 1.0 and top-p 0.95, and AIME scores averaged over 32 samples. Against the open-weight baselines and two closed models:

  • AIME 2024: MiniMax-M1-80k scores 86.0, MiniMax-M1-40k 83.3, DeepSeek-R1-0528 91.4 and OpenAI o3 91.6.
  • AIME 2025: MiniMax-M1-80k scores 76.9, DeepSeek-R1-0528 87.5.
  • LiveCodeBench: MiniMax-M1-80k scores 65.0, Qwen3-235B 65.9.
  • SWE-bench Verified: MiniMax-M1-80k scores 56.0, MiniMax-M1-40k 55.6, DeepSeek-R1-0528 57.6.
  • OpenAI-MRCR at 128K: MiniMax-M1-80k scores 73.4, Gemini 2.5 Pro 76.8, Claude 4 Opus 48.9.
  • TAU-bench airline: MiniMax-M1-80k scores 62.0, Claude 4 Opus 59.6.
  • SimpleQA: MiniMax-M1-80k scores 18.5, DeepSeek-R1 30.1.

Scaling with RL. During training, AIME 2024 accuracy rose from 68% to 80%, and average response length on AIME and LiveCodeBench exceeded 20,000 tokens. The 80K model beats the 40K model on most benchmarks.

Limits. The model trails DeepSeek-R1-0528 on the math and coding competitions, and it is well behind on factual recall (SimpleQA). Several gains come from the long-context and tool-use settings, which the paper singles out. The SWE-bench numbers use a modified Agentless pipeline with no embedding retrieval. The efficiency figures are theoretical inference-FLOP estimates (Figure 1, right), not measured end-to-end gains on the same training run.

Reading guide

The paper's sections in order, with the lessons each one needs:

Check yourself

QuestionWhy did PPO and GRPO clipping hurt MiniMax-M1's training on reflective tokens like 'Wait'?Show answer

Those tokens are rare, so the base model gives them low probability. After a policy update their importance ratios are large. PPO's clip sets the gradient of a token with positive advantage to zero once its ratio passes 1 + ε, so the token is removed after the first on-policy update and stops contributing to later off-policy updates. CISPO keeps the token by clipping its weight instead of its update.

QuestionA token has advantage A = +1 and importance ratio r = 1.5. The upper clip for the weight is 1.2. What weight multiplies its log-probability gradient under CISPO, and what would PPO's clipped term contribute?Show answer

CISPO uses the clipped weight 1.2, so the token contributes 1.2 × 1 × ∇ log π, which is a nonzero update. PPO's clipped term is constant once the ratio exceeds 1 + ε, so its gradient is zero. The weight is an illustrative value, not the paper's setting.

QuestionThe paper reports inference FLOPs of about 25% of DeepSeek-R1 at 100K tokens. If DeepSeek-R1 needed 4 units of compute for that length, how many units would M1 need?Show answer

About 25% of 4 units, which is 1 unit.

QuestionThe authors' AIME 2024 accuracy rose from 68% to 80% during RL. What is the absolute gain in percentage points, and why does the paper link it to response length?Show answer

The gain is 12 percentage points. The paper observes that accuracy gains track growing response length, with average lengths above 20,000 tokens on AIME and LiveCodeBench, which suggests the longer reasoning is what improves the answers.

QuestionFrom Table 2, what is the AIME 2024 gap in points between MiniMax-M1-80k (86.0) and MiniMax-M1-40k (83.3)?Show answer

2.7 points. The 80K model is the 40K model's continuation with a longer output limit, and it wins on most benchmarks, which fits the paper's argument for scaling test-time compute.

Sources

Read the full paper

MiniMax, :, Aili Chen et al., 2025. arXiv:2506.13585