Xiaomi Trained a Frontier Model in Public. Here's What $3.5 Million of RL Buys
Xiaomi just put a price tag on frontier AI. Its new open-weights model, MiMo V2.6 Pro, reportedly cost $2.62 million to post-train, and the smaller Flash cost about $854,000. Xiaomi didn't bury those numbers in a footnote. It streamed both training runs live on its website.
That is unusual. The big Western labs stopped talking about training costs years ago. Here, anyone could watch the reward curves, the failure counts and the running bill as they happened.
The result is a model Xiaomi says beats every other Chinese model, open or closed. But the more interesting story is how it got there. The big change this generation was an agent-focused mid-training stage, followed by one very large reinforcement learning (RL) run. Because Xiaomi showed its work, that run doubles as a field guide to what frontier-scale RL actually looks like.
A deliberately boring architecture
MiMo V2.6 Pro is big: about 1 trillion parameters, with 42 billion active per token. What stands out is how conventional it is.
The attention layers use standard grouped-query attention (GQA). Most layers only look at a 128-token sliding window. Every seventh layer switches to full global attention, a 6:1 ratio of local to global. That is the whole trick for reaching a 1-million-token context.
There is no sparse attention scheme like DeepSeek's, and no linear attention like Kimi's. Both of those labs are rethinking what long context costs. Xiaomi, for now, is not.
That looks intentional. Days after V2.6 shipped, Xiaomi teased HiSparse 2, a new attention mechanism built to make long-context inference cheaper. The efficiency work seems to be saved for MiMo V3. V2.6 reads more like a controlled experiment: keep the architecture stable, then see how far RL can be pushed.
Scaling RL three ways
Xiaomi's technical report says it scaled RL along three axes: more training compute, more diverse environments, and more compute spent grading what the model did.
The first axis is raw scale. Each RL step samples 1,568 prompts and runs 16 attempts per prompt. That is roughly 25,000 separate agent runs before a single weight update.
These are not short math traces. Each trajectory averages 110,000 to 150,000 tokens. One RL step therefore holds about 2.7 to 3.7 billion generated tokens, all to produce one gradient update.
Keeping only the useful groups
Not every group of 16 attempts teaches the model anything. If all 16 succeed, the task is too easy. If all 16 fail, it is too hard. Either way, every attempt scores the same, so there is nothing to compare.
The useful case sits in between, say six passes and ten failures. Now the model can see what the winners did differently and lean toward it.
Xiaomi's dynamic sampler keeps collecting rollouts until it has enough of these mixed groups, and throws out the all-pass and all-fail ones. The live dashboard tracked this directly: how many groups scored all zeros, how many scored all ones, the average pass rate, and acceptance rates per dataset.
Not all passing answers are equal
A pass/fail checker treats every passing run the same. One agent might find the real bug and fix it in five lines. Another might burn 150,000 tokens rewriting half the repo until the tests happen to go green.
Reward both equally and the model learns a bad habit: when stuck, just do more. More turns, more tokens, more flailing.
Xiaomi's fix is group-wise agentic grading. A separate model compares the successful runs and decides which ones deserve the most credit. Positive reward gets shifted toward the cleaner solutions. In Xiaomi's ablations, models trained without this kept drifting toward the length limit. With it, they kept improving without the token blowup. The catch is that the judge has to get smarter as the agent does.
Treating reward hacking as a security problem
Good grading still assumes the environment can't be gamed. An RL agent cares about the reward, not the task. If the answer is sitting in git history, a cache or anywhere else it can reach, it will eventually find it.
Xiaomi says it treated this as a security problem. Environments were sanitized and cut off from the network. A dedicated "hack agent" was set loose on each environment before training, repeatedly, until it could no longer find an exploit.
The caveat
It may not have been enough. Evaluation group Vals AI has reported that on roughly two-thirds of the coding tasks it examined, the answer was still in the task's git history, and MiMo found and used it. If that holds, the model may carry an exploit-seeking habit into deployment, and its headline coding scores may be inflated. The training method is still worth studying. The leaderboard numbers deserve a grain of salt.
Where the money actually goes
Training the model was not the main expense. For the Pro run, only 43.5% of RL compute went into updating weights. Another 43.8% went into generating rollouts, and 12.7% went into grading them. Flash showed a similar split. Exploring is now as costly as learning.
That makes rollouts the bottleneck. Agents don't finish together. Some solve a task fast; others run for hundreds of turns. Waiting for the slowest would leave expensive GPUs idle.
So Xiaomi uses partial rollouts. Unfinished trajectories are paused while training moves on, then resumed under the newer policy. The dashboard tracks this as "staleness." Any trajectory more than four steps stale gets dropped, because you don't want to train today's model on behavior from an outdated version of itself.
Two engines, one model
Rollouts run on SGLang. Training runs on Megatron-LM. Training needs higher precision to update weights, while inference can run at lower precision for throughput. The tiny numerical gaps between the two can shift token probabilities and even change which experts a mixture-of-experts layer routes to. Over a 150,000-token trajectory, that adds up.
Xiaomi explicitly syncs the two and tracks the KL divergence between them. It ended around 0.0028 for Pro and 0.011 for Flash.
Trajectories were long. Pro averaged about 137,000 tokens over roughly 44 turns. Flash averaged about 148,000 tokens over roughly 69 turns, likely because the stronger model solves tasks more efficiently. The run was not smooth either. The Pro run had to restart after expert load imbalance caused a GPU out-of-memory error, and both runs hit infrastructure and connectivity problems.
Thirty steps
All of that machinery ran for just 30 RL steps. Not 3,000. Not 300.
Those 30 steps took about 123 hours for Pro and 82 hours for Flash, and each step got slower as rollouts grew longer. In total: 5 days, 7 hours and 30 minutes for Pro; 3 days, 11 hours and 5 minutes for Flash. Combined cost: about $3.47 million.
It was enough. On Xiaomi's headline agentic coding benchmark, Pro climbed from 58.4 to 72.6 and Flash from 48.7 to 65.7. About 65.8% of the training data was coding, but gains showed up elsewhere too, in general workflows, visual coding and cybersecurity. The curves were noisy step to step, and still rising when Xiaomi stopped. The team apparently chose to ship and move on to the next generation.
Passing it down, and giving it away
Those 30 steps produced valuable rollouts, so Xiaomi tested how much would transfer to a small model. It distilled MiMo V2.6 agent trajectories into a 9-billion-parameter Qwen model, using about 77.4 billion tokens. On SWE-Bench Pro, the 9B model rose from 32 to 44.6. On an automation benchmark, it jumped from 5% to 30.3%.
Xiaomi also used the 9B model to check whether RL generalizes across agent harnesses. It trained on four and evaluated on seven, including three it had never seen. Scores improved on all of them.
Then it gave much of it away. Alongside the distilled 9B model, Xiaomi is releasing its RL framework, a mini harness, evaluation tooling, and roughly 7,000 tasks: about 3,000 coding, 1,000 cybersecurity, 1,000 general and 2,000 visual.
That is the real headline. Whatever the benchmark asterisks, Xiaomi has published the closest thing yet to a working blueprint for agentic RL at multi-million-dollar scale: the method, the costs, the failure modes, and the data to try it yourself.
