AI Engineer Code 2025

Minimax M2

Loading slides…

Read the talk

MiniMax M2: Training for the Environment Around the Model

Useful coding agents need more than strong benchmark scores: they must learn from developer feedback, recover from tool failures and keep working when their surrounding scaffold changes.

From a talk by Olive Song

Before you start: Familiarity with language-model tool calling and the basic idea of reinforcement learning will help you follow the training mechanisms.

Building a model developers can work with

What does a coding model need to learn to become useful inside a developer’s everyday workflow? At MiniMax, part of the answer comes from building both foundation models and the applications that use them. Olive Song, who works on reinforcement learning and model evaluation, describes a portfolio spanning text, vision-language, Hailuo video generation, speech and music generation, alongside in-house agent applications. Researchers and application developers work side by side, giving the model team firsthand feedback about what developers need.

MiniMax M2 is the open-weight model built around that feedback, with coding and workplace agentic tasks as its targets. Song emphasizes its 10 billion active parameters and cost efficiency. The active count matters: the official repository describes a mixture-of-experts model with 230 billion total parameters, so “10 billion active” does not mean a 10-billion-parameter model’s storage or memory requirements.

Slide with three columns describing approximately 10B activated parameters and open weights, agentic design for coding and workplace tasks, and fast, cost-efficient scaling.Open full source frame
MiniMax-M2’s introduction emphasizes open weights, coding and workplace tasks, and efficiency.
0:350:47
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:35 · section reference included

Scores and everyday use

A high-scoring model can still perform poorly when plugged into a particular development environment. Song presents M2 as a leading performer on intelligence and agentic benchmarks, tentatively placing it at the top of open models, but does not name scores in this discussion. Her practical concern is what happens after the benchmark: whether developers actually want the model in their workflow.

Song reports that M2 had the most downloads in its first week and reached the top three for token usage on OpenRouter. The download claim comes without a platform or comparison set; the OpenRouter statement is a historical adoption claim without a specified aggregation window. These signals motivate the rest of the presentation, which connects four characteristics to training choices: coding experience, long-horizon state tracking, generalization across agent scaffolds and multi-agent scalability.

2:092:23
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

2:09 · section reference included

Scaling environments and expert feedback

A coding agent needs practice in the languages and workflows developers actually use. MiniMax builds training environments from real internet data so that, during reinforcement learning, the model can act, observe the environment’s response and learn against verifiable coding goals. Scaling this process requires both more environments and the infrastructure to run them efficiently. The accompanying slide makes the inputs concrete: real GitHub repositories, issues and tests, supported by high-concurrency infrastructure.

Slide titled “Scaled Multilingual Environments for Data & RL” with columns for multilingual coding, 100,000+ environments using real GitHub repositories, issues and tests, and high-concurrency infrastructure.Open full source frame
Multilingual coding environments and high-concurrency infrastructure support data collection and reinforcement learning.

Song attributes M2’s full-stack, multilingual capability to this combination of data construction and reinforcement learning. But environments are only one source of feedback. MiniMax also brings in expert developers as reward models: people who help determine which problems are worth solving and what a good solution looks like.

Their involvement starts with problem definition, including bug fixing and repository refactoring. It continues through judgments about behavior: whether the model works in a way developers enjoy, find reliable and can trust. Finally, experts evaluate and reward both the process and the delivered result.

Feedback sourceWhat it contributes
Coding environmentObservable responses and verifiable goals
Expert developerTask definition, behavior judgments and deliverable evaluation

Passing a check and being a useful collaborator are distinct training targets. The expert feedback gives the training cycle a way to account for the latter. Song reports strong results across multiple languages in real use, without supplying language-specific measurements here.

3:283:38
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:28 · section reference included

Reason again after the tool responds

Long tasks introduce another requirement: the model must keep reasoning while it interacts with a complex environment. M2’s approach combines reinforcement learning with interleaved thinking. In the baseline sequence Song describes, the model receives tool information, a system prompt and a user prompt; reasons; calls one or more tools, potentially simultaneously; receives their responses; and then produces final reasoning and an answer.

That sequence is insufficient when a tool fails or returns something unexpected. Real environments are noisy and dynamic. A useful agent must inspect the feedback before deciding whether to continue with its original plan. Interleaved thinking repeats that decision inside the same user interaction:

  1. Reason about the next action and call a tool.
  2. Inspect the returned information, including errors or unexpected results.
  3. Decide whether the information is sufficient to complete the task.
  4. If it is not, choose another action or tool and repeat.

The critical step is reassessment: a tool response changes what the agent should do next.

Song describes tens to 100 tool-calling turns within a single user interaction. That is a description of the intended interaction pattern, not a measured completion rate. MiniMax’s accompanying interleaved-thinking guidance adds an integration detail: carry reasoning state forward between tool calls. Its November 2025 API examples are historical guidance, rather than verification of a current API contract.

