Track VI · Frontier Tech Reports · 12/20

Xiaomi MiMo-7B — 사전학습부터 추론용으로 만든 7BXiaomi MiMo-7B — a 7B model built for reasoning from pre-training on

MiMo-7B 보고서로 "추론 잠재력은 사전학습에서 정해진다"는 주장을 pass@k로 읽고, 추론 패턴 밀도를 높인 25T 토큰 데이터 전략, MTP, 테스트 난이도 기반 부분 보상, easy-data 재샘플링, Seamless Rollout Engine을 직접 계산해 본다.Read MiMo-7B's claim that reasoning potential is set during pre-training through pass@k, and compute its 25T-token reasoning-dense data strategy, MTP, test-difficulty-driven partial rewards, easy-data re-sampling and the Seamless Rollout Engine yourself.

45 분min MiMo · Xiaomi · reasoning · pretraining data · pass@k · MTP · GRPO · code reward · dynamic sampling · RL infrastructure 먼저 볼 것:Before this: 사전학습과 스케일링 법칙Pretraining and scaling laws, RLVR과 추론 — GRPO, RLOO, Dr. GRPO, DAPO, GSPORLVR and reasoning — GRPO, RLOO, Dr. GRPO, DAPO, GSPO

In spring 2025 most open reasoning models put RL on top of bases of 32B parameters or more. Small models were usually made by distillation, and the common belief was that running RL directly on a small base makes it hard to improve math and code at the same time. Xiaomi LLM-Core’s MiMo-7B bets the other way: “the reasoning ability RL can reach is set by the base model’s potential, so that potential has to be built from pre-training onward.” That is what the “from pretraining to posttraining” in the title means.

The report is small but methodologically dense, and every later Xiaomi model (MiMo-VL, MiMo-V2-Flash, V2.6) inherits the parts built here: a reasoning-dense data pipeline, MTP, and the Seamless Rollout engine.

At a glance

ItemValue
Lab / releaseXiaomi LLM-Core, May 2025 (arXiv 2505.07608, v2 June 2025)
Size7B dense (36 layers, hidden 4,096, FFN 11,008, 32 attention heads, 8 KV groups)
Architecturedecoder-only, GQA, pre-RMSNorm, SwiGLU, RoPE + one MTP module (three at inference)
Context8K (stages 1–2) → 32K (stage 3)
Pre-training tokensabout 25T (three-stage mixture)
Post-trainingSFT on about 500K samples → GRPO-variant RL (100K math + 30K code problems)
ReleasedBase, SFT, RL-Zero, RL checkpoints (GitHub xiaomimimo/MiMo)

Source: report §2.1–2.3, §3.1–3.2.

What is new

  • Reasoning-pattern density as a first-class data objective: HTML/PDF extractors that keep equations and code, small LLM quality taggers instead of rule filters, large amounts of synthetic reasoning data, and about 10% synthetic responses in the final stage.
  • The base model is evaluated with pass@k. The headline claim is that the 7B base beats a 32B base at every k.
  • The sparse reward of code RL is fixed with a test-difficulty-driven partial reward (IOI-style scoring).
  • The late-training inefficiency of dynamic sampling is fixed with easy-data re-sampling (probability 10%).
  • Seamless Rollout Engine: continuous rollout + asynchronous rewards + FIFO early termination give 2.29× faster training and 1.96× faster validation.

Architecture

The MiMo-7B backbone is a standard decoder like Llama or Qwen. The only new part is the MTP (multi-token prediction) module. As in DeepSeek-V3, it combines the main model’s last hidden state hth_t with the embedding of the next token e(yt+1)e(y_{t+1}), feeds them to a small Transformer layer, and predicts yt+2y_{t+2} with the shared LM head.

ht′=BlockMTP(W[RMSNorm(ht); RMSNorm(e(yt+1))]),L=LNTP+λ LMTP,LMTP=−∑tlog⁡p(yt+2∣ht′).h'_t = \mathrm{Block}_{\text{MTP}}\big(W[\mathrm{RMSNorm}(h_t);\ \mathrm{RMSNorm}(e(y_{t+1}))]\big),\qquad \mathcal{L} = \mathcal{L}_{\text{NTP}} + \lambda\, \mathcal{L}_{\text{MTP}},\quad \mathcal{L}_{\text{MTP}} = -\sum_t \log p(y_{t+2}\mid h'_t).

The report makes two design decisions.

  1. Only one MTP layer during pre-training. In preliminary experiments, more layers gave no further improvement. The loss weight λ\lambda is 0.3 for the first 10.3T tokens and 0.1 afterwards.
  2. Replicate it for inference. After pre-training the MTP layer is copied twice more, and only the two new layers are fine-tuned with the main model and the first MTP layer frozen. On AIME24 the first MTP layer’s acceptance rate is about 90%, and even the third layer stays above 75%.

If we read the acceptance rates as a1,a2,a3a_1, a_2, a_3 = “probability this layer is right given all earlier drafts were right”, one verification forward pass yields 1+a1+a1a2+a1a2a31 + a_1 + a_1a_2 + a_1a_2a_3 tokens in expectation. With a=(0.9,0.8,0.75)a=(0.9, 0.8, 0.75) that is about 3.2. The report does not state exactly how it measured per-layer acceptance, so this is a rough estimate. The motivation is that long CoT has highly predictable consecutive tokens, which makes speculative decoding work especially well. The general principle of speculative decoding and MiMo-V2’s measured speed-ups are covered by the MTP figure in the MiMo-V2 lesson.

Data

Four steps to raise reasoning density

StepWhat was doneWhy
ExtractionHTML extractor specialised for equations, code blocks and forums; PDF parser improved for STEMCommonly used extractors (e.g. Trafilatura, which the report cites) lose equations and code inside web pages
DeduplicationURL + MinHash global dedup over all web dumps, finished within a dayTraining efficiency and overfitting; the distribution is re-weighted by quality scores afterwards
FilteringSmall fine-tuned LLMs as quality taggers (domain classification + multi-dimensional quality) instead of rule-based filtersHeuristic filters wrongly drop good pages that are heavy in math and code
SynthesisReasoning models generate in-depth analyses of STEM material with high reasoning depth, solutions to math and code problems, and creative-writing responsesA direct source of reasoning patterns

One observation stands out: “synthetic reasoning data can be trained for a very large number of epochs without overfitting risk” (§2.1, from preliminary experiments). It runs against the usual intuition about repeating data and matters in practice for data-poor domains, but no numbers are given.

Three-stage mixture (about 25T tokens in total)

StageMixtureContextLR / batch
Stage 1Everything except synthetic responses to reasoning queries. Low-density content (ads, news, job postings) downsampled; professional domains upsampled8,192warmup over 84B tokens → 1.07×10−41.07\times10^{-4} for 10.2T → cosine to 3×10−53\times10^{-5} over 7.5T. Batch ramps to 2,560 over 168B tokens
Stage 2Math and code data raised to about 70% of the mixture8,192constant 3×10−53\times10^{-5} (4T), batch 2,560
Stage 3Add about 10% synthetic responses to math, code and creative-writing queries32,768 (RoPE base 640,000)3×10−53\times10^{-5} for 1.5T → 1×10−51\times10^{-5} over 500B, batch 640

The optimiser is AdamW (β1=0.9\beta_1=0.9, β2=0.95\beta_2=0.95, weight decay 0.1) with gradient clipping at 1.0 (§2.3). Per-source token shares, the total amount of synthetic data and the models that generated it are not disclosed.

Measuring a base model’s “reasoning potential”

The report argues that pass@1 or average scores underestimate the ceiling a base model can reach after RL. Following Yue et al. (2025) it uses pass@k for large kk — “the fraction of problems solved at least once in kk tries” — as the measure of potential. With cc correct out of nn samples the unbiased estimator is

pass@k=Eproblems[1−(n−ck)(nk)].\text{pass@}k = \mathbb{E}_{\text{problems}}\left[1 - \frac{\binom{n-c}{k}}{\binom{n}{k}}\right].

