← All posts

The Model That Trained Itself: 56% of Real GitHub Issues at 1/50th the Price

2026-10-23 · LLMs / agentic training (MiniMax M2.7 self-evolution)

Most "agentic" models are trained the normal way — pretrain, fine-tune, RLHF — and then taught tool use as an afterthought, the way you'd hand a carpenter a power drill and hope for the best. MiniMax took the opposite route with M2.7: they let the model act as its own critic during training, running it through 100+ autonomous optimization rounds in an internal agent harness — generate outputs, test them, find the failures, patch the weak spots, repeat. MiniMax credits that loop with handling 30–50% of the reinforcement learning workflow in the model's development.

The result, announced in Shanghai in March 2026, is a proprietary text-only model that behaves like it was trained on agentic tasks from the ground up. And the numbers are genuinely uncomfortable for the frontier labs: 56.22% on SWE-Pro — autonomously closing more than half of real GitHub issues — at $0.30 per million input tokens, against Claude Opus 4.6's $15. That's a 50x input-price gap against a model that scores lower on the same benchmark.

The ELI5 version

Imagine two ways to train a junior engineer.

The normal way: you lecture her for a year (pretraining), then give her a handbook of best practices (fine-tuning), then a mentor reviews a few of her pull requests (RLHF). She can now write code. Whether she can debug a production incident at 3 AM — read logs, try a fix, run the tests, read the failure, try again — is a separate question. That's what "agentic" adaptation usually looks like: a model that can answer questions, wearing a tool belt it never really trained with.

M2.7's way: the mentor is replaced by a second version of herself. After every task she grades her own work, figures out where it broke, and — critically — feeds that failure back into her own training, not just into her memory. A hundred rounds of that, and "read the logs, fix, test, retry" stops being a skill she was taught and starts being how she thinks. That's the difference between an agentic model and a model adapted for agents.

The self-evolution loop: generate outputs → run tools and test the work → self-critique and score failures → patch weights and reward signals, repeated for 100+ autonomous rounds. Normal post-training runs this loop once; M2.7's loop runs itself.

How it works: the loop inside the loop

The harness (described in the October review as an internal agent system called OpenClaw) treats the model as both student and grader:

  1. Generate. The model attempts real tasks — debugging sessions, metric analyses, document rewrites — with full tool access.
  2. Evaluate. It runs the tools itself: reading logs, executing code, checking whether the fix actually passed.
  3. Critique. Failures get scored and localized. This is the key step: the model isn't just collecting preference pairs for a human-written reward model. It's improving the reward signals themselves — learning to distinguish "looks right" from "actually passed the tests."
  4. Patch. Weights and reward signals get updated against the failure, not just against a static dataset. Then the loop restarts with the improved model, so each round compounds: round 40's critic is smarter than round 1's.

The notebook's toy simulation of this loop shows the characteristic shape: fast early gains, then a long plateau. The first 10 rounds do most of the work; the last 10 add almost nothing. That's also the honest limit of recursive self-improvement — it compounds until the critic can't see further than the student, at which point the loop stalls. MiniMax's "30–50% of the RL workflow" claim is really a claim about how far that plateau extends before you need human-designed objectives again.

A toy simulation of recursive self-improvement: 100 autonomous rounds drive a task score from 0.40 to a 0.62 ceiling, with fast early gains and a long plateau. MiniMax credits this mechanism with 30–50% of M2.7's RL workflow.

One design choice matters enormously: M2.7 is text-only. No vision encoder, no audio. That's a deliberate trade — 204,800 tokens of context plus automatic prompt caching (no manual cache config; the prefix is cached on first use and charged at a reduced rate after). In a 20-step agent loop with a 6K-token shared prefix, that auto-caching cuts input spend by roughly half — the October review claims 40–60% total cost reduction in production agentic workflows, and the notebook's dollar math lands at 54%. The 40–60% band only holds for long loops with big prefixes, though; a 5-step loop saves less. Caveats as always.

The numbers: what 50x buys you

The benchmark figures below come from an October 2026 review published by an API platform — platform-reported, not independently verified. Treat them as the vendor's story, not a neutral audit:

Benchmark head-to-head from the October 2026 review: SWE-Pro 56.22% vs ~50% (Opus 4.6) vs ~54% (GPT-5); Terminal Bench 2 82.4% vs 74.1% vs 79.2%; tool-calling accuracy 75.8% vs ~72% vs ~74%.

And then the price chart:

Input-token prices: M2.7 at $0.20 (API platform) / $0.30 (official) vs GPT-5 $10 and Claude Opus 4.6 $15 — 50–75x cheaper per input token. Throughput: ~100 tokens/sec on the highspeed variant, ~60 standard.

At ~8K input + 2K output tokens per agentic issue attempt, a single attempt costs $0.0048 on M2.7's official pricing vs $0.27 on Opus 4.6 — and per resolved issue (attempt cost divided by success rate) it's $0.009 vs $0.54, a 60x gap. The notebook works all of this out. If you're spending $5,000/month on frontier tokens for coding agents, the platform review's claim that M2.7 cuts it to $100–300 is directionally right, even after you discount for marketing.

The honest caveat — where M2.7 loses

Three things the headline tweets skip. First, every number above is vendor- or platform-reported; the launch claims and the October review disagree on Terminal Bench (57.0% vs 82.4%) and GDPval-AA (1,495 vs 1,342 ELO), which tells you the measurement conditions aren't controlled. Second, it's proprietary — no open weights, API-only (OpenRouter lists it at $0.30/$1.20). Third, the successor is already here: MiniMax M3.1 Flash shipped October 19, 2026 with a 1M-token context and video input. M2.7 was the proof of concept for self-evolving training; M3.1 is where the architecture goes next.

And the model has real weaknesses: text-only (no multimodal input — chain it with MiniMax's Hailuo models for vision), creative long-form writing still belongs to Opus and GPT-5, a smaller third-party ecosystem, and verbose outputs you'll want to cap with max_tokens. Users on developer forums report it needs more babysitting than Claude in editors like Cline — the tool-use is strong, the judgment on when to ask for help is weaker. A model that can code but mishandles its tools is a carpenter who can measure but can't hold a saw.

Takeaways

The companion notebook (selfevolve_minimax.ipynb) reproduces the mechanism toys: the recursive-improvement loop with its plateau, the 12-round self-critique residual-error collapse vs one-shot fine-tuning, the $0.009-vs-$0.54 per-resolved-issue cost math, and the auto-caching dollar check.

Companion notebook

selfevolve_minimax.ipynb — the runnable tutorial for this post (download, or open it in Colab/Jupyter).

← All posts