MiniMax’s two reports read as if they refute each other. MiniMax-M1 (June 2025) was a 456B model mixing lightning attention — a form of linear attention — at 7:1, built to make “long reasoning cheap”, and to scale RL on top of it the team created a new algorithm, CISPO. The MiniMax-M2 series report (May 2026) shrinks to a 229.9B / 9.8B-active model and reverts every layer to full attention, because “we found no efficient-attention variant that reliably matches full-attention quality in production settings”. CISPO survived and became M2’s default RL algorithm.
This lesson reads the M2 report as the spine and goes back to the M1 report for CISPO and lightning attention. The M2 report covers the checkpoints M2 → M2.5 → M2.7 of one architecture; most result tables are for M2.7.
At a glance
| MiniMax-M1 | MiniMax-M2 series | |
|---|---|---|
| Release | 2025-06 (arXiv 2506.13585) | M2 2025-10 (HF), report 2026-05 (arXiv 2605.26494) |
| Total / active params | 456B / 45.9B | 229.9B / 9.8B |
| Layers / hidden / vocab | not disclosed (based on MiniMax-Text-01) | 62 / 3,072 / 200,064 |
| Attention | one softmax block after every 7 lightning (linear) blocks | full attention in all layers, GQA 48 Q / 8 KV, RoPE |
| MoE | 32 experts | 8 of 256 fine-grained experts, sigmoid gating + learnable expert bias |
| Context | 1M (max output 40K / 80K) | 192K |
| Training tokens | 7.5T of continued pre-training on Text-01 | 29.2T (19.9T constant phase + 9.3T decay) |
| MTP | – | 1 module in pre-training → 3 via weight copy in the decay phase |
| RL | CISPO, 512 H800 × 3 weeks (about US$0.53M) | CISPO + Forge asynchronous agent RL |
| Open weights | Apache-2.0 (HF) | yes (HF licence tag “other”) |
Sources: M1 §1–§3, M2 §1–§3. Licences from the Hugging Face model-card metadata.
What is new
- CISPO. Instead of PPO/GRPO zeroing the gradient of tokens outside the trust region, it clips the importance-sampling weight itself and multiplies it in as a stop-gradient. Every token always contributes to the gradient. In M1’s controlled experiment it matched DAPO’s AIME performance in half the steps.
- Back to full attention. Hybrid SWA was tested at M2 scale for hundreds of billions to trillions of tokens, but retrieval, multi-hop reasoning and in-context learning degraded, and after SFT the gap widened on agent tasks beyond 32K. Evaluation difficulty and immature infrastructure are given as further reasons.
- Agent data pipelines. SWE, AppDev, Terminal-Gym and cowork data, each paired with an executable workspace and an artifact-aligned reward. AppDev is filtered by Agent-as-a-Verifier, which launches the app and operates it.
- Forge. An RL system that accepts agents even as black boxes: Windowed-FIFO scheduling, prefix-tree merging up to 40× faster, and MTP co-trained with the RL policy.
Architecture
M1: the lightning-attention hybrid
Softmax attention computes the output at position as . Every generated token must read all K and V so far, so per-token cost and KV cache grow with length. Linear attention replaces softmax by a kernel inner product and reorders the computation:
The state has a size independent of length: generation costs a constant per token and memory is fixed at per head. Lightning Attention is an I/O-aware implementation of this computation. In training and prefill it computes within a block with a masked matrix product and between blocks with the accumulated state, avoiding the cumulative-sum bottleneck of causal linear attention. M1 (the MiniMax-Text-01 architecture) places one softmax-attention block after every seven lightning-attention blocks. Linear attention summarises the past in a single state and is weak at exact retrieval, so the softmax layers compensate — a division of labour. The M1 report says it uses under 50% of DeepSeek-R1’s FLOPs at a 64K generation length and about 25% at 100K (Figure 1).
The calculator below reproduces this cost difference with a simple FLOP model. Its numbers come from the assumptions in the caption, not from the report.
MiniMax의 두 보고서는 서로를 반박하는 것처럼 읽힌다. 2025년 6월의 MiniMax-M1은 linear attention의 일종인 lightning attention을 7:1로 섞은 456B 모델로 “긴 추론을 싸게” 하는 것이 핵심이었고, 그 위에서 RL을 키우려고 새 알고리즘 CISPO를 만들었다. 2026년 5월의 MiniMax-M2 시리즈 보고서는 229.9B/9.8B 활성 모델로 체급을 줄이면서 attention을 전부 full attention으로 되돌렸다. “효율적인 attention 중 production 환경에서 full attention 품질을 안정적으로 따라오는 것을 찾지 못했다”는 이유다. CISPO는 살아남아 M2 RL의 기본 알고리즘이 되었다.
이 레슨은 M2 보고서를 축으로 읽되, CISPO와 lightning attention은 M1 보고서로 거슬러 올라가 본다. 보고서는 M2 → M2.5 → M2.7로 이어진 같은 아키텍처의 체크포인트들을 함께 다루며, 결과 표는 주로 M2.7이다.
한눈에
| MiniMax-M1 | MiniMax-M2 시리즈 | |
|---|---|---|
| 공개 | 2025-06 (arXiv 2506.13585) | M2 2025-10 (HF), 보고서 2026-05 (arXiv 2605.26494) |
| 총 / 활성 파라미터 | 456B / 45.9B | 229.9B / 9.8B |
| 층 / hidden / vocab | 공개 안 됨 (MiniMax-Text-01 기반) | 62 / 3,072 / 200,064 |
| attention | 7 lightning(linear) 블록마다 softmax 블록 1개 | 전 층 full attention, GQA 48 Q / 8 KV, RoPE |
| MoE | expert 32개 | fine-grained expert 256개 중 8개, sigmoid gating + 학습되는 expert bias |
| context | 1M (최대 출력 40K / 80K) | 192K |
| 학습 토큰 | Text-01에 7.5T 추가 사전학습 | 29.2T (일정 구간 19.9T + decay 9.3T) |
| MTP | – | 사전학습 1개 → decay 단계에서 weight copy로 3개 |
| RL | CISPO, 512 H800 × 3주(약 53만 달러) | CISPO + Forge 비동기 agent RL |
| 공개 가중치 | Apache-2.0 (HF) | 공개 (HF 라이선스 표기 “other”) |
출처: M1 §1–§3, M2 §1–§3. 라이선스는 Hugging Face 모델 카드 메타데이터.
무엇이 새로운가
- CISPO. PPO/GRPO가 trust region 밖 토큰의 gradient를 0으로 만드는 대신, importance sampling 가중치 자체를 잘라 stop-gradient로 곱한다. 모든 토큰이 항상 gradient에 기여한다. M1의 통제 실험에서 DAPO와 같은 AIME 성능을 절반의 step으로 냈다.
- full attention으로의 회귀. M2 규모에서 hybrid SWA를 수천억–수조 토큰까지 시험했지만 검색·multi-hop·in-context learning이 떨어지고, SFT 뒤 32K 넘는 agent 과제에서 격차가 커졌다. 평가의 어려움과 인프라 미성숙도 이유로 든다.
- agent 데이터 파이프라인. 실행 가능한 workspace와 산출물에 맞는 보상(artifact-aligned reward)을 짝지은 SWE·AppDev·Terminal-Gym·cowork 데이터. AppDev는 앱을 띄워 직접 조작해 보는 Agent-as-a-Verifier로 거른다.
- Forge. agent를 블랙박스로도 받는 RL 시스템. Windowed FIFO 스케줄링, 최대 40배 빠른 prefix tree merging, RL 정책과 함께 학습되는 MTP.
아키텍처
M1: lightning attention 하이브리드
softmax attention은 위치 의 출력을 로 계산한다. 생성할 때마다 지금까지의 모든 K·V를 읽어야 하므로 토큰당 비용과 KV cache가 길이에 비례한다. linear attention은 softmax를 커널 내적으로 바꿔 결합 순서를 바꾼다.
상태 의 크기는 길이와 무관하다. 생성 비용은 토큰당 상수, 메모리는 head당 로 고정이다. Lightning Attention은 이 계산을 I/O를 고려해 구현한 것이다. 학습·prefill에서는 블록 안은 마스크된 행렬곱으로, 블록 사이는 누적 상태로 계산해 causal linear attention의 누적합(cumsum) 병목을 피한다. M1(=MiniMax-Text-01 구조)은 이런 lightning attention 블록 7개마다 softmax attention 블록 1개를 둔다. 상태 하나로 과거를 요약하는 linear attention은 정확한 검색이 약하므로 softmax 층이 그것을 보완하는 분업이다. M1 보고서는 생성 길이 64K에서 DeepSeek-R1의 50% 미만, 100K에서 약 25%의 FLOPs를 쓴다고 보고한다(Figure 1).
아래 계산기는 이 비용 차이를 단순한 FLOP 모델로 재현한다. 수치는 보고서 값이 아니라 캡션에 적은 가정에서 나온다.
→ Go deeper: Linear attention and SSMs — lightning attention next to Gated DeltaNet, KDA and Mamba.
M2: why it went back to full attention
Section 2.2.2 of the M2 report gives three reasons.
- Evaluation is hard. During Text-01 development the hybrid models looked equal to full attention on standard benchmarks such as MMLU, BBH, MATH and LongBench, but at larger scale clear deficits appeared in complex multi-hop reasoning. Proxy metrics were built, but their correlation with downstream performance breaks easily at new scales or task distributions, and the compute needed for statistically significant comparisons grows with task complexity.
- Infrastructure is less mature. Linear and sparse attention are often memory-bound even in training; at inference they are sensitive to low-precision storage, lack native prefix caching, and integrate unclearly with speculative decoding.
- The hybrid-SWA experiments failed. At M2 scale they kept pre-training for hundreds of billions to trillions of tokens while varying the SWA ratio, RoPE settings, intra- and inter-layer mixing, and even adding sink tokens; every variant degraded on retrieval, multi-hop reasoning and in-context learning (Table 2). After SFT the gap grew on agent and long-context tasks beyond 32K, while results within 32K were mixed (Table 3).
| Pre-training evaluation (M2 Table 2) | full | hybrid SWA |
|---|---|---|
| MMLU / MATH | 85.5 / 60.3 | 85.6 / 60.3 |
| RULER 32K CWE / MQ | 99.0 / 99.0 | 99.0 / 99.0 |
| RULER 128K CWE / MQ | 90.0 / 99.0 | 72.0 / 93.0 |
| HELMET ICL | 75.8 | 72.7 |
| MTOB K→e Bleurt / e→K ChrF | 60.0 / 44.8 | 45.0 / 27.2 |
Short-context knowledge and math are identical; only 128K retrieval and long in-context translation (MTOB: translating with a whole grammar book in context) drop sharply — reason 1, “it looks equal on standard benchmarks”, in plain view. After SFT (Table 3), SWE-verified drops 54.7 → 50.2 and τ²-Bench telecom 32.5 → 21.0, while IFBench (23.1 → 27.2), XBench-ds (58.0 → 63.0) and τ²-Bench retail (62.3 → 67.5) actually go up.
→ Go deeper: Design choices compared lays the two reports’ attention choices side by side with gpt-oss, GLM-5 and MAI-Base-2.
MoE and MTP
M2 changes three things in its MoE (§2.2.1): (1) fine-grained experts (many small experts), (2) sigmoid gating, which scores each expert independently instead of softmax top-k (no sum-to-one constraint, so several experts can fire with high confidence at once), and (3) a learnable expert bias added to the scores, which reduces reliance on the auxiliary loss. In an ablation with 2B active / 17.8B total parameters on 500B tokens (Table 1), going from 32 experts with top-2 to 128 with top-8 lifts MATH 19.6 → 24.1 and HumanEval 29.7 → 32.5, and adding MTP lifts MATH 19.6 → 21.3.
MTP uses one DeepSeek-V3-style module in pre-training (loss weight 0.3 → 0.1 in the decay phase) and is expanded to three modules in the decay phase of continued pre-training by copying the main model’s weights, because randomly initialised modules start with high loss and temporarily damage the main model. Right after expansion the main model is frozen and only the MTP modules train until their loss stabilises, then everything trains jointly. Keeping the main model frozen throughout gave worse final MTP quality (§2.3).
Data
29.2T pre-training tokens. Web, papers, books, code and QA are scored along several dimensions with model-based reward scores and auxiliary classifiers; high quality is upsampled while keeping category diversity. Code, math and STEM are upsampled well above their natural share (exact ratios not disclosed). After a 19.9T constant-LR phase, a 9.3T decay phase extends the context 8K → 32K → 192K. Long-context data comes from concatenated high-quality code, naturally long PDFs, and packing of topically related documents (§3).
M1’s RL data (for reference). About 50K math problems (only those where a strong reasoning model’s pass@10 is above 0 and below 0.9), about 53K problems across 41 logic tasks synthesised with SynLogic, 30K competitive-programming problems, several thousand SWE-bench-style real-repository environments, and 25K general tasks graded by a GenRM (M1 §4).
M2’s post-training data (§4). The shared principle is to pair every task with an executable environment and a verification signal that matches its artifact format.
| Area | Pipeline | Reward / acceptance |
|---|---|---|
| SWE | collect permissively licensed GitHub PRs + issues → an agent synthesises multi-language Docker environments → tag PR type (bug, feature, performance, refactor, test) → type-specific verifiable reward → model-based spec–test consistency check → augmentation (bug injection, commit merging, SWE-Test conversion, code review). 10+ languages | bug fixes: F2P and P2P tests; features: newly added tests; performance: P2P tests confirming a stable before/after difference |
| AppDev | expert meta queries × seeds → MinHash dedup → LLM-judge query filter → trajectory sampling with expert system prompts (prompt distillation: parts of the prompt dropped at training time) | Agent-as-a-Verifier: deploy the app in a sandbox → execution → interaction (Playwright) → visual aesthetics, three layers; execution is a hard gate |
| Terminal-Gym | select terminal, scripting and debugging threads from all of Stack Overflow → structured task specs → an agent generates Dockerfile and tests → query evolution removing hints → difficulty calibration by low zero-shot pass rate | unified test suite |
| Cowork | deep search (rewriting and entity obfuscation to control difficulty, evidence specs), office (GDPval-based + hierarchical synthesis over occupations), finance and spreadsheets (tasks derived backward from tool-execution traces, cell-value matching), slides | format-specific verification + pairwise comparison + rubrics |
SFT builds interleaved-thinking trajectories — thinking blocks alternating with actions and observations — through large-scale rejection sampling (§5). The key is keeping earlier turns’ thinking blocks in the context of the next turn; the report says an ablation that strips them consistently hurts (§7.1, no table of numbers).
Training
M1: what scaling RL on the hybrid ran into
M1 continues pre-training MiniMax-Text-01 for 7.5T tokens (STEM, code, books and reasoning data raised to 70%; synthetic data excluded), then long-CoT SFT (about 60% math and code), then RL. The problems and fixes in §3.2 transfer to other architectures.
- Training–inference probability mismatch. The correlation between a token’s training-mode and inference-mode probabilities stuck around 0.9x and the reward would not rise. Layer-by-layer analysis traced it to high-magnitude activations in the LM head; raising the LM head to FP32 brought the correlation to 0.99x. Small dense softmax models did not show the problem. It is a textbook case for the training–inference mismatch lesson.
- Optimiser sensitivity. Gradient magnitudes ranged from to , mostly below . verl’s defaults (β=(0.9, 0.999), eps=1e-8) failed to converge, so they used , , eps=.
- Early truncation of repetition. Generation stops if 3,000 consecutive tokens all have probability above 0.99, because the large gradients of responses stuck in loops destabilised the model.
- Extending output length. The budget grew in stages, 40K → 48K → … → 80K, and late in each stage a pattern collapse garbled the ends of responses. The cause: wrong responses grow longer faster than correct ones, so negative gradient piles up at the end of generations. Fixes: repetition detection, combining sample-level loss with token-level normalisation, and lowering the gradient-clip threshold and .
M2: objective and rewards
M2 models the agent as an MDP where “everything outside the LLM’s generation is environment”: context management, memory, sub-agent calls and harness branching all live in the transition . The training unit is therefore each pair, and the policy need not know whether the context was simply appended to or aggressively truncated. The reward is a sum of three terms (Eq. 7):
The process reward penalises language mixing and tool-call format errors and rewards well-structured intermediate reasoning. The completion-time reward prefers, among equally correct trajectories, those with shorter wall-clock time — e.g. by calling tools in parallel or using sub-agents well ( is decreasing). The advantage is reward-to-go minus a trajectory-level baseline, and the objective is optimised with CISPO. Training runs in several stages, each mixing four domains at once (reasoning, code, agent, general); later stages raise the agent and code share, per-domain maximum context, and task difficulty (§6.1.6).
Deep dive 1 — CISPO
The problem with token clipping
Differentiate GRPO’s token loss with respect to : on the side where the clip is active the term is constant and the gradient is exactly 0. With and , the token vanishes from that update. The M1 report traced GRPO’s failure to elicit long CoT in zero-RL experiments to exactly this. Reflective tokens such as “However”, “Recheck”, “Wait”, “Aha” are forks in the reasoning path and have low probability under the base model. Low-probability tokens jump in after a single update, so they get clipped after the first on-policy update and contribute nothing to the following off-policy updates (16 per generation batch in M1). Only raising the upper bound, as DAPO’s Clip-Higher does, was less effective in this setting.
Clip the weight, keep the gradient
The starting point is REINFORCE corrected by importance sampling (M1 Eq. 3):
Since , this equals the gradient of (the PPO surrogate without clipping). Instead of clipping token updates, CISPO clips this weight (M1 Eq. 4–5, M2 Eq. 2–3):
M1 effectively set no lower bound (a large ) and tuned only the upper one; M2 writes it explicitly as . It uses group-relative advantages (GRPO), token-level aggregation (DAPO), dynamic sampling and a length penalty, and no KL term. Comparing the per-token gradients makes the difference obvious:
→ Go deeper: The frontier RL landscape writes CISPO and every other lab’s objective as such a per-token weight, in one table; Clipping and importance sampling plots the weight functions against each other.
→ 더 깊이: Linear attention과 SSM — lightning attention을 Gated DeltaNet·KDA·Mamba와 나란히 본다.
M2: 왜 full attention으로 돌아갔나
M2 보고서 §2.2.2는 세 가지 이유를 든다.
- 평가가 어렵다. Text-01 개발 때 하이브리드 모델은 MMLU·BBH·MATH·LongBench 같은 표준 벤치에서 full attention과 같아 보였지만, 규모를 키우자 복잡한 multi-hop 추론에서 분명한 결손이 드러났다. 대리 지표를 만들었지만 그 상관은 규모나 새 과제 분포에서 깨지기 쉽고, 통계적으로 유의한 비교에 드는 컴퓨트는 과제가 복잡해질수록 커진다.
- 인프라가 덜 성숙했다. linear·sparse attention은 학습 중에도 memory-bound인 경우가 많고, 추론에서는 저정밀 저장에 민감하며 prefix caching을 기본 지원하지 않고 speculative decoding과의 결합도 불분명하다.
- hybrid SWA 실험이 실패했다. M2 규모에서 SWA 비율, RoPE 설정, 층 내부·층 사이 혼합, sink token 추가까지 바꿔 가며 수천억–수조 토큰을 계속 사전학습했지만, 모든 변형이 검색·multi-hop·in-context learning에서 떨어졌다(Table 2). SFT 뒤에는 32K를 넘는 agent·긴 문맥 과제에서 격차가 더 커졌고, 32K 이내에서는 섞여 있었다(Table 3).
| 사전학습 평가 (M2 Table 2) | full | hybrid SWA |
|---|---|---|
| MMLU / MATH | 85.5 / 60.3 | 85.6 / 60.3 |
| RULER 32K CWE / MQ | 99.0 / 99.0 | 99.0 / 99.0 |
| RULER 128K CWE / MQ | 90.0 / 99.0 | 72.0 / 93.0 |
| HELMET ICL | 75.8 | 72.7 |
| MTOB K→e Bleurt / e→K ChrF | 60.0 / 44.8 | 45.0 / 27.2 |
짧은 문맥의 지식·수학은 같고, 128K 검색과 긴 in-context 번역(MTOB: 문법책 한 권을 문맥에 넣고 번역)에서만 크게 떨어진다. “표준 벤치에서는 같아 보인다”는 1번 이유가 그대로 보인다. SFT 뒤 비교(Table 3)에서도 SWE-verified 54.7 → 50.2, τ²-Bench telecom 32.5 → 21.0으로 떨어지는 반면 IFBench(23.1 → 27.2), XBench-ds(58.0 → 63.0), τ²-Bench retail(62.3 → 67.5)은 오히려 올랐다.
→ 더 깊이: 설계 선택 비교는 두 보고서의 attention 선택을 gpt-oss, GLM-5, MAI-Base-2와 나란히 놓는다.
MoE와 MTP
M2의 MoE는 세 가지를 바꿨다(§2.2.1). (1) 작은 expert를 많이 두는 fine-grained expert, (2) softmax top-k 대신 expert마다 독립 점수를 주는 sigmoid gating(합이 1이라는 제약이 없어 여러 expert가 동시에 높은 확신으로 켜질 수 있다), (3) 점수에 더하는 학습 가능한 expert bias로 auxiliary loss 의존을 줄였다. 2B 활성 / 17.8B 총 파라미터, 500B 토큰 ablation(Table 1)에서 expert 32개·top-2를 128개·top-8로 바꾸면 MATH 19.6 → 24.1, HumanEval 29.7 → 32.5, MTP를 더하면 MATH 19.6 → 21.3이었다.
MTP는 사전학습에서 DeepSeek-V3식 모듈 1개(손실 가중치 0.3 → decay 단계에서 0.1), continued pre-training의 decay 단계에서 본 모델 가중치를 복사해 3개로 늘린다. 무작위 초기화한 모듈은 높은 손실로 시작해 본 모델을 일시적으로 망가뜨리기 때문이다. 확장 직후 본 모델을 얼리고 MTP만 학습하다가 손실이 안정되면 함께 학습한다. 본 모델을 끝까지 얼린 MTP-only 학습은 최종 품질이 더 나빴다(§2.3).
데이터
사전학습 29.2T 토큰. 웹, 논문, 책, 코드, QA를 모델 기반 보상 점수와 보조 분류기로 다차원 평가하고, 고품질을 upsample하면서 범주 다양성을 유지한다. 코드·수학·STEM은 자연 분포보다 크게 upsample했다(구체 비율은 비공개). 일정 LR 구간 19.9T, 이후 decay 구간 9.3T 동안 context를 8K → 32K → 192K로 늘린다. 긴 문맥 데이터는 고품질 코드 이어 붙이기, 원래 긴 PDF, 주제가 관련된 문서 묶기(packing)에서 온다(§3).
M1의 RL 데이터(참고). 수학 약 50K(강한 추론 모델의 pass@10이 0 초과 0.9 미만인 문제만), SynLogic으로 합성한 41개 논리 과제 약 53K, 경쟁 프로그래밍 30K, SWE-bench식 실제 저장소 환경 수천 개, GenRM으로 채점하는 일반 과제 25K(M1 §4).
M2의 사후학습 데이터(§4). 모든 과제를 실행 가능한 환경과 그 산출물 형식에 맞는 검증 신호로 짝짓는 것이 공통 원칙이다.
| 영역 | 파이프라인 | 보상·수용 기준 |
|---|---|---|
| SWE | 허용 라이선스 GitHub PR+issue 수집 → agent가 다언어 Docker 환경 합성 → PR 유형 태깅(버그·기능·성능·리팩터·테스트) → 유형별 검증 보상 → 모델로 명세–테스트 일관성 검증 → 변형(버그 주입, commit 병합, SWE-Test 전환, 코드 리뷰). 10개 이상 언어 | 버그 수정은 F2P·P2P 테스트, 기능 추가는 새 테스트, 성능은 전후 성능 차이를 확인하는 P2P |
| AppDev | 전문가가 만든 meta query × 시드 → MinHash 중복 제거 → LLM judge로 질의 품질 필터 → 전문가 system prompt로 궤적 샘플링(학습 땐 prompt 일부를 지우는 prompt distillation) | Agent-as-a-Verifier: 앱을 sandbox에 띄우고 실행 → 상호작용(Playwright) → 시각 미학의 3층 평가, 실행층은 hard gate |
| Terminal-Gym | Stack Overflow 전체에서 터미널·스크립트·디버깅 스레드 선별 → 구조화된 과제 명세 → agent가 Dockerfile·테스트 생성 → 힌트 제거 질의 진화 → 낮은 zero-shot 통과율로 난이도 보정 | 통합 테스트 스위트 |
| Cowork | 딥서치(질문 재작성·개체 은닉으로 난이도 조절, 증거 명세), 오피스(GDPval 기반 + 직업 분류 계층 합성), 금융·스프레드시트(도구 실행 trace에서 역으로 과제 도출, 셀 값 일치), 슬라이드 | 산출물 형식별 검증 + 쌍대 비교 + rubric |
SFT는 사고 블록이 행동·관찰과 번갈아 나오는 interleaved thinking 궤적을 대규모 rejection sampling으로 만든다(§5). 다음 턴에 이전 턴의 사고 블록을 그대로 남겨 두는 것이 핵심이고, 사고 블록을 지우는 ablation에서 성능이 일관되게 떨어졌다고 보고한다(§7.1, 수치 표는 없음).
학습
M1: 하이브리드 위에서 RL을 키우며 겪은 일
M1은 MiniMax-Text-01을 7.5T 토큰 더 사전학습(STEM·코드·책·추론 데이터를 70%로, 합성 데이터는 배제)하고, 긴 CoT SFT(수학·코드가 약 60%) 뒤 RL로 간다. 보고서 §3.2의 문제와 해법은 다른 아키텍처에도 그대로 교훈이 된다.
- 학습–추론 확률 불일치. 같은 토큰의 학습 모드 확률과 추론 모드 확률의 상관이 약 0.9x에 머물러 보상이 오르지 않았다. 층별 분석 결과 원인은 출력층 LM head의 큰 활성값이었고, LM head를 FP32로 올리자 상관이 0.99x가 되었다. 작은 dense softmax 모델에서는 없던 문제다. 학습–추론 불일치 레슨의 대표 사례다.
- optimizer 민감도. gradient 크기가 에서 까지 퍼져 있고 대부분 보다 작았다. verl 기본값(β=(0.9, 0.999), eps=1e-8)으로는 수렴하지 않아 , , eps=를 썼다.
- 반복 조기 종료. 연속 3,000 토큰이 모두 확률 0.99를 넘으면 생성을 끊는다. 반복 루프에 빠진 응답의 큰 gradient가 모델을 흔들었기 때문이다.
- 출력 길이 확장. 40K → 48K → … → 80K로 단계적으로 늘렸고, 확장 후반에 응답 뒷부분이 깨지는 pattern collapse가 생겼다. 원인은 오답 응답이 정답보다 빨리 길어져 생성 뒷부분에 음의 gradient가 몰리는 것. 반복 감지, 샘플 단위 손실과 토큰 단위 정규화의 결합, gradient clip 임계와 를 낮추는 것으로 대응했다.
M2: 목적함수와 보상
M2는 agent를 “LLM의 생성 바깥은 전부 환경”으로 보는 MDP로 모델링한다. context 관리, 메모리, sub-agent 호출, harness의 분기 논리까지 환경의 전이 에 넣는다. 그래서 학습 단위는 각 쌍이고, 정책은 문맥이 단순히 이어 붙여졌는지 공격적으로 잘렸는지 알 필요가 없다. 보상은 세 가지의 합이다(Eq. 7).
process reward는 언어 혼합·도구 호출 형식 오류에 벌점을, 잘 구조화된 중간 추론에 보상을 준다. 완료 시간 보상은 같은 정답이라도 도구를 병렬로 부르거나 sub-agent를 잘 써서 벽시계 시간이 짧은 궤적을 선호하게 만든다(는 감소 함수). advantage는 trajectory 단위 baseline을 뺀 reward-to-go다. 이 RL 목적은 CISPO로 최적화한다. 학습은 여러 단계로 나뉘고, 각 단계 안에서는 추론·코드·agent·일반 네 도메인을 동시에 섞는다. 단계가 지날수록 agent·코드 비율, 도메인별 최대 context, 과제 난이도를 올린다(§6.1.6).
핵심 method 깊게 보기 1 — CISPO
토큰 clip의 문제
GRPO의 토큰 손실 를 로 미분하면, clip이 활성인 쪽에서는 상수라 gradient가 정확히 0이다. 이고 이면 그 토큰은 이번 업데이트에서 사라진다. M1 보고서는 zero-RL 실험에서 GRPO가 긴 CoT를 끌어내지 못한 원인을 여기서 찾았다. “However”, “Recheck”, “Wait”, “Aha” 같은 반성 토큰은 추론 경로의 분기점(fork)인데, base 모델에서 확률이 낮다. 확률이 낮은 토큰은 업데이트 한 번에도 가 크게 뛰므로, 첫 on-policy 업데이트 뒤 clip되어 이후의 off-policy 업데이트(M1은 generation batch당 16회)에서 전혀 기여하지 못한다. DAPO의 Clip-Higher처럼 상한만 올리는 방법은 이 설정에서 덜 효과적이었다.
가중치를 자르고 gradient는 남긴다
출발점은 importance sampling으로 보정한 REINFORCE다(M1 Eq. 3).
이므로 이는 의 gradient와 같다(PPO surrogate에서 clip이 없는 경우). CISPO는 토큰 업데이트를 자르는 대신 이 가중치를 자른다(M1 Eq. 4–5, M2 Eq. 2–3).
M1은 하한을 사실상 두지 않고(큰 ) 상한만 조정했고, M2는 이를 로 명시한다. 그룹 상대 advantage(GRPO), 토큰 단위 집계(DAPO), dynamic sampling과 길이 penalty를 쓰고 KL 항은 없다. 토큰별 gradient를 비교하면 차이가 한눈에 보인다.
→ 더 깊이: 프론티어 RL 목적함수 지도는 CISPO와 다른 lab의 목적함수를 모두 이런 토큰별 가중치로 적어 한 표에 놓고, Clipping과 importance sampling은 가중치 함수들을 나란히 그린다.
M1 also gives a general form that unifies the two (Eq. 6–7). Multiply the CISPO objective by a token mask ; setting to the mask that PPO’s trust region implicitly defines (0 if and , 0 if and ) recovers PPO-style behaviour. It is a framework that treats “which tokens’ gradients to drop” as a hyperparameter. MiMo-V2.6’s four-way clip mask and the double-sided IS masks of the GLM family can be read within it.
import numpy as np
def weight(r, A, method, eps=0.2, eps_high=0.28, eps_is=1.0):
"""token gradient = weight · A · ∇log π. (derivative of PPO-style min-clip; CISPO's sg(clip r))"""
if method in ("grpo", "dapo"):
lo, hi = 1 - eps, 1 + (eps_high if method == "dapo" else eps)
drop = ((A > 0) & (r > hi)) | ((A < 0) & (r < lo))
return np.where(drop, 0.0, r)
if method == "cispo": # M2 Eq.(3): clip(r, 0, 1+ε_high^IS)
return np.minimum(r, 1 + eps_is)
r = np.array([0.5, 0.9, 1.0, 1.3, 2.0, 4.0])
for A in (+1, -1):
print(f"A={A:+d} r :", r)
for m in ("grpo", "dapo", "cispo"):
print(f" {m:6s} :", weight(r, np.full_like(r, A), m))
# Toy: one-token "responses". Token 0 = a rare fork token ("Wait") — choosing it makes success likely.
def softmax(z):
e = np.exp(z - z.max()); return e / e.sum()
def run(method, rounds=12, G=256, mb=16, lr=0.5, seed=0):
rng = np.random.default_rng(seed)
z = np.array([-2.0, 1.0, 1.0, 1.0, 1.0]) # p(Wait) ≈ 0.012
p_succ = np.array([0.9, 0.3, 0.3, 0.3, 0.3])
hist = []
for _ in range(rounds):
p_old = softmax(z)
a = rng.choice(5, size=G, p=p_old)
R = (rng.random(G) < p_succ[a]).astype(float)
A = (R - R.mean()) / (R.std() + 1e-6)
for idx in np.array_split(rng.permutation(G), G // mb): # 16 updates on one batch
p = softmax(z)
ratio = p[a[idx]] / p_old[a[idx]]
w = weight(ratio, A[idx], method)
g = np.zeros(5)
for ai, wi, Ai in zip(a[idx], w, A[idx]):
g += wi * Ai * (np.eye(5)[ai] - p) # ∇_z log π(a) = e_a − π
z = z + lr * g / len(idx)
hist.append(softmax(z)[0])
return np.array(hist)
print("\np(Wait) per round (mean of 3 seeds)")
for m in ("grpo", "dapo", "cispo"):
h = np.mean([run(m, seed=s) for s in range(3)], axis=0)
print(f"{m:6s}", " ".join(f"{x:.2f}" for x in h))The first table shows the shape of the multiplier. For , GRPO and DAPO go to 0 from , while CISPO stops at . For it is the other way round: the PPO family does not clip large (the min picks the unclipped side, so gives a multiplier of 4), whereas CISPO caps it at 2 here too. CISPO is more permissive than PPO in one direction and stricter in the other.
In the toy experiment the “Wait” token, initially at 1.2% probability, is the fork that leads to correct answers. With 16 mini-batch updates per batch, GRPO stops learning from this token within the batch as soon as its exceeds 1.2, and after 12 rounds p(Wait) only reaches 0.25. DAPO (upper bound 1.28) reaches 0.52, and CISPO is already at 0.91 by round 8. This points the same way as M1’s Figure 2 (Qwen2.5-32B base, DAPO math data, AIME 2024): “higher than GRPO and DAPO at the same step, and matching DAPO in half the steps”.
What does the CISPO objective become if ε_high^IS goes to infinity?
With no upper bound (and a lower bound of 0), , so — the standard policy gradient with off-policy samples corrected by IS. The M1 report says the same: “without weight clipping, it reduces to the standard policy gradient objective”. The upper bound trades a little bias for less variance from large .
The PyTorch implementation is short. The key is to detach the ratio first, then clamp it and multiply.
import torch
def cispo_loss(logp, old_logp, adv, mask, eps_is_high=1.0, eps_is_low=None,
ppo_mask=False, eps_low=0.2, eps_high=0.28):
"""logp, old_logp, mask: (N, T) token tensors. adv: (N,) or (N, T). Only logp has grad."""
if adv.dim() == 1:
adv = adv[:, None].expand_as(logp)
ratio = torch.exp(logp.detach() - old_logp) # sg(ρ)
lo = 0.0 if eps_is_low is None else 1.0 - eps_is_low
w = ratio.clamp(min=lo, max=1.0 + eps_is_high) # sg(clip(ρ))
m = mask.float()
if ppo_mask: # M1 Eq.(6)-(7): PPO trust-region mask
drop = ((adv > 0) & (ratio > 1 + eps_high)) | ((adv < 0) & (ratio < 1 - eps_low))
m = m * (~drop).float()
per_tok = w * adv * logp * m
return -per_tok.sum() / mask.sum().clamp_min(1) # 1 / Σ_i |o_i| (token-level aggregation)Deep dive 2 — Forge’s scheduling
Agent rollouts range from API calls of a few seconds to reasoning chains of hours. Because of this, both naive schedules fail (§6.2.4).
- Strict FIFO: build training batches strictly in generation order. The distribution is preserved, but a single long rollout at the head of the queue blocks everyone (head-of-line blocking).
- Greedy: take whatever finishes first. Throughput is maximal, but early batches are dominated by short, easy tasks and late batches by hard ones, so the gradient oscillates and training becomes unstable.
Windowed FIFO picks a point in between. With generation queue and head index , the trainer may only take completed trajectories inside . Inside the window it is greedy; beyond the window everything is blocked regardless of completion, and the window advances only as head tasks are consumed. Small approaches FIFO, large approaches greedy; the report uses .
M1은 이 둘을 하나로 묶는 일반형도 제시한다(Eq. 6–7). CISPO 목적에 토큰 마스크 를 곱하고, 을 PPO trust region이 암묵적으로 정의하는 마스크(이고 이면 0, 이고 이면 0)로 두면 PPO식 동작이 된다. 즉 “어떤 토큰의 gradient를 버릴지”를 하이퍼파라미터로 다루는 틀이다. MiMo-V2.6의 네 방향 clip 마스크나 GLM 계열의 double-sided IS 마스크도 이 틀 안에서 읽을 수 있다.
import numpy as np
def weight(r, A, method, eps=0.2, eps_high=0.28, eps_is=1.0):
"""토큰 gradient = weight · A · ∇log π. (PPO 계열 min-clip의 미분, CISPO의 sg(clip r))"""
if method in ("grpo", "dapo"):
lo, hi = 1 - eps, 1 + (eps_high if method == "dapo" else eps)
drop = ((A > 0) & (r > hi)) | ((A < 0) & (r < lo))
return np.where(drop, 0.0, r)
if method == "cispo": # M2 Eq.(3): clip(r, 0, 1+ε_high^IS)
return np.minimum(r, 1 + eps_is)
r = np.array([0.5, 0.9, 1.0, 1.3, 2.0, 4.0])
for A in (+1, -1):
print(f"A={A:+d} r :", r)
for m in ("grpo", "dapo", "cispo"):
print(f" {m:6s} :", weight(r, np.full_like(r, A), m))
# 장난감: 한 토큰짜리 "응답". 0번 = 드문 fork 토큰("Wait") — 고르면 정답 확률이 높다.
def softmax(z):
e = np.exp(z - z.max()); return e / e.sum()
def run(method, rounds=12, G=256, mb=16, lr=0.5, seed=0):
rng = np.random.default_rng(seed)
z = np.array([-2.0, 1.0, 1.0, 1.0, 1.0]) # p(Wait) ≈ 0.012
p_succ = np.array([0.9, 0.3, 0.3, 0.3, 0.3])
hist = []
for _ in range(rounds):
p_old = softmax(z)
a = rng.choice(5, size=G, p=p_old)
R = (rng.random(G) < p_succ[a]).astype(float)
A = (R - R.mean()) / (R.std() + 1e-6)
for idx in np.array_split(rng.permutation(G), G // mb): # 한 batch로 16번 업데이트
p = softmax(z)
ratio = p[a[idx]] / p_old[a[idx]]
w = weight(ratio, A[idx], method)
g = np.zeros(5)
for ai, wi, Ai in zip(a[idx], w, A[idx]):
g += wi * Ai * (np.eye(5)[ai] - p) # ∇_z log π(a) = e_a − π
z = z + lr * g / len(idx)
hist.append(softmax(z)[0])
return np.array(hist)
print("\nround별 p(Wait) (3개 seed 평균)")
for m in ("grpo", "dapo", "cispo"):
h = np.mean([run(m, seed=s) for s in range(3)], axis=0)
print(f"{m:6s}", " ".join(f"{x:.2f}" for x in h))첫 표는 계수의 모양이다. 에서 GRPO·DAPO는 부터 0이고 CISPO는 에서 멈춘다. 에서는 거꾸로 PPO 계열이 큰 를 자르지 않는다(min이 clip되지 않은 쪽을 고르므로 면 계수 4). CISPO는 이 경우도 2로 막는다. 즉 CISPO는 PPO보다 한쪽으로는 관대하고 다른 쪽으로는 엄격하다.
장난감 실험에서는 처음 확률 1.2%인 “Wait” 토큰이 정답으로 가는 분기점이다. 한 batch로 mini-batch 업데이트를 16번 하면 GRPO는 이 토큰의 가 1.2를 넘는 순간부터 그 batch 안에서 더 이상 배우지 못해, 12 round 뒤 p(Wait)가 0.25에 그친다. DAPO(상한 1.28)는 0.52, CISPO는 round 8에 이미 0.91이다. M1 Figure 2(Qwen2.5-32B base, DAPO 수학 데이터, AIME 2024)의 “같은 step에서 GRPO·DAPO보다 높고, DAPO 성능을 절반의 step으로 낸다”는 결과와 같은 방향이다.
CISPO에서 ε_high^IS를 무한대로 키우면 목적함수는 무엇이 되는가?
상한이 없으면 (하한도 0이면)라서 , 즉 off-policy 샘플을 IS로 보정한 표준 policy gradient다. M1 보고서도 “weight clipping이 없으면 표준 policy gradient 목적으로 환원된다”고 쓴다. 상한은 큰 가 만드는 분산을 줄이는 대신 약간의 편향을 들인다.
PyTorch 구현은 짧다. 핵심은 비율을 detach한 뒤 clamp해서 곱하는 것이다.
import torch
def cispo_loss(logp, old_logp, adv, mask, eps_is_high=1.0, eps_is_low=None,
ppo_mask=False, eps_low=0.2, eps_high=0.28):
"""logp, old_logp, mask: (N, T) 토큰 텐서. adv: (N,) 또는 (N, T). logp만 grad를 가진다."""
if adv.dim() == 1:
adv = adv[:, None].expand_as(logp)
ratio = torch.exp(logp.detach() - old_logp) # sg(ρ)
lo = 0.0 if eps_is_low is None else 1.0 - eps_is_low
w = ratio.clamp(min=lo, max=1.0 + eps_is_high) # sg(clip(ρ))
m = mask.float()
if ppo_mask: # M1 Eq.(6)-(7): PPO trust region 마스크
drop = ((adv > 0) & (ratio > 1 + eps_high)) | ((adv < 0) & (ratio < 1 - eps_low))
m = m * (~drop).float()
per_tok = w * adv * logp * m
return -per_tok.sum() / mask.sum().clamp_min(1) # 1 / Σ_i |o_i| (토큰 단위 집계)핵심 method 깊게 보기 2 — Forge의 스케줄링
agent rollout은 몇 초짜리 API 호출부터 몇 시간짜리 추론 체인까지 길이가 극단적으로 다르다. 이 때문에 두 가지 단순한 스케줄링이 모두 실패한다(§6.2.4).
- strict FIFO: 생성 순서대로만 학습 batch를 만든다. 분포는 보존되지만 긴 rollout 하나가 줄 맨 앞에서 모두를 막는다(head-of-line blocking).
- greedy: 먼저 끝난 것부터 가져간다. 처리량은 최대지만 초반 batch는 짧고 쉬운 과제, 후반 batch는 어려운 과제로 몰려 gradient가 진동하고 학습이 불안정해진다.
Windowed FIFO는 그 사이를 고른다. 생성 큐 의 head가 일 때 학습기는 안의 완료된 궤적만 가져갈 수 있다. window 안에서는 greedy, window 경계 밖은 완료 여부와 상관없이 막히고, head 쪽 과제가 소비되어야 window가 전진한다. 가 작으면 FIFO, 크면 greedy이고 보고서는 을 쓴다.
import numpy as np
def simulate(W, n_tasks=320, N=64, B=16, slow=6.0, seed=0):
"""Windowed FIFO. N = generation queue length in flight (slots). The trainer takes completed
trajectories B at a time, only among the first W not-yet-used tasks in queue order. W=B: strict FIFO, W=N: greedy."""
rng = np.random.default_rng(seed)
hard = rng.random(n_tasks) < 0.3
dur = np.where(hard, slow, 1.0) * np.exp(0.5 * rng.standard_normal(n_tasks) - 0.125)
end, free = np.zeros(n_tasks), np.zeros(N)
for i in range(n_tasks): # generate in queue order on free slots
s = free.argmin(); end[i] = free[s] + dur[i]; free[s] = end[i]
used, t_prev, out = np.zeros(n_tasks, bool), 0.0, []
lag = np.zeros(n_tasks) # actual batch index − batch index under FIFO
while len(out) < n_tasks // B:
cand = np.flatnonzero(~used)[:max(W, B)] # window: first W unused tasks in queue order
take = cand[np.argsort(end[cand])][:B] # greedy inside the window: earliest finished first
t_prev = max(t_prev, end[take].max())
used[take] = True
lag[take] = len(out) - take // B
out.append((t_prev, hard[take].mean()))
return np.array(out), np.abs(lag).mean()
for slow in [6.0, 2.0]:
print(f"\nhard-task length factor = {slow}")
print(" W mean batch-ready time hard share, first 1/4 batches mean |order lag|")
for W in [16, 19, 32, 64]: # 16 = strict FIFO(W=B), 19 ≈ 0.3N, 64 = greedy(W=N)
runs = [simulate(W, slow=slow, seed=s) for s in range(20)]
res = np.mean([r for r, _ in runs], axis=0)
lag = np.mean([l for _, l in runs])
q = len(res) // 4
print(f"{W:>4} {res[:, 0].mean():14.2f} {res[:q, 1].mean():22.2f} {lag:18.2f}")
print("overall hard-task share = 0.30")In this toy, increasing makes batches ready earlier on average (throughput), but the hard-task share of early batches drifts away from the overall 0.30 and trajectories are trained later than their generation order (that order lag is precisely the degree of off-policyness). With hard tasks 6× slower, (19) cuts the mean wait by about 28% versus strict FIFO while keeping the early share near 0.26, but already at (32) it collapses to 0.14. So the “near-FIFO” is sensitive to the window size relative to the batch and to the tail of the length distribution. The report only says that kept a near-FIFO distribution in its own setting, without numbers. In practice, choose by monitoring per-batch difficulty, length distributions and staleness directly.
Prefix-tree merging (§6.2.5). Multi-turn agent trajectories in one rollout group share long common prefixes. Merging them into a tree computes the shared prefix once in the forward pass, computes only the branches separately, and evaluates the loss per sample. With causal attention the shared prefix’s activations are identical however many times they are computed, so the approximation error is zero; the report cites up to 40× faster training with a matching memory reduction.
The rest of Forge. Three decoupled modules — the agent side, the training/inference side, and between them a Gateway Server and a Data Pool. The same Gateway accepts white-box agents, which register their context-management logic with the framework, and black-box agents, for which the framework only sees the request stream sent to the LLM. It is said to be validated on hundreds of agent scaffolds and thousands of tool-call formats. On the inference side, MTP is continuously co-trained with the RL policy through a top-K KL loss so that draft acceptance does not drop as the policy changes, and prefill/decode disaggregation plus a DFS-backed global KV-cache pool reduce multi-turn prefix recomputation (§6.2.6).
Results
M2.7 vs closed frontier models (Table 4). On agent benchmarks where all models share the same scaffold, the ~10B-active M2.7 scores SWE-bench Pro 56.2 (Opus 4.6 57.3), SWE-bench Multilingual 76.5, Multi-SWE-bench 52.7 (best in the table), Terminal-Bench 2.0 57.0 (GPT 5.4 75.1), BrowseComp 77.8, AIME 2026 94.2 and GPQA-Diamond 89.8. Gains over M2.5 were largest where new data domains were added: NL2Repo 26.6 → 39.8, MLE Bench Lite 51.5 → 66.6, Finance Modeling Pro 33.8 → 57.0, GDPval-AA 35.0 → 50.0. MMLU-Pro, on the other hand, fell from 85.2 to 81.8.
Self-evolution (§7.2, §8.3). M2.7 reportedly took over 30–50% of the in-house RL team’s daily iteration work — reading training-run logs and diagnosing and fixing metric anomalies — and improved an in-house programming scaffold through 100 autonomous rounds for a 30% gain on in-house evaluations. Its 66.6% medal rate on MLE Bench Lite (22 competitions, 24 hours on a single A30, mean of 3 runs) ties Gemini 3.1 Pro.
import numpy as np
def simulate(W, n_tasks=320, N=64, B=16, slow=6.0, seed=0):
"""Windowed FIFO. N = 동시에 생성 중인 큐 길이(slot 수). 학습기는 아직 안 쓴 과제 중
큐 앞쪽 W개 안에서만, 완료된 궤적을 B개씩 가져간다. W=B면 strict FIFO, W=N이면 greedy."""
rng = np.random.default_rng(seed)
hard = rng.random(n_tasks) < 0.3
dur = np.where(hard, slow, 1.0) * np.exp(0.5 * rng.standard_normal(n_tasks) - 0.125)
end, free = np.zeros(n_tasks), np.zeros(N)
for i in range(n_tasks): # 큐 순서대로 빈 slot에서 생성
s = free.argmin(); end[i] = free[s] + dur[i]; free[s] = end[i]
used, t_prev, out = np.zeros(n_tasks, bool), 0.0, []
lag = np.zeros(n_tasks) # 실제 batch 번호 − FIFO였다면의 batch 번호
while len(out) < n_tasks // B:
cand = np.flatnonzero(~used)[:max(W, B)] # window: 아직 안 쓴 과제 중 큐 앞쪽 W개
take = cand[np.argsort(end[cand])][:B] # window 안에서는 먼저 끝난 것부터 (greedy)
t_prev = max(t_prev, end[take].max())
used[take] = True
lag[take] = len(out) - take // B
out.append((t_prev, hard[take].mean()))
return np.array(out), np.abs(lag).mean()
for slow in [6.0, 2.0]:
print(f"\n어려운 과제 길이 배수 = {slow}")
print(" W 평균 batch 준비 시각 앞쪽 1/4 batch의 어려운 비율 평균 |순서 지연|")
for W in [16, 19, 32, 64]: # 16 = strict FIFO(W=B), 19 ≈ 0.3N, 64 = greedy(W=N)
runs = [simulate(W, slow=slow, seed=s) for s in range(20)]
res = np.mean([r for r, _ in runs], axis=0)
lag = np.mean([l for _, l in runs])
q = len(res) // 4
print(f"{W:>4} {res[:, 0].mean():14.2f} {res[:q, 1].mean():22.2f} {lag:18.2f}")
print("전체 어려운 과제 비율 = 0.30")이 장난감에서 를 키우면 batch가 평균적으로 일찍 준비되지만(처리량), 앞쪽 batch의 어려운 과제 비율이 전체 비율 0.30에서 멀어지고 궤적이 생성 순서보다 늦게 학습된다(순서 지연은 곧 off-policy 정도다). 어려운 과제가 6배 느린 설정에서 (19)은 strict FIFO 대비 평균 대기 시간을 약 28% 줄이면서 앞쪽 분포를 0.26으로 거의 유지하지만, (32)만 되어도 0.14로 무너진다. 즉 “near-FIFO”인 는 batch 크기 대비 window 크기와 길이 분포의 꼬리에 민감하다. 보고서는 자기 설정에서 이 FIFO에 가까운 분포를 유지했다고만 말하고 근거 수치는 내지 않는다. 실제로 쓸 때는 batch별 난이도·길이 분포와 staleness를 지표로 직접 보며 를 정해야 한다.
prefix tree merging(§6.2.5). 멀티턴 agent 궤적은 같은 rollout 그룹 안에서 긴 공통 prefix를 공유한다. 공통 prefix를 tree로 합쳐 forward에서 한 번만 계산하고, 분기 이후만 따로 계산한 뒤 손실은 샘플별로 구한다. causal attention에서 공통 prefix의 활성값은 몇 번 계산하든 같으므로 근사 오차가 0이고, 최대 40배의 학습 속도 향상과 그만큼의 메모리 절감을 보고한다.
나머지 Forge 구성. agent 쪽, 학습·추론 쪽, 그리고 그 사이의 Gateway Server와 Data Pool로 분리된 세 모듈이다. context 관리 로직을 프레임워크에 등록하는 white-box agent와, 프레임워크가 LLM에 들어간 요청 스트림 만 보는 black-box agent를 같은 Gateway로 받는다. 수백 개의 agent scaffold와 수천 가지 도구 호출 형식에서 검증했다고 한다. 추론 쪽에서는 MTP를 top-K KL 손실로 RL 정책과 계속 함께 학습해 정책이 바뀌어도 draft 수락률이 떨어지지 않게 하고, prefill/decode 분리와 DFS 기반 전역 KV cache pool로 멀티턴 prefix 재계산을 줄인다(§6.2.6).
실험 결과
M2.7 vs 폐쇄형 frontier(Table 4). 모든 모델이 같은 scaffold를 쓰는 agent 벤치에서, 약 10B 활성의 M2.7은 SWE-bench Pro 56.2(Opus 4.6 57.3), SWE-bench Multilingual 76.5, Multi-SWE-bench 52.7(표에서 최고), Terminal-Bench 2.0 57.0(GPT 5.4 75.1), BrowseComp 77.8, AIME 2026 94.2, GPQA-Diamond 89.8이다. M2.5 대비 상승은 새 데이터 영역을 넣은 곳에서 가장 컸다. NL2Repo 26.6 → 39.8, MLE Bench Lite 51.5 → 66.6, Finance Modeling Pro 33.8 → 57.0, GDPval-AA 35.0 → 50.0. 반대로 MMLU-Pro는 85.2 → 81.8로 내려갔다.
자기 진화(§7.2, §8.3). M2.7은 사내 RL 팀의 일상 반복 업무 30–50%를 맡아 학습 run의 로그를 읽고 이상 지표를 진단·수정했고, 사내 프로그래밍 scaffold를 100 round 자율 반복으로 고쳐 사내 평가에서 30% 향상을 얻었다고 한다. MLE Bench Lite(22개 대회, 단일 A30에서 24시간, 3회 평균)의 메달 비율 66.6%는 Gemini 3.1 Pro와 같다.
Where M1 stood. Among open models of mid-2025, M1-80k was strong at long context (OpenAI-MRCR 128K 73.4, LongBench-v2 61.5) and agentic tool use (TAU-bench airline 62.0), but trailed DeepSeek-R1-0528 in competition math and code (AIME 2025 76.9 vs 87.5). Finishing M1’s full RL in three weeks on 512 H800s for about US$0.53M is the practical payoff of lightning attention.
Reading critically
- The evidence for CISPO is narrow. The controlled comparison is a single setting: zero-RL from Qwen2.5-32B base, DAPO math data, AIME 2024 (M1 Figure 2). There is no comparison on agent tasks, other models or multiple seeds. And because the trust region is gone, how far the policy moves over several updates per batch depends on and the number of updates — yet neither report discloses . M1 only says it was lowered because of instability during length extension.
- “Full attention is better” also rests on one organisation’s experiments. Tables 2 and 3 do not specify which hybrid-SWA configuration (window, ratio, sink design) they show. Several variants are said to be worse, but there is a single table. MiMo-V2-Flash’s opposite conclusion is likewise one configuration. The real cost, as MiniMax admits, is full attention’s KV cache at 192K context.
- Comparison conditions. Table 4 says all models ran with the same scaffold, but GPT 5.4 used its Codex scaffold. Seven of the 23 benchmarks are in-house, and the BrowseComp family uses context management that drops all assistant replies and tool results once the context exceeds 30% of the maximum. Terminal-Bench 2.0 is not the original but the verified dataset published by zai-org (with ambiguous instructions fixed).
- Not disclosed. Pre-training data ratios; the number of RL stages, domain ratios and compute; the coefficients of the process and speed rewards and the form of ; the numbers of the interleaved-thinking ablation; the in-house definitions behind the self-evolution results.
- What M2.7 is. The report treats M2 → M2.5 → M2.7 as one architecture’s line and calls M2.7 “~10B activated”. What changed between checkpoints (beyond data — e.g. whether pre-training was redone) is not clearly separated.
Summary
- MiniMax-M1 cut the FLOPs of long generation sharply with a 7 lightning (linear) to 1 softmax hybrid, and its RL work catalogued stabilisation techniques: FP32 LM head, optimiser eps, early truncation of repetition, staged length extension.
- CISPO replaces the PPO/GRPO clip that zeroes token gradients with a clipped IS weight multiplied in as a stop-gradient. Rare fork tokens keep contributing throughout the off-policy updates, and in M1’s controlled experiment it matched DAPO in half the steps.
- M2 went back to full attention in a 229.9B/9.8B MoE. Hybrid SWA looked equal on standard benchmarks but degraded on 128K retrieval, long in-context learning and agent tasks beyond 32K. Read next to MiMo’s opposite conclusion from the same year, it shows how hard evaluating hybrid attention is.
- M2’s post-training consists of agent data built from executable workspaces with artifact-matched verification, a composite reward that even includes completion time, and multi-stage mixed-domain RL.
- Forge trades throughput against training distribution with Windowed FIFO and computes shared prefixes once with prefix-tree merging, up to 40× faster. The right window depends on the length distribution and batch size, so monitor distribution metrics directly.
M1의 위치. M1-80k는 2025년 중반 공개 모델 중 긴 문맥(OpenAI-MRCR 128K 73.4, LongBench-v2 61.5)과 agent tool use(TAU-bench airline 62.0)에서 강했지만, 수학·코드 경시에서는 DeepSeek-R1-0528에 뒤졌다(AIME 2025 76.9 vs 87.5). M1 전체 RL을 512개 H800으로 3주, 약 53만 달러에 끝냈다는 비용 보고는 lightning attention의 실질적 이득이다.
비판적으로 읽기
- CISPO의 근거는 좁다. 통제 비교는 Qwen2.5-32B base의 zero-RL, DAPO 수학 데이터, AIME 2024 하나다(M1 Figure 2). agent 과제, 다른 모델, 여러 seed에서의 비교는 없다. 또 trust region을 버렸으므로 한 batch로 여러 번 업데이트할 때 정책이 얼마나 멀리 가는지는 와 업데이트 횟수에 달려 있는데, 두 보고서 모두 값을 공개하지 않았다. M1은 길이 확장 중 불안정 때문에 이 값을 낮췄다고만 말한다.
- “full attention이 낫다”의 근거도 한 조직의 실험이다. Table 2·3은 어떤 hybrid SWA 구성(window, 비율, sink 방식)인지 특정하지 않는다. 여러 변형이 모두 나빴다고 하지만 표는 하나다. 반대 결론의 MiMo-V2-Flash도 마찬가지로 한 구성이다. 실제 비용은 MiniMax가 인정하듯 192K context에서 full attention의 KV cache다.
- 비교 조건. Table 4는 모든 모델을 같은 scaffold로 돌렸다고 하지만 GPT 5.4는 Codex scaffold다. 23개 벤치 중 7개는 사내 벤치이고, BrowseComp 계열은 문맥이 최대의 30%를 넘으면 모든 assistant 답과 도구 결과를 버리는 문맥 관리를 쓴다. Terminal-Bench 2.0은 원본이 아니라 zai-org가 공개한 verified 데이터셋(모호한 지시를 고친 판)이다.
- 공개되지 않은 것. 사전학습 데이터 비율, RL의 단계 수·도메인 비율·컴퓨트, process reward와 속도 보상의 계수와 의 형태, interleaved thinking ablation의 수치, 자기 진화 결과의 사내 평가 정의.
- M2.7의 정체. 보고서는 M2 → M2.5 → M2.7을 같은 아키텍처의 계열로 다루며 M2.7을 “약 10B 활성”이라 한다. 각 체크포인트 사이에 무엇이 바뀌었는지(데이터 외에 사전학습을 다시 했는지 등)는 명확히 구분되어 있지 않다.
정리
- MiniMax-M1은 7 lightning(linear) : 1 softmax 하이브리드로 긴 생성의 FLOPs를 크게 줄였고, 그 위의 RL에서 LM head FP32, optimizer eps, 반복 조기 종료, 단계적 길이 확장 같은 안정화 기법을 정리했다.
- CISPO는 토큰 gradient를 0으로 만드는 PPO/GRPO clip 대신 IS 가중치를 잘라 stop-gradient로 곱한다. 드문 분기 토큰이 off-policy 업데이트 내내 학습에 기여하고, M1의 통제 실험에서 DAPO 성능을 절반의 step으로 냈다.
- M2는 229.9B/9.8B MoE에서 full attention으로 돌아갔다. hybrid SWA는 표준 벤치에서는 같아 보였지만 128K 검색, 긴 in-context learning, 32K 이상 agent 과제에서 떨어졌다. 같은 해 MiMo의 반대 결론과 함께 읽으면 하이브리드 attention의 평가가 얼마나 어려운지 드러난다.
- M2의 사후학습은 실행 가능한 workspace + 산출물에 맞는 검증 신호로 만든 agent 데이터, 완료 시간까지 넣은 복합 보상, 도메인 혼합 다단계 RL로 이뤄진다.
- Forge는 Windowed FIFO로 처리량과 학습 분포 사이를 절충하고, prefix tree merging으로 공통 prefix를 한 번만 계산해 최대 40배 빨라졌다. 적절한 window는 길이 분포와 batch 크기에 따라 달라지므로 분포 지표를 직접 봐야 한다.
더 읽을거리Further reading
- MiniMax, The MiniMax-M2 Series: Mini Activations Unleashing Max Real-World Intelligence (arXiv 2605.26494, 2026) — 이 레슨의 주 보고서(v1 2026-05, v2 2026-07). 아키텍처 선택, agent 데이터, CISPO 적용, Forge, M2.7 결과.The main report for this lesson (v1 2026-05, v2 2026-07): architecture choices, agent data, CISPO in use, Forge, M2.7 results.
- MiniMax, MiniMax-M1: Scaling Test-Time Compute Efficiently with Lightning Attention (arXiv 2506.13585, 2025) — CISPO를 처음 제안한 보고서. lightning attention 하이브리드에서 RL을 키우며 겪은 정밀도·최적화 문제.The report that introduced CISPO, with the precision and optimisation problems met while scaling RL on a lightning-attention hybrid.
- MiniMax, MiniMax-01: Scaling Foundation Models with Lightning Attention (arXiv 2501.08313, 2025) — M1의 기반 모델. 7 lightning 대 1 softmax 하이브리드 설계.M1's base model; the 7 lightning to 1 softmax hybrid design.
- Qin et al., Lightning Attention-2: A Free Lunch for Handling Unlimited Sequence Lengths in Large Language Models (arXiv 2401.04658, 2024) — 블록 내부는 마스크된 attention, 블록 사이는 누적 상태로 계산하는 linear attention 구현.A linear-attention implementation that uses masked attention within blocks and an accumulated state between blocks.
- Yu et al., DAPO: An Open-Source LLM Reinforcement Learning System at Scale (arXiv 2503.14476, 2025) — Clip-Higher. CISPO가 비교 대상으로 삼은 알고리즘.Clip-Higher; the algorithm CISPO is compared against.
- Shao et al., DeepSeekMath (GRPO) (arXiv 2402.03300, 2024) — CISPO가 그대로 쓰는 group-relative advantage.The group-relative advantage that CISPO uses unchanged.
- Schulman et al., Proximal Policy Optimization Algorithms (arXiv 1707.06347, 2017) — CISPO가 바꾸는 clipped surrogate의 원형.The original clipped surrogate that CISPO modifies.