If a problem’s success rate is pp, the expectation is 1−(1−p)k1-(1-p)^k, so even at equal pass@1 the model with fewer problems stuck at p≈0p\approx 0 wins at large kk.

2025년 봄의 공개 추론 모델 대부분은 32B 이상의 base 위에 RL을 얹었다. 작은 모델은 증류(distillation)로 만드는 것이 상식이었고, 작은 base에 직접 RL을 하면 수학과 코드를 동시에 올리기 어렵다고 여겨졌다. Xiaomi LLM-Core 팀의 MiMo-7B는 이 상식에 반대로 건다. “RL로 얻는 추론 능력은 base 모델의 잠재력이 정한다. 그러니 잠재력은 사전학습 단계부터 키워야 한다.” 보고서 제목의 “from pretraining to posttraining”이 그 뜻이다.

이 보고서는 작지만 방법론이 촘촘하고, Xiaomi의 이후 모든 모델(MiMo-VL, MiMo-V2-Flash, V2.6)이 여기서 만든 부품(추론 밀도 높은 데이터 파이프라인, MTP, Seamless Rollout)을 물려받는다.

한눈에

항목값
연구소 / 공개Xiaomi LLM-Core, 2025년 5월 (arXiv 2505.07608, v2 2025-06)
크기7B dense (36층, hidden 4,096, FFN 11,008, attention head 32, KV group 8)
아키텍처decoder-only, GQA, pre-RMSNorm, SwiGLU, RoPE + MTP 모듈 1개(추론 시 3개)
context8K(Stage 1–2) → 32K(Stage 3)
사전학습 토큰약 25T (3단계 혼합)
사후학습SFT 약 500K 샘플 → GRPO 변형 RL (수학 100K + 코드 30K 문제)
공개Base, SFT, RL-Zero, RL 체크포인트 (GitHub xiaomimimo/MiMo)

출처: 보고서 §2.1–2.3, §3.1–3.2.

무엇이 새로운가

  • 추론 패턴 밀도를 데이터의 1급 목표로 삼았다. 수식·코드를 보존하는 HTML/PDF 추출기, 규칙 필터 대신 작은 LLM 품질 태거, 대량의 합성 추론 데이터, 마지막 단계에 합성 응답 약 10%.
  • base 모델 평가를 pass@k로 한다. 7B base가 32B base보다 모든 k에서 높다는 것이 핵심 주장이다.
  • 코드 RL의 희소 보상을 테스트 난이도 기반 부분 보상(IOI 채점식)으로 푼다.
  • dynamic sampling이 후반에 비효율해지는 문제를 easy-data 재샘플링(확률 10%)으로 푼다.
  • Seamless Rollout Engine: continuous rollout + 비동기 보상 + FIFO 조기 종료로 학습 2.29배, 검증 1.96배 가속.

아키텍처

MiMo-7B 본체는 Llama·Qwen과 같은 표준 decoder다. 새로운 부분은 MTP(multi-token prediction) 모듈뿐이다. DeepSeek-V3처럼 본 모델의 마지막 hidden state hth_t와 다음 토큰의 embedding e(yt+1)e(y_{t+1})를 합쳐 작은 Transformer 층에 넣고, 같은 LM head로 yt+2y_{t+2}를 예측한다.

ht′=BlockMTP(W[RMSNorm(ht); RMSNorm(e(yt+1))]),L=LNTP+λ LMTP,LMTP=−∑tlog⁡p(yt+2∣ht′).h'_t = \mathrm{Block}_{\text{MTP}}\big(W[\mathrm{RMSNorm}(h_t);\ \mathrm{RMSNorm}(e(y_{t+1}))]\big),\qquad \mathcal{L} = \mathcal{L}_{\text{NTP}} + \lambda\, \mathcal{L}_{\text{MTP}},\quad \mathcal{L}_{\text{MTP}} = -\sum_t \log p(y_{t+2}\mid h'_t).

보고서의 설계 결정은 두 가지다.

  1. 사전학습에는 MTP 층 하나만. 예비 실험에서 여러 개를 붙여도 더 좋아지지 않았다. 손실 가중치 λ\lambda는 처음 10.3T 토큰 동안 0.3, 이후 0.1.
  2. 추론용으로는 복제해서 늘린다. 사전학습이 끝나면 MTP 층을 두 개 더 복제하고, 본 모델과 첫 MTP 층을 얼린 채 새 두 층만 미세조정한다. AIME24에서 첫 MTP 층의 수락률은 약 90%, 세 번째 층도 75% 이상이다.

수락률을 “앞 draft가 모두 맞았다는 조건에서 이 층이 맞을 확률” a1,a2,a3a_1, a_2, a_3로 읽으면, 한 번의 검증 forward로 얻는 기대 토큰 수는 1+a1+a1a2+a1a2a31 + a_1 + a_1a_2 + a_1a_2a_3다. a=(0.9,0.8,0.75)a=(0.9, 0.8, 0.75)를 넣으면 약 3.2다. 보고서가 층별 수락률을 정확히 어떤 정의로 쟀는지는 밝히지 않아 이 계산은 어림이다. 긴 CoT는 연속 토큰 사이의 예측 가능성이 높아 추측 디코딩이 특히 잘 듣는다는 것이 동기다. 추측 디코딩의 일반 원리와 MiMo-V2의 실측 speedup은 MiMo-V2 레슨의 MTP 그림에서 다룬다.

데이터

추론 밀도를 높이는 네 단계

단계무엇을 했나왜
추출수식·코드 블록·포럼에 특화한 HTML 추출기, STEM용으로 개선한 PDF 파서흔히 쓰는 추출기(보고서가 인용한 Trafilatura 등)는 웹 페이지 속 수식과 코드를 잃는다
중복 제거전체 웹 덤프에 URL + MinHash 전역 중복 제거, 하루 안에 완료학습 효율과 과적합. 이후 품질 점수로 분포를 재조정
필터링규칙 기반 필터 대신 작은 LLM을 미세조정한 품질 태거(도메인 분류 + 다차원 품질 평가)휴리스틱 필터가 수학·코드가 많은 좋은 페이지를 잘못 걸러 낸다
합성추론 깊이가 높은 STEM 자료에 대한 심층 분석, 수학·코드 문제 풀이, 창작 글쓰기 응답을 추론 모델로 생성추론 패턴의 직접 공급원

특히 눈에 띄는 관찰은 **“합성 추론 데이터는 매우 많은 epoch을 돌려도 과적합 위험이 없었다”**는 예비 실험 결과다(§2.1). 일반 데이터의 반복 학습에 대한 통념과 반대라서, 데이터가 부족한 영역에서 실무적 의미가 크다. 다만 수치 근거는 제시되지 않았다.

3단계 혼합 (총 약 25T 토큰)

단계혼합contextLR / batch
Stage 1추론 과제용 합성 응답을 뺀 전체. 광고·뉴스·채용공고처럼 지식 밀도가 낮은 것은 downsample, 전문 영역은 upsample8,19284B 토큰 warmup → 1.07×10−41.07\times10^{-4}로 10.2T → cosine으로 7.5T 동안 3×10−53\times10^{-5}. batch는 168B 토큰 동안 2,560까지
Stage 2수학·코드 관련 데이터를 혼합의 **약 70%**까지8,1923×10−53\times10^{-5} 일정 (4T), batch 2,560
Stage 3수학·코드·창작 글쓰기 질의에 대한 합성 응답 약 10% 추가32,768 (RoPE base 640,000)1.5T 동안 3×10−53\times10^{-5} → 500B 동안 1×10−51\times10^{-5}, batch 640

최적화는 AdamW(β1=0.9\beta_1=0.9, β2=0.95\beta_2=0.95, weight decay 0.1), gradient clip 1.0이다(§2.3). 출처별 토큰 비율, 합성 데이터의 총량과 생성 모델은 공개되지 않았다.

base 모델의 “추론 잠재력”을 재는 법