Repeated reassessment lets an agent switch tools or decisions when a response is suboptimal. Song gives Gmail, Notion and Terminal as examples of tools that could participate in one automated workflow with minimal human intervention. Her description of initiating the work with one model call is best understood at the user-interaction level; the talk does not specify how the application orchestrates requests across the full tool loop.

5:405:59
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:40 · section reference included

A changing market as an environment

To illustrate adaptation, Song turns to a trading example inspired by the New York setting. She describes stock-market perturbations roughly in the preceding week and says M2 continued to perform stably as new information arrived. News and other trading policies appear as examples of changing environmental inputs. The illustration extends the tool-error problem: an agent may need to reconsider its actions even when its tools are working, because the world they describe has changed. No trading setup, stability metric or quantitative outcome is supplied, so the example supports the discussion of adaptation without establishing an investment-performance result.

8:318:41
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:31 · section reference included

More tools did not solve scaffold changes

MiniMax initially approached agent generalization as a tool-scaling problem. Train on enough tools—varied tools, new tools, even invented tools—and the model should learn to handle unseen ones. That worked initially. Then the team changed the agent scaffold, the surrounding system that packages prompts, tools and interactions, and the model failed to generalize. Familiarity with many tools had not made it robust to the system around them.

The broader target became adaptation across the model’s entire operational space. MiniMax’s agent-generalization account describes the same shift. In the talk, Song identifies the dimensions that the data pipeline must vary:

  • Tool information: the descriptions and interfaces the model receives.
  • System and user prompts: the instructions and requests framing the task.
  • Chat templates: the structure used to present the interaction.
  • Environments and tool responses: the conditions the agent acts in and the feedback it receives.

MiniMax designs and maintains perturbation pipelines across these inputs. The goal is to prevent successful behavior from depending on one particular presentation of the task.

Vertical pipeline of tool information, system prompt, user prompt, repeated thinking, content, tool calling and tool response blocks, ending in final thinking and final content. Pink arrows point to information, prompts and responses.Open full source frame
The perturbation pipeline marks tool information, prompts, and tool responses as intervention points.

A small Python fixture illustrates one such perturbation: preserve the user’s task while changing how the environment reports a failed command. This constructs two evaluation inputs; it does not represent an agent completing the repair.

python

from copy import deepcopy

baseline = {
    "user": "Fix the failing tests in this repository.",
    "tool": "terminal",
    "command": "pytest -q",
    "response": {
        "exit_code": 127,
        "stderr": "pytest: command not found",
    },
}

perturbed = deepcopy(baseline)
perturbed["response"] = {
    "status": "error",
    "message": "The command pytest is unavailable.",
}

cases = [baseline, perturbed]
assert cases[0]["user"] == cases[1]["user"]
assert cases[0]["response"] != cases[1]["response"]

Both responses report the same obstacle. An evaluation can then ask whether the agent recognizes it in either format and chooses an appropriate next action. This is one concrete dimension of the broader perturbation strategy, which also varies prompts, templates and environments.

9:129:24
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:12 · section reference included

Multiple copies working in parallel

The fourth characteristic is multi-agent scalability. Song connects M2’s small active parameter count and stated cost efficiency to the feasibility of running multiple copies for long tasks. In videos of MiniMax’s in-house agent application, she describes copies doing research, analyzing findings, writing a report and producing a frontend illustration. These activities can run in parallel, allowing the application to distribute work instead of assigning every step to one sequential agent. The demonstration also offers a QR code for trying the application.

10:4010:54
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

10:40 · section reference included

Memory, context and the next models

M2 brings together environments, algorithms, data, expert judgments, architecture, inference and evaluation. The training story is therefore larger than any one technique: interactive environments supply feedback, experts shape useful behavior, repeated reasoning supports long tasks, and perturbations broaden the conditions under which those behaviors work.

For M2.1 and M3, Song looks toward better coding, memory, context management, proactive workplace AI and vertical experts. MiniMax’s existing audio and video generation models also suggest possible multimodal integration. These are prospective directions in the presentation, not a list of capabilities already delivered by M2.

Two groups of colored ovals connected by a red arrow, from MiniMax-M2 to MiniMax-M2.1 and M3. Future topics include better coding, memory and context, audio, video, “Proactive?”, AI for workplace and vertical experts.Open full source frame
MiniMax’s roadmap connects M2 foundations to proposed M2.1 and M3 capabilities.

The closing invitation returns to the developer feedback loop that shaped the model. MiniMax wants to combine these resources into models the community can use, and Song asks developers to contribute feedback about that use. The commitment is both to learn from the community and to share the resulting models with it.

11:4212:06
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:42 · section reference included

Resources

From the talk

Updates since the talk

Transcript download
Full transcript

Loading transcript…