일반적인 pass@1이나 평균 점수는 base 모델이 RL 뒤에 도달할 수 있는 상한을 과소평가한다는 것이 보고서의 입장이다. Yue et al.(2025)을 따라 큰 kk의 pass@k, 즉 “kk번 중 한 번이라도 맞히는 문제의 비율”을 잠재력의 척도로 쓴다. nn개 샘플 중 cc개가 맞았을 때 불편 추정량은

pass@k=E문제[1−(n−ck)(nk)]\text{pass@}k = \mathbb{E}_{\text{문제}}\left[1 - \frac{\binom{n-c}{k}}{\binom{n}{k}}\right]

이다. 문제별 정답률을 pp라 하면 기대값은 1−(1−p)k1-(1-p)^k이므로, pass@1이 같아도 pp가 0에 몰린 문제가 적은 모델이 큰 kk에서 이긴다.

pass@1 A/B – pass@64 A/B – pass@1024 A/B –
Each problem has its own success rate p. Left: the distribution of p for two models (2,000 problems). Right: pass@k = E[1 − (1 − p)k]. Raising polarisation pushes p toward 0 and 1 (some problems always solved, some never). Models sharpened by RL tend to look like this. Even if A has the higher pass@1, a model like B that solves many problems occasionally overtakes it as k grows. The MiMo-7B report treats this large-k pass@k as the base model's "reasoning potential" and reports that its 7B base beats a 32B base at every k (Figure 3). 문제마다 정답률 p가 다르다. 왼쪽은 두 모델의 p 분포(문제 2,000개), 오른쪽은 pass@k = E[1 − (1 − p)k]다. 양극화를 올리면 p가 0과 1 근처로 몰린다(어떤 문제는 늘 맞히고 어떤 문제는 절대 못 푼다). RL로 날카로워진 모델이 대체로 이런 모양이다. A의 pass@1이 더 높아도, B처럼 "드물게라도 맞히는" 문제가 많은 모델은 k가 커지면 역전한다. MiMo-7B 보고서는 이 큰-k pass@k를 base 모델의 "추론 잠재력"으로 보고, 7B base가 32B base보다 모든 k에서 높다고 보고한다(Figure 3).

Figure 3 of the report shows MiMo-7B-Base’s pass@k curves above every compared model, including Qwen2.5-32B, on AIME, LiveCodeBench and others, with the gap widening as k grows. RL mostly turns “occasionally solved” problems into “often solved” ones, so the higher this metric, the more material RL has to work with.

NumPy Unbiased pass@k: the spread of success rates decides the large-k ranking
import numpy as np
from math import comb

def pass_at_k(n, c, k):
    """Chen et al. (2021) unbiased estimator: pass@k when c of n samples are correct."""
    if n - c < k:
        return 1.0
    return 1.0 - comb(n - c, k) / comb(n, k)

rng = np.random.default_rng(0)
P, n = 500, 256                            # problems, samples per problem
pA = rng.beta(0.25, 0.45, P)               # A: polarised (always or never solved)
pB = rng.beta(0.9, 2.6, P)                 # B: low but widely spread success rates
cA, cB = rng.binomial(n, pA), rng.binomial(n, pB)
print(" k   pass@k(A)  pass@k(B)")
for k in [1, 4, 16, 64, 256]:
    a = np.mean([pass_at_k(n, c, k) for c in cA])
    b = np.mean([pass_at_k(n, c, k) for c in cB])
    print(f"{k:>3}   {a:8.3f}   {b:8.3f}")
print("share of never-solved problems  A:", np.mean(cA == 0).round(3), " B:", np.mean(cB == 0).round(3))
 

A has the higher pass@1 (0.38 vs 0.26) but is overtaken from k=16 on. The difference comes from the share of never-solved problems (16% vs 2%). Choosing a base model by pass@k means looking at this tail.

Training

SFT

Open data and in-house distilled data are mixed and filtered in three steps: drop queries with a 16-gram overlap with evaluation sets, drop samples with mixed languages or incomplete responses, and keep at most eight responses per query. The result is about 500K samples, trained with a constant LR of 3×10−53\times10^{-5}, batch 128, and packing to 32,768 tokens (§3.1).

RL data

  • Math, 100K. Public data plus in-house competition problems. Proof-based and multiple-choice problems are removed with an LLM (to prevent reward hacking), and problems are kept in their original form rather than rewritten to have integer answers. After global n-gram dedup and decontamination, problems that even strong reasoning models cannot solve (too hard or wrong answers) are dropped, and problems with a pass rate above 90% over 16 rollouts of the SFT version of MiMo-7B are removed. This step removed about 50% of the problems as too easy.
  • Code, 30K. Problems without tests, problems whose reference solution fails its own tests, and problems where strong models pass no test in 16 tries are removed; so are problems the SFT model solves perfectly in all 16 rollouts. A separate online-judge environment runs hundreds of tests in parallel.
  • Rewards are rule-based accuracy only. Math-Verify for math, the test-difficulty-driven reward below for code. No format reward or length penalty.

RL algorithm: GRPO with DAPO-style modifications

Eq. 1 of the report is GRPO with token-level aggregation and asymmetric clipping. In the site’s notation:

J(θ)=E[1∑i=1G∣oi∣∑i=1G∑t=1∣oi∣min⁡(ρi,tA^i, clip⁡(ρi,t,1−εlow,1+εhigh)A^i)],A^i=ri−mean⁡(r)std⁡(r).\mathcal{J}(\theta) = \mathbb{E}\left[\frac{1}{\sum_{i=1}^{G}|o_i|}\sum_{i=1}^{G}\sum_{t=1}^{|o_i|}\min\Big(\rho_{i,t}\hat A_{i},\ \operatorname{clip}(\rho_{i,t}, 1-\varepsilon_{\text{low}}, 1+\varepsilon_{\text{high}})\hat A_{i}\Big)\right],\qquad \hat A_i = \frac{r_i - \operatorname{mean}(r)}{\operatorname{std}(r)} .

(Eq. 1 in the report writes the ratio with sequence probabilities πθ(oi∣q)/πθold(oi∣q)\pi_\theta(o_i\mid q)/\pi_{\theta_{\text{old}}}(o_i\mid q), but given the token-level sum and the citation of DAPO it is more natural to read it as the token ratio ρi,t\rho_{i,t}.) Three changes from the original GRPO:

  • No KL term. β=0\beta=0. The report finds this unlocks the policy’s potential without hurting stability.
  • Dynamic sampling. Prompts with pass rate 0 or 1 (all advantages zero) are over-sampled and dropped, so every prompt in the batch carries a useful gradient.
  • Clip-Higher. Only εhigh\varepsilon_{\text{high}} is raised, to slow entropy collapse. The value is not disclosed.

Hyperparameters: train batch 512, actor mini-batch 32, 16 gradient updates per iteration, LR 10−610^{-6}, max length 32,768, temperature and top-p 1.0 (§3.3.3). Sixteen updates on one batch mean the later updates are fairly off-policy — exactly the setting that motivated MiniMax-M1’s CISPO (MiniMax lesson).

Easy-data re-sampling. As training progresses, more problems reach a pass rate of 1 and dynamic sampling wastes rollouts discarding them. Removing such problems from the data altogether, however, made policy updates markedly unstable. So problems with pass rate 1 go into an “easy pool”, and rollouts draw from it with probability α=10%\alpha = 10\% (§3.3.2). Easy problems keep appearing in small amounts so that the policy does not forget what it already knows — a form of replay.

Deep dive 1 — test-difficulty-driven code reward

A DeepSeek-R1-style code reward is 1 only if all tests pass. On hard algorithmic problems every rollout in a group gets 0, so GRPO has no signal and dynamic sampling throws the group away. MiMo borrows from IOI scoring, where a problem is split into subtasks with partial credit. Public code problems have no subtasks, so MiMo derives difficulty from per-test pass rates.

  1. Roll out each problem several times with several models and compute each test case’s pass rate.
  2. Group tests into difficulty levels by pass rate (lower pass rate = harder). Figure 5 (left) of the report shows that pass rates are clearly stratified on real problems and that stronger models pass more.
  3. With wLw_L the score of level LL, there are two rules. For the test set TLT_L and the set pass(o)\mathrm{pass}(o) of tests passed by rollout oo,
rstrict(o)=∑LwL 1[⋃L′≤LTL′⊆pass(o)],rsoft(o)=∑LwL ∣TL∩pass(o)∣∣TL∣.r_{\text{strict}}(o) = \sum_{L} w_L\, \mathbb{1}\Big[\textstyle\bigcup_{L'\le L} T_{L'} \subseteq \mathrm{pass}(o)\Big],\qquad r_{\text{soft}}(o) = \sum_{L} w_L\, \frac{|T_L\cap \mathrm{pass}(o)|}{|T_L|} .

Strict awards a level’s score only if that level and every easier level pass completely; soft splits each level’s score across its tests and pays per passed test. The report does not disclose the number of levels, the grouping method, or the values of wLw_L. The figure and code below assume three levels with wL=1/3w_L = 1/3.

보고서 Figure 3은 AIME·LiveCodeBench 등에서 MiMo-7B-Base의 pass@k 곡선이 Qwen2.5-32B를 포함한 모든 비교 모델보다 위에 있고, k가 커질수록 격차가 벌어진다고 보고한다. RL은 대체로 “가끔 맞히던 문제를 자주 맞히게” 만드므로, 이 지표가 높을수록 RL이 끌어올릴 재료가 많다는 논리다.

NumPy pass@k 불편 추정량: 정답률 분포가 큰 k의 순위를 정한다
import numpy as np
from math import comb

def pass_at_k(n, c, k):
    """Chen et al.(2021) 불편 추정량: n개 샘플 중 c개 정답일 때 pass@k."""
    if n - c < k:
        return 1.0
    return 1.0 - comb(n - c, k) / comb(n, k)

rng = np.random.default_rng(0)
P, n = 500, 256                            # 문제 수, 문제당 샘플
pA = rng.beta(0.25, 0.45, P)               # A: 양극화 (늘 맞히거나 절대 못 맞힘)
pB = rng.beta(0.9, 2.6, P)                 # B: 낮지만 넓게 퍼진 정답률
cA, cB = rng.binomial(n, pA), rng.binomial(n, pB)
print(" k   pass@k(A)  pass@k(B)")
for k in [1, 4, 16, 64, 256]:
    a = np.mean([pass_at_k(n, c, k) for c in cA])
    b = np.mean([pass_at_k(n, c, k) for c in cB])
    print(f"{k:>3}   {a:8.3f}   {b:8.3f}")
print("한 번도 못 푼 문제 비율  A:", np.mean(cA == 0).round(3), " B:", np.mean(cB == 0).round(3))
 

A는 pass@1이 0.38로 B(0.26)보다 높지만 k=16부터 역전된다. 차이는 “한 번도 못 푼 문제”의 비율(16% vs 2%)에서 나온다. pass@k로 base 모델을 고르면 이 꼬리를 보는 셈이다.

학습

SFT (지도 미세조정)

공개 데이터와 사내 증류 데이터를 섞고 세 단계로 거른다. 평가셋과 16-gram이 겹치는 질의 제거, 언어가 섞이거나 응답이 불완전한 샘플 제거, 질의당 응답 최대 8개. 결과는 약 500K 샘플이고, LR 3×10−53\times10^{-5} 일정, batch 128, 32,768 토큰 packing으로 학습한다(§3.1).

RL 데이터

  • 수학 100K. 공개 데이터 + 자체 수집 경시 문제. 증명형·객관식은 LLM으로 거르고(보상 해킹 방지), 정수 답이 나오게 문제를 바꾸지 않고 원문을 유지한다. 전역 n-gram 중복 제거와 오염 제거 후, 강한 추론 모델도 못 푸는 문제(너무 어렵거나 답이 틀림)를 빼고, MiMo-7B SFT 버전으로 16번 풀어 통과율 90% 초과인 문제를 뺀다. 이 단계가 쉬운 문제 약 50%를 제거했다.
  • 코드 30K. 테스트가 없는 문제, 정답 코드가 테스트를 통과하지 못하는 문제, 강한 모델이 16번 시도해서 테스트를 하나도 못 통과한 문제를 빼고, SFT 모델이 16번 모두 완벽하게 푼 문제도 뺀다. 수백 개 테스트를 병렬로 돌리는 online judge 환경을 따로 만들었다.
  • 보상은 규칙 기반 정확도뿐. 수학은 Math-Verify, 코드는 아래의 테스트 난이도 기반 보상. 형식 보상이나 길이 penalty는 없다.

RL 알고리즘: GRPO + DAPO식 수정

보고서 Eq. 1은 GRPO를 토큰 단위로 집계하고 비대칭 clip을 쓴 형태다. 사이트 표기로 쓰면

J(θ)=E[1∑i=1G∣oi∣∑i=1G∑t=1∣oi∣min⁡(ρi,tA^i, clip⁡(ρi,t,1−εlow,1+εhigh)A^i)],A^i=ri−mean⁡(r)std⁡(r).\mathcal{J}(\theta) = \mathbb{E}\left[\frac{1}{\sum_{i=1}^{G}|o_i|}\sum_{i=1}^{G}\sum_{t=1}^{|o_i|}\min\Big(\rho_{i,t}\hat A_{i},\ \operatorname{clip}(\rho_{i,t}, 1-\varepsilon_{\text{low}}, 1+\varepsilon_{\text{high}})\hat A_{i}\Big)\right],\qquad \hat A_i = \frac{r_i - \operatorname{mean}(r)}{\operatorname{std}(r)} .

(보고서 Eq. 1은 비율을 시퀀스 확률 πθ(oi∣q)/πθold(oi∣q)\pi_\theta(o_i\mid q)/\pi_{\theta_{\text{old}}}(o_i\mid q)로 적었지만, 토큰 단위로 합산하는 구조와 DAPO를 인용한 맥락으로 보아 토큰 비율 ρi,t\rho_{i,t}로 읽는 것이 자연스럽다.) 원래 GRPO에서 바꾼 점은 셋이다.

  • KL 항 제거. β=0\beta=0. 학습 안정성을 해치지 않으면서 정책의 잠재력을 끌어낸다고 본다.
  • Dynamic sampling. 통과율이 0 또는 1인 프롬프트(그룹 advantage가 전부 0)는 과샘플링 후 버려 batch의 모든 프롬프트가 유효한 gradient를 갖게 한다.
  • Clip-Higher. εhigh\varepsilon_{\text{high}}만 키워 entropy 붕괴를 늦춘다. 구체 값은 공개되지 않았다.

하이퍼파라미터는 train batch 512, actor mini-batch 32, iteration당 gradient update 16회, LR 10−610^{-6}, 최대 길이 32,768, temperature·top-p 1.0이다(§3.3.3). 한 batch로 16번 업데이트하므로 뒤쪽 업데이트는 꽤 off-policy다. 이 점은 MiniMax-M1이 CISPO를 제안한 배경과 정확히 겹친다(MiniMax 레슨).

easy-data 재샘플링. 학습이 진행될수록 통과율 1인 문제가 늘어 dynamic sampling이 이들을 버리느라 rollout이 낭비된다. 그렇다고 이런 문제를 데이터에서 완전히 지우면 정책 업데이트가 크게 불안정해졌다고 한다. 그래서 통과율 1인 문제를 “easy pool”에 모아 두고, rollout 때 확률 α=10%\alpha = 10\%로 easy pool에서 문제를 뽑는다(§3.3.2). 쉬운 문제가 계속 조금씩 섞여 정책이 이미 아는 것을 잊지 않게 하는 일종의 replay다.

핵심 method 깊게 보기 1 — 테스트 난이도 기반 코드 보상

DeepSeek-R1식 코드 보상은 모든 테스트를 통과해야 1이다. 어려운 알고리즘 문제에서는 한 그룹의 rollout이 전부 0을 받아 GRPO 신호가 없고, dynamic sampling이 그 그룹을 버리니 데이터만 낭비된다. MiMo는 IOI 채점 방식에서 아이디어를 가져온다. IOI는 문제를 subtask로 나눠 부분 점수를 준다. 공개 코드 문제에는 subtask가 없으니 테스트별 통과율로 난이도를 만든다.

  1. 여러 모델로 문제마다 여러 번 rollout해서 테스트 케이스별 통과율을 구한다.
  2. 통과율로 테스트를 난이도 수준으로 묶는다(통과율이 낮을수록 어렵다). 보고서 Figure 5 왼쪽은 실제 문제에서 통과율이 뚜렷이 층을 이루고, 강한 모델일수록 통과율이 높다는 것을 보여 준다.
  3. 수준 LL의 점수를 wLw_L이라 하면 두 가지 규칙이 있다. 테스트 집합 TLT_L, rollout oo가 통과한 테스트 집합 pass(o)\mathrm{pass}(o)에 대해
rstrict(o)=∑LwL 1[⋃L′≤LTL′⊆pass(o)],rsoft(o)=∑LwL ∣TL∩pass(o)∣∣TL∣.r_{\text{strict}}(o) = \sum_{L} w_L\, \mathbb{1}\Big[\textstyle\bigcup_{L'\le L} T_{L'} \subseteq \mathrm{pass}(o)\Big],\qquad r_{\text{soft}}(o) = \sum_{L} w_L\, \frac{|T_L\cap \mathrm{pass}(o)|}{|T_L|} .

strict는 “이 수준과 그보다 쉬운 모든 수준을 다 통과해야” 그 수준 점수를 받고, soft는 수준 점수를 테스트 수로 나눠 통과한 테스트마다 준다. 보고서는 수준 개수, 묶는 방법, wLw_L의 값을 밝히지 않았다. 아래 그림과 코드는 3수준, wL=1/3w_L = 1/3을 가정한다.

그룹 보상 stdgroup reward std — binary – strict – soft – 신호 없는 그룹 확률(θ)P(no-signal group | θ) binary/strict/soft –
Left: 8 rollouts (rows) × 12 tests (columns) for one problem. Using pass rates across several models, the tests are grouped into 5 easy · 4 medium · 3 hard levels (green = pass). The three columns on the right are each rollout's reward. binary is 1 only if every test passes; strict awards a level's score only when that level and all easier levels pass; soft splits each level's score across its tests and pays per passed test (level scores assumed 1/3 each). Lower θ and almost every binary group is all zeros, so GRPO gets no signal, while strict and soft keep a signal through partial credit. The curve on the right is, per θ, the probability that all 8 rewards in a group are equal (300 simulations). 왼쪽은 한 문제에 대한 rollout 8개(행) × 테스트 12개(열)다. 테스트는 여러 모델의 통과율로 쉬움 5 · 중간 4 · 어려움 3개 수준으로 묶여 있다(초록 = 통과). 오른쪽 세 칸은 rollout별 보상이다. binary는 전부 통과해야 1, strict는 "그 수준과 그보다 쉬운 수준을 모두 통과"할 때 그 수준의 점수를, soft는 수준 점수를 테스트 수로 나눠 통과한 테스트마다 준다(수준 점수는 각 1/3로 가정). θ를 낮추면 binary는 거의 모든 그룹이 전부 0이라 GRPO 신호가 사라지지만 strict·soft는 부분 점수로 신호를 남긴다. 오른쪽 곡선은 θ별 "그룹 8개의 보상이 모두 같을" 확률이다(시뮬레이션 300회).
NumPy Building test-difficulty levels and strict/soft rewards
import numpy as np
rng = np.random.default_rng(1)

# 12 tests of one problem. The true difficulty b_j is unknown -> estimate it from rollout pass rates of several models.
b = np.array([-1.6, -1.2, -0.9, -0.6, -0.3, 0.6, 0.9, 1.2, 1.5, 2.3, 2.7, 3.1])
def run_tests(theta, n):
    u = theta + rng.standard_normal((n, 1))                  # per-rollout "skill"
    return (u + 0.35 * rng.standard_normal((n, len(b))) > b).astype(int)

# (1) 3 models x 64 rollouts -> per-test pass rate -> 3 levels (grouping by quantiles: an assumption)
rate = np.vstack([run_tests(th, 64) for th in [0.0, 1.0, 2.0]]).mean(0)
cuts = np.quantile(rate, [2 / 3, 1 / 3])
level = np.where(rate >= cuts[0], 0, np.where(rate >= cuts[1], 1, 2))
print("test pass rates:", rate.round(2))
print("difficulty level:", level, "(0 = easy)")

def rewards(t, level, w=(1/3, 1/3, 1/3)):
    binary = float(t.all())
    strict, ok = 0.0, True
    for L in range(3):                                      # this level + all easier levels must pass
        ok = ok and t[level == L].all()
        strict += w[L] if ok else 0.0
    soft = sum(w[L] * t[level == L].mean() for L in range(3))
    return binary, strict, soft

# (2) probability that all G=8 rewards in a group are equal (= zero GRPO signal), per policy skill θ
G, sims = 8, 200
print("\n  θ    P(no signal): binary  strict  soft")
for th in [-1.0, 0.0, 1.0, 2.0, 3.0]:
    zero = np.zeros(3)
    for _ in range(sims):
        R = np.array([rewards(t, level) for t in run_tests(th, G)])
        zero += R.std(0) < 1e-12
    print(f"{th:5.1f}               {zero[0]/sims:5.2f}   {zero[1]/sims:5.2f}  {zero[2]/sims:5.2f}")

# (3) cost of dynamic sampling: expected number of groups needed for one valid group
for p in [0.05, 0.5, 0.9, 0.97]:
    valid = 1 - p**G - (1 - p)**G
    print(f"success rate p={p:4.2f}: P(valid group)={valid:.3f} -> {1/valid:4.1f} groups")
 

When the policy is weak (θ ≤ 1), 87–100% of groups carry no signal under the binary reward and are discarded, versus 1–7% under strict and almost 0% under soft. Part (3) puts a number on the motivation for easy-data re-sampling: once a problem’s success rate reaches 0.97, it takes 4.6 groups on average to get a single valid one.

According to Figure 5 (right) of the report, both schemes beat the baseline (1 only if all tests pass) on LiveCodeBench. The numbers are only shown as a plot, so we do not copy them here, and the text does not say which of the two schemes was used for the final run.

확인 문제Check yourself

Under the strict rule, a rollout fails one easy-level test but passes every medium and hard test. What is its reward?

Strict awards level LL only if every level up to LL passes completely. Failing any easy test means no level is awarded, so the reward is 0. Under soft it would get 13⋅45\frac{1}{3}\cdot\frac{4}{5} from the easy level plus 13\frac{1}{3} from each of the other two, about 0.93. Strict prioritises “get the easy things right first”; soft prioritises a dense signal.

Deep dive 2 — the Seamless Rollout Engine

In synchronous RL built on verl, skewed response lengths leave most GPUs idle while a few long rollouts finish. Dynamic sampling makes this worse: if there are too few valid groups another round must run, and surplus valid groups are thrown away. Many solutions move to asynchronous training, but that changes the algorithm and introduces staleness for long responses. MiMo keeps the algorithm synchronous and changes only rollout scheduling (§3.4.1).

  • Continuous rollout. Removes the barrier between generation and reward phases. Finished workers are detected immediately, their rewards computed, and using the valid-sample count so far and this step’s pass-rate statistics the engine predicts whether the in-flight tasks will be enough, launching new rollouts if not.
  • Asynchronous reward computation. Code judging is heavy, so rewards are computed asynchronously with Ray on dedicated code-judging servers.
  • FIFO early termination. Once enough valid samples exist the in-flight tasks are cut, but cutting blindly would systematically drop long responses and bias the training distribution toward short ones. So the remaining tasks are aborted only when every task started before the selected samples has finished.
NumPy 테스트 난이도 수준 만들기와 strict/soft 보상
import numpy as np
rng = np.random.default_rng(1)

# 한 문제의 테스트 12개. 실제 난이도 b_j는 모른다 → 여러 모델의 rollout 통과율로 추정.
b = np.array([-1.6, -1.2, -0.9, -0.6, -0.3, 0.6, 0.9, 1.2, 1.5, 2.3, 2.7, 3.1])
def run_tests(theta, n):
    u = theta + rng.standard_normal((n, 1))                  # rollout별 "실력"
    return (u + 0.35 * rng.standard_normal((n, len(b))) > b).astype(int)

# (1) 세 모델 × 64 rollout → 테스트별 통과율 → 3개 수준 (분위수로 묶기: 가정)
rate = np.vstack([run_tests(th, 64) for th in [0.0, 1.0, 2.0]]).mean(0)
cuts = np.quantile(rate, [2 / 3, 1 / 3])
level = np.where(rate >= cuts[0], 0, np.where(rate >= cuts[1], 1, 2))
print("테스트 통과율:", rate.round(2))
print("난이도 수준  :", level, "(0 = 쉬움)")

def rewards(t, level, w=(1/3, 1/3, 1/3)):
    binary = float(t.all())
    strict, ok = 0.0, True
    for L in range(3):                                      # 이 수준 + 더 쉬운 수준 모두 통과
        ok = ok and t[level == L].all()
        strict += w[L] if ok else 0.0
    soft = sum(w[L] * t[level == L].mean() for L in range(3))
    return binary, strict, soft

# (2) 정책 실력 θ별로 G=8 그룹의 보상이 모두 같을(=GRPO 신호 0) 확률
G, sims = 8, 200
print("\n  θ    P(신호 없음): binary  strict  soft")
for th in [-1.0, 0.0, 1.0, 2.0, 3.0]:
    zero = np.zeros(3)
    for _ in range(sims):
        R = np.array([rewards(t, level) for t in run_tests(th, G)])
        zero += R.std(0) < 1e-12
    print(f"{th:5.1f}               {zero[0]/sims:5.2f}   {zero[1]/sims:5.2f}  {zero[2]/sims:5.2f}")

# (3) dynamic sampling의 비용: 유효 그룹 하나를 얻는 데 필요한 기대 그룹 수
for p in [0.05, 0.5, 0.9, 0.97]:
    valid = 1 - p**G - (1 - p)**G
    print(f"정답률 p={p:4.2f}: P(유효 그룹)={valid:.3f} → 그룹 {1/valid:4.1f}개")
 

정책이 약한 구간(θ ≤ 1)에서 binary 보상은 그룹의 87–100%가 신호 없이 버려지지만, strict는 1–7%, soft는 거의 0%다. (3)은 easy-data 재샘플링의 동기를 숫자로 보여 준다. 정답률이 0.97까지 오른 문제는 유효 그룹 하나를 얻으려면 그룹을 4.6개 뽑아야 한다.

보고서 Figure 5 오른쪽에 따르면 두 방식 모두 baseline(전부 통과해야 1)보다 LiveCodeBench 성능이 높았다. 수치는 그림으로만 제시되어 여기 옮기지 않는다. 두 방식 중 무엇을 최종 학습에 썼는지도 본문에 명시되지 않았다.

확인 문제Check yourself

strict 규칙에서 쉬운 수준 테스트 하나를 실패했지만 중간·어려운 수준 테스트는 모두 통과한 rollout의 보상은?

strict는 수준 LL의 점수를 받으려면 LL 이하의 모든 수준을 다 통과해야 한다. 가장 쉬운 수준을 하나라도 실패하면 어떤 수준의 점수도 받지 못해 0이다. soft라면 쉬운 수준에서 13⋅45\frac{1}{3}\cdot\frac{4}{5}, 나머지 두 수준에서 13\frac{1}{3}씩 받아 약 0.93이다. strict는 “쉬운 것을 먼저 제대로”라는 순서를, soft는 촘촘한 신호를 우선한다.

핵심 method 깊게 보기 2 — Seamless Rollout Engine

verl 기반 동기식 RL에서는 응답 길이의 치우침 때문에 대부분의 GPU가 긴 rollout 몇 개를 기다리며 논다. dynamic sampling은 이를 악화시킨다. 유효 그룹이 모자라면 라운드를 다시 돌려야 하고, 남는 유효 그룹은 버려진다. 많은 해법이 비동기 학습으로 가지만 그러면 알고리즘이 바뀌고 긴 응답에 staleness가 생긴다. MiMo는 알고리즘은 동기식 그대로 두고 rollout 스케줄링만 바꾼다(§3.4.1).

  • Continuous rollout. 생성과 보상 단계 사이의 동기화 장벽을 없앤다. 끝난 worker를 즉시 감지해 보상을 계산하고, 지금까지의 유효 샘플 수와 이번 step의 통과율 통계로 “진행 중인 과제로 충분한가”를 예측해서 모자라면 새 rollout을 띄운다.
  • 비동기 보상 계산. 코드 채점은 무겁다. Ray로 보상 계산을 비동기로 돌리고 코드 채점 전용 서버를 따로 둔다.
  • FIFO 조기 종료. 유효 샘플이 batch만큼 모이면 진행 중인 과제를 끊는데, 무작정 끊으면 긴 응답이 체계적으로 빠져 학습 분포가 짧은 쪽으로 치우친다. 그래서 선택된 샘플보다 먼저 시작한 과제가 모두 끝났을 때만 나머지를 중단한다.
step 시간step time naive / seamless – speedup – GPU idle naive / seamless – sample waste –
Each row is one rollout worker (slot); each bar is one prompt group. ■ valid group used for training, ■ valid but surplus (wasted) group, ■ group discarded because all answers were right or all wrong; a red outline marks a group aborted by early termination. Grey bands are the time the naive scheduler waits while computing rewards sequentially. The goal is B=12 valid groups. The naive scheduler waits for the longest rollout in each round, then computes rewards, and runs another round if it is short. The seamless engine refills a slot as soon as it frees (continuous rollout), computes rewards asynchronously, and aborts the rest once B valid groups exist and every task started before them has finished (FIFO early termination). Increase σ and the long tail hurts the naive scheduler much more. 한 줄이 rollout worker(slot) 하나, 막대가 프롬프트 그룹 하나다. ■ 학습에 쓰인 유효 그룹, ■ 유효하지만 남은(낭비) 그룹, ■ 전부 정답/오답이라 버려진 그룹, 빨간 테두리는 조기 종료로 중단된 그룹이다. 회색 띠는 naive 방식이 보상을 순차 계산하며 기다리는 시간이다. 목표는 유효 그룹 B=12개. naive는 라운드마다 가장 긴 rollout을 기다린 뒤 보상을 계산하고 모자라면 다시 라운드를 돈다. seamless는 끝난 slot에 즉시 새 과제를 넣고(continuous rollout), 보상은 비동기로 계산하며, 시작 순서상 앞선 과제가 모두 끝났고 유효 그룹이 B개 모이면 나머지를 중단한다(FIFO early termination). σ를 키우면 긴 꼬리가 naive를 더 크게 망친다.

Table 2 of the report (256 H20 GPUs, a random 5-step training trace) shows what each component contributes.

MethodOverall speed-upRollout speed-upNormalised GPU idleGPU idle ratioSample waste
no dynamic sampling2.45×2.82×0.3670.8%–
naive dynamic sampling1.00×1.00×1.0069.3%22.1%
+ continuous rollout1.99×2.20×0.2538.8%13.9%
+ async reward2.09×2.34×0.2134.0%16.4%
+ early termination2.29×2.61×0.1527.7%12.9%

Turning dynamic sampling off gives higher raw throughput (2.45×), but much of that throughput is zero-gradient samples. With the 41% average pass rate in this 5-step window, naive dynamic sampling wasted 22% of samples. Validation with the same engine is 1.96× faster and its GPU idle ratio drops from 65.8% to 32.9% (Table 3). Beyond the engine, the team added MTP support to vLLM and fixed stability issues, e.g. clearing computed prefix-cache blocks on preemption to keep the KV cache consistent (§3.4.2).

This design keeps growing in later models. MiMo-V2-Flash extends it into a Data Scheduler that schedules individual sequences and adds partial rollout, and V2.6 moves to fully asynchronous partial rollout (staleness 4). MiniMax solves the same problem with Windowed FIFO, i.e. at a different trade-off point (MiniMax lesson).

PyTorch PyTorch: MiMo-7B-style GRPO loss (no KL, Clip-Higher, token-level aggregation, dynamic sampling) 로컬에서 실행run locally (pip install torch)
import torch

def mimo7b_grpo_loss(logp, old_logp, rewards, mask, G, eps_low=0.2, eps_high=0.28):
    """logp, old_logp, mask: (B*G, T). rewards: (B*G,). eps values are examples (not disclosed)."""
    r = rewards.view(-1, G)
    keep = (r.std(dim=1) > 0)                                  # dynamic sampling: drop all-0/all-1 groups
    adv = (r - r.mean(1, keepdim=True)) / (r.std(1, keepdim=True) + 1e-6)
    adv = (adv * keep[:, None]).view(-1, 1)                    # sequence advantage -> broadcast to tokens
    m = mask * keep.repeat_interleave(G)[:, None]
    ratio = torch.exp(logp - old_logp)
    surr = torch.minimum(ratio * adv, torch.clamp(ratio, 1 - eps_low, 1 + eps_high) * adv)
    return -(surr * m).sum() / m.sum().clamp_min(1)            # 1 / Σ|o_i| token-level mean, no KL term

# Real dynamic sampling does not mask these groups in the loss; it samples extra prompts to refill the batch.
 

Results

Base model (Table 1, same setup as open bases of similar size). Reasoning-type metrics lead by a wide margin — BBH 75.2 (Qwen2.5-7B 70.4), AIME 2024 32.9 (10.1), LiveCodeBench v5 32.9 (5.0) — while knowledge and Chinese metrics favour Qwen2.5-7B: MMLU 71.2 (74.2), MMLU-Pro 41.9 (45.0), C-Eval 68.7 (81.8). The numbers show that the data strategy chose reasoning density over knowledge coverage.

RL results (Table 5). RL-Zero (RL straight from the base) versus RL (RL after SFT):

BenchmarkBaseRL-ZeroSFTRL
MATH50037.493.693.095.8
AIME 202432.956.458.768.2
AIME 202524.346.344.355.4
LiveCodeBench v532.949.152.357.8
LiveCodeBench v629.142.945.549.3

RL from the base gains more, but RL from SFT reaches a higher ceiling on every benchmark. The report claims that MiMo-7B-RL-Zero, trained directly from the base, surpasses the RL training performance of a 32B base on both math and code (shown only as a plot).

보고서 Table 2(256개 H20 GPU, 무작위 5-step 학습 trace)는 각 요소의 기여를 보여 준다.

방법전체 speeduprollout speedup정규화 GPU idleGPU idle 비율sample waste
dynamic sampling 없음2.45×2.82×0.3670.8%–
naive dynamic sampling1.00×1.00×1.0069.3%22.1%
+ continuous rollout1.99×2.20×0.2538.8%13.9%
+ 비동기 보상2.09×2.34×0.2134.0%16.4%
+ early termination2.29×2.61×0.1527.7%12.9%

dynamic sampling을 아예 끄면 처리량은 더 높지만(2.45×) 그 처리량의 상당 부분이 gradient가 0인 샘플이다. 이 5-step 구간의 평균 통과율 41%에서 naive dynamic sampling의 낭비율이 22%였다. 검증은 같은 엔진으로 1.96배 빨라지고 GPU idle 비율이 65.8%에서 32.9%로 줄었다(Table 3). 엔진 외에 vLLM에 MTP 지원을 넣고, preemption 시 prefix cache의 계산된 블록을 지워 KV cache 일관성을 지키는 등 안정성 수정을 했다(§3.4.2).

이 설계는 이후 계보에서 계속 확장된다. MiMo-V2-Flash는 이를 시퀀스 단위로 스케줄하는 Data Scheduler로 키우고 partial rollout을 더했으며, V2.6은 완전 비동기 partial rollout(staleness 4)으로 넘어간다. 같은 문제를 MiniMax는 Windowed FIFO로, 즉 다른 절충점에서 푼다(MiniMax 레슨).

PyTorch PyTorch: MiMo-7B식 GRPO 손실 (KL 없음, Clip-Higher, 토큰 단위 집계, dynamic sampling) 로컬에서 실행run locally (pip install torch)
import torch

def mimo7b_grpo_loss(logp, old_logp, rewards, mask, G, eps_low=0.2, eps_high=0.28):
    """logp, old_logp, mask: (B*G, T). rewards: (B*G,). eps 값은 예시 (보고서 비공개)."""
    r = rewards.view(-1, G)
    keep = (r.std(dim=1) > 0)                                  # dynamic sampling: 0/1 그룹 제외
    adv = (r - r.mean(1, keepdim=True)) / (r.std(1, keepdim=True) + 1e-6)
    adv = (adv * keep[:, None]).view(-1, 1)                    # 시퀀스 advantage → 토큰에 broadcast
    m = mask * keep.repeat_interleave(G)[:, None]
    ratio = torch.exp(logp - old_logp)
    surr = torch.minimum(ratio * adv, torch.clamp(ratio, 1 - eps_low, 1 + eps_high) * adv)
    return -(surr * m).sum() / m.sum().clamp_min(1)            # 1 / Σ|o_i| 토큰 단위 평균, KL 항 없음

# 실제 dynamic sampling은 손실에서 마스킹하는 대신, 버린 만큼 새 프롬프트를 더 뽑아 batch 크기를 맞춘다.
 

실험 결과

Base 모델(Table 1, 비슷한 크기 공개 base와 같은 설정). BBH 75.2(Qwen2.5-7B 70.4), AIME 2024 32.9(10.1), LiveCodeBench v5 32.9(5.0)로 추론형 지표가 크게 앞서지만, MMLU 71.2(74.2)·MMLU-Pro 41.9(45.0)·C-Eval 68.7(81.8)처럼 지식형·중국어 지표는 Qwen2.5-7B가 앞선다. 데이터 전략이 지식 커버리지보다 추론 밀도를 택했다는 것이 숫자로 드러난다.

RL 결과(Table 5). base에서 바로 RL한 RL-Zero와 SFT 뒤 RL한 RL을 비교한다.

벤치마크BaseRL-ZeroSFTRL
MATH50037.493.693.095.8
AIME 202432.956.458.768.2
AIME 202524.346.344.355.4
LiveCodeBench v532.949.152.357.8
LiveCodeBench v629.142.945.549.3

base에서의 RL이 상승 폭은 크지만, SFT에서 시작한 RL이 모든 벤치에서 상한이 더 높다. 보고서는 base에서 바로 RL한 MiMo-7B-RL-Zero가 32B base의 RL 학습 성능을 수학·코드 모두에서 넘는다고 주장한다(그림으로만 제시).

점 위에 마우스를 올리면 값이 나온다.Hover over a dot to read its value.
Switch tables and click the legend to toggle models. The large dot is this report's model. All values are copied from the report's tables (missing = not reported).표를 바꾸고 범례를 눌러 모델을 켜고 끈다. 큰 점이 이 보고서의 모델이다. 값은 모두 보고서 표에서 옮겼다(빈 값은 보고되지 않음).

Observations from the discussion section (§3.6) are valuable in practice.

  • A light SFT hurts. RL from the base first learns mostly the answer format (\boxed{}), so the team tried a light SFT that only aligns the format. It started higher but was overtaken by RL-Zero within 500 steps and ended below RL after a heavier SFT (Figure 7).
  • Math and code interfere. Late in RL from the base (steps 2000–2500) code kept improving while math oscillated and declined. The outputs showed the exploratory base model hacking the math reward, while the test-based code verifier was much harder to exploit. RL from the SFT model improved steadily in both domains.
  • A language-mixing penalty failed. Chinese in an English answer is easy to detect, but the reverse is hard because equations and code naturally contain English. The penalty induced hacks such as always answering in English regardless of the question’s language.
  • Scaling SFT and on-policy RL. In a later update, growing SFT from 500K to 6M samples improved both reasoning and general chat while keeping RL potential. Vanilla GRPO saturated early, so they switched to on-policy RL and raised the generation budget 32K → 38K → 48K; MiMo-7B-RL-0530 reached AIME 24 80.1 and AIME 25 70.2 (Table 6).

Reading critically

  • The scope of “7B beats 32B”. The base pass@k comparison (Figure 3) and the RL-Zero vs 32B RL curves are only plots; the exact comparison (which 32B base, whether the same RL recipe) and the numbers are not in a table. We have to take the plots at face value.
  • Contamination control. The report states 16-gram decontamination for SFT and global n-gram dedup plus decontamination for the RL math data. It does not report how much the large amount of synthetic reasoning data in pre-training (solutions to math and code problems) overlaps with evaluation sets. The base model’s AIME 2024 score of 32.9 (0–10 for same-size comparisons) is impressive, but it compares a model pre-trained on many reasoning-model solutions with models that were not.
  • Comparison settings. Many baseline values in Table 1 were measured with the in-house framework (asterisks). The sources of the o1-mini, GPT-4o and other values in Table 4 are not stated; MiMo’s own protocol (e.g. AIME averaged over 32 runs) is.
  • Not disclosed. Token shares per source and the total amount of synthetic data; the number of test-difficulty levels, their scores and the grouping method; which of strict and soft was finally used; the Clip-Higher ε\varepsilon; the total number of RL steps and GPU hours.
  • Sixteen off-policy updates. A batch of 512 split into mini-batches of 32 gives 16 updates, so the last mini-batch uses samples from a fairly old policy. This setting is fully exposed to clipping erasing the gradient of rare tokens (the motivation for MiniMax’s CISPO). The later switch to on-policy RL in the 0530 version may be related (the report only says “vanilla GRPO saturated early”).

Summary

  • MiMo-7B is a 7B dense model trained on 25T tokens under the hypothesis that “the ceiling of RL is set by the base model’s reasoning potential”: extraction that preserves equations and code, LLM quality taggers, synthetic reasoning data, and a three-stage mixture going to 70% math/code and then 10% synthetic responses.
  • A base model’s potential is measured with large-k pass@k. At equal pass@1, the model with fewer never-solved problems wins at large k.
  • MTP uses one layer in pre-training and three (replicated and fine-tuned) at inference; on AIME24 the first layer accepts about 90% and the third more than 75%.
  • RL is GRPO without KL plus dynamic sampling and Clip-Higher, with a code reward that groups tests into difficulty levels for partial credit and a 10% re-sampling of solved problems.
  • The Seamless Rollout Engine keeps the algorithm synchronous and uses continuous rollout, asynchronous rewards and FIFO early termination to speed up training 2.29× and validation 1.96×.
  • MiMo-7B-RL scored AIME 2025 55.4 and LiveCodeBench v6 49.3 (Table 4); the later 0530 version reached AIME 24 80.1 with on-policy RL and a longer generation budget.

논의 절(§3.6)의 관찰들은 실무적으로 값지다.

  • 가벼운 SFT는 독이다. base에서 RL하면 초반에 주로 답 형식(\boxed{})을 배우길래 형식만 맞추는 가벼운 SFT를 해 봤더니, 출발점은 높았지만 500 step 만에 RL-Zero에 추월당했고 무거운 SFT 뒤의 RL보다도 낮았다(Figure 7).
  • 수학과 코드의 간섭. base에서의 RL 후반(2000–2500 step)에 코드는 계속 오르는데 수학은 흔들리며 떨어졌다. 출력을 보니 탐색이 강한 base 모델이 수학 보상을 해킹하고 있었고, 테스트 기반인 코드 verifier는 해킹이 훨씬 어려웠다. SFT에서 시작한 RL은 두 도메인 모두 꾸준히 올랐다.
  • 언어 혼합 penalty는 실패. 영어 응답의 중국어는 쉽게 잡지만, 수식과 코드에 영어가 원래 섞여 있어 반대 방향은 잡기 어렵다. penalty가 “질문 언어와 상관없이 늘 영어로 답하기” 같은 해킹을 유발했다.
  • SFT 확장과 on-policy RL. 이후 업데이트에서 SFT를 500K → 6M으로 늘리자 추론과 일반 대화가 모두 좋아졌고 RL 잠재력도 유지됐다. vanilla GRPO는 조기에 포화되어 on-policy RL로 바꾸고 생성 길이를 32K → 38K → 48K로 늘린 MiMo-7B-RL-0530이 AIME 24 80.1, AIME 25 70.2에 도달했다(Table 6).

비판적으로 읽기

  • “7B가 32B를 넘는다”의 범위. Base pass@k 비교(Figure 3)와 RL-Zero vs 32B의 RL 곡선은 그림으로만 제시되고 정확한 비교 대상(32B base가 무엇인지, 같은 RL 레시피인지)과 수치가 본문 표에 없다. 그림을 그대로 받아들일 수밖에 없다.
  • 오염 통제. SFT는 16-gram 오염 제거를, RL 수학 데이터는 n-gram 전역 중복 제거와 오염 제거를 했다고 밝힌다. 그러나 사전학습에 들어간 대량의 합성 추론 데이터(수학·코드 문제 풀이)가 평가셋과 얼마나 겹치는지는 보고되지 않았다. base 모델의 AIME 2024 32.9(같은 크기 비교 모델은 0–10)는 인상적이지만, 사전학습에 추론 모델의 풀이를 대량으로 넣은 모델과 넣지 않은 모델의 비교라는 점을 기억해야 한다.
  • 비교 설정. Table 1의 비교 모델 값 다수는 사내 프레임워크로 쟀다(별표). Table 4의 o1-mini·GPT-4o 등은 출처 표기가 없다. AIME 32회 평균 등 MiMo 쪽 평가 프로토콜은 명시했다.
  • 공개되지 않은 것. 출처별 토큰 비율과 합성 데이터 총량, 테스트 난이도 수준의 개수·점수·묶는 방법, strict와 soft 중 최종 선택, Clip-Higher의 ε\varepsilon 값, RL 총 step 수와 GPU 시간.
  • 16번의 off-policy 업데이트. batch 512를 mini-batch 32로 나눠 16번 업데이트하므로 마지막 mini-batch는 꽤 오래된 정책의 샘플이다. clip이 희소 토큰의 gradient를 지우는 문제(MiniMax의 CISPO 동기)에 그대로 노출된 설정이다. 이후 0530 버전에서 on-policy로 바꾼 것이 이 문제와 관련 있을 수 있다(보고서는 “vanilla GRPO의 조기 포화”라고만 말한다).

정리

  • MiMo-7B는 “RL 성능의 상한은 base의 추론 잠재력이 정한다”는 가설 아래, 수식·코드를 보존하는 추출, LLM 품질 태거, 합성 추론 데이터, 수학·코드 70% → 합성 응답 10%의 3단계 혼합으로 25T 토큰을 학습한 7B dense 모델이다.
  • base 모델의 잠재력은 큰 k의 pass@k로 잰다. pass@1이 같아도 “한 번도 못 푸는 문제”가 적은 모델이 큰 k에서 이긴다.
  • MTP는 사전학습엔 1층, 추론엔 복제·미세조정한 3층으로 쓴다. AIME24에서 첫 층 수락률 약 90%, 셋째 층 75% 이상.
  • RL은 KL 없는 GRPO + dynamic sampling + Clip-Higher 위에, 테스트를 통과율로 난이도 수준에 묶어 부분 점수를 주는 코드 보상과 통과율 1 문제의 10% 재샘플링을 더했다.
  • Seamless Rollout Engine은 알고리즘을 동기식으로 둔 채 continuous rollout, 비동기 보상, FIFO 조기 종료로 학습 2.29배, 검증 1.96배 빨라졌다.
  • 결과적으로 MiMo-7B-RL은 AIME 2025 55.4, LiveCodeBench v6 49.3을 기록했고(Table 4), 이후 0530 버전은 on-policy RL과 생성 길이 확장으로 AIME 24 80.1까지 올렸다.

더 읽을거리Further reading