MiniMax M4

MiniMax M4: The Intelligence Frontier Under Compute Constraints

It is not down in any map; true places never are. — Herman Melville, Moby-Dick

Allow us to introduce MiniMax M4. Natively multimodal with 2.74 trillion total parameters, 66 billion active parameters per token, and a 1-million-token context window, it is the most intelligent model we have ever trained. Across most tasks we observed—including coding, domain knowledge, RSI, chip design, finance and business, design (3D modeling, gaming, and video production), and computer use—M4 stands at the intelligence frontier of both Chinese and open-source models.

MiniMax M4 benchmark overview
MiniMax M4 benchmark results and notes

Maximizing Compute

Scaling up model size unlocks the ability to solve more complex, frontier-level problems, yet persistent compute constraints make training ultra-large models extra difficult.

Through innovations across model architecture, training algorithms, and infrastructure, we have charted a technical path that continuously scales reinforcement learning while making full use of diverse chip ecosystems.

We followed three core design principles:

  1. Enable the model to run efficiently across different chip families, maximizing our cumulative available compute;
  2. Push compute utilization across heterogeneous chips to the limit through hardware-software co-design;
  3. Inference efficiency and training efficiency are equally important, because reinforcement learning and evaluation account for 30–40% of total R&D compute.

Across most stages of M4's development—including pre-training, reinforcement learning, and inference—we hit the power wall on multiple chip platforms.

MSA2 & MFlashKV: Reducing Reliance on HBM Capacity to Maximize Compute Efficiency

HBM capacity limits have been a primary constraint on fully utilizing compute during our R&D—especially as context lengths continue to grow and given the relatively limited HBM resources available domestically. While maintaining training stability, we iterated towards a design that dramatically reduces per-token HBM requirements. We're proud to introduce our new attention mechanism MSA2 and its companion system MFlashKV.

All 68 attention layers of M4 adopt our newly proposed sparse attention mechanism, MSA2 (MiniMax Sparse Attention 2). Through KV-sharing Multi-Query Attention, fine-grained block-sparse attention, compressed multi-head indexing, and two-layer lookahead index prediction, per-token KV cache requirements are reduced by 4× compared with the previous version, while prefilling and decoding throughput increase by 4.48× and 8×, respectively.

We designed MFlashKV to work alongside MSA2. During actual decoding, we offload the vast majority of the KV cache to SSDs, keeping only hot blocks and indices in HBM. For KV cache blocks that must be read from SSD in real time, our lookahead mechanism completely hides index computation and loading behind the computation of the preceding layer. This enables us to substantially reduce HBM usage during decoding without introducing additional overhead.

Through these designs, M4 makes full use of domestic chips, including Huawei's 950DT and T-Head's Zhenwu M890 SuperNode.

M4 throughput on Huawei 950DT vs NVIDIA GB300

At an output speed of 100 TPS, M4 deployed on Huawei's 950DT delivers 3× the throughput of Kimi K3.1 deployed on NVIDIA's most advanced GB300 (Kimi benchmark data cited from SemiAnalysis), even though the 950DT has only 50% of the GB300's HBM capacity and 13% of its compute. This throughput advantage enabled by our model architecture allows us to advance reinforcement learning post-training at massive scale and low cost.

RL Infrastructure & Algorithms

To scale model capabilities and generalization across open-world and real-world tasks, we spent the equivalent of 20% of pre-training compute on M4's reinforcement learning. At this scale, stability, efficiency, and correctness simultaneously become the core priorities of both infrastructure and algorithm design. To achieve this, we built fault tolerance across our training/inference engines, compute clusters, and agent sandboxes, ensuring that single-point failures across million-scale sandboxes, heterogeneous multi-chip deployments, and ultra-long-horizon tasks no longer interrupt training. At the same time, we co-optimized the underlying training/inference engines and RL scheduling, bringing overall RL efficiency to the forefront of the industry.

On the algorithmic side, we continued using our previously introduced CISPO algorithm to ensure stability and correctness during large-scale training. We trained specialist models across 28 distinct domains and ultimately merged them into a single unified model. Compared with the SFT baseline, reinforcement learning substantially raised the upper bound of model performance, with particularly pronounced gains in specialized domains and long-horizon tasks. We also observed that model capabilities continue to grow as RL compute scales. In future versions, we plan to increase RL's share of compute further to 50%.

Across specialized domains, we invited many domain experts to join model development, in some cases directly leading the training of specialist models.

During M4's development, hallmark capabilities representative of leading overseas frontier models also began emerging within MiniMax:

  1. RSI (Recursive Self-Improvement): Pre-training and mid-training for M4 were completed 50 days ago; since then, our R&D efforts have focused on post-training for the current M4 release, online serving and inference systems, and pre-training and mid-training for subsequent versions. Throughout this process, early versions of M4 have played a vital role—directly participating in RL data construction and continuous iteration, RFT, infrastructure optimization, training monitoring and analysis, and other R&D workflows. Across M4's post-training R&D, compute used to leverage early versions of M4 to drive both its own iteration and that of future models accounted for roughly 15% of total R&D compute, and this proportion continues to rise. On Posttrain Bench v1.2, which evaluates post-training capabilities, M4 scores 38.2, steadily approaching the level of proprietary frontier models. We are beginning to see improvements in model capability not only elevate the model's own performance, but also translate into productivity for building the next generation—gradually forming a virtuous cycle between model capability and R&D efficiency.
  2. Security: During M4's development, we observed the following capabilities: first, breaking multiple peer-reviewed modern cryptographic schemes with no previously published attacks; second, going beyond known vulnerabilities during reinforcement learning and evaluation to uncover a large number of previously unknown high-severity vulnerabilities in production-grade open-source codebases; and third, chaining multiple vulnerabilities to escape sandboxes, obtain host privileges, and launch attacks against company infrastructure, all of which prompted us to harden our own infrastructure. Given the potential risks of these capabilities, we have attenuated certain cybersecurity capabilities in the publicly released general-purpose version, and will separately offer a dedicated Cyber edition to compliant security research institutions.

To learn more about the technical details of M4, please read our technical report: https://github.com/MiniMax-AI/MiniMax-M4

Pricing

Backed by these architectural advantages, we offer the most competitive pricing among flagship models, paired with the fastest possible inference speed at this price level.

API pricing is $0.80 per million input tokens, $3.10 per million output tokens, and $0.05 per million cached input tokens.

Model Pricing (USD)

Available via:

Individual developers can enjoy multiple times the usage on the same budget with M Plan, plus a limited-time 2× off-peak night bonus in MiniMax Code—with no 5-hour usage cap on the new model or new tiers. Coding, office productivity, and creation, all in one place.

Showcase

Systems-Level Software Engineering

Modern web browsers are among the most complex systems in software engineering. We gave M4 a 24-hour engineering window and an empty directory, and asked it to build a graphical desktop browser from scratch without Chromium, WebKit, Gecko, V8, or any other existing engine.

Over more than 4,000 tool calls, M4 coded continuously and debugged against its own rendered output, writing 120,000 lines of pure Rust. It independently implemented HTML5 parsing, CSS3 Flexbox and Grid layout, SVG and Canvas rendering, and a native desktop UI. Its zero-dependency JavaScript engine alone spans 32,000 lines and supports core language features through ES2022. The resulting browser scores 100/100 on the Acid3 compatibility test, renders mainstream websites accurately, and runs dynamic web apps built with modern front-end frameworks such as React 18 and Redux.

M4 building a graphical desktop browser from scratch

Code to Everything

Give M4 an idea, and it can use code to produce animations, 3D models, playable games, and production-ready websites. Driving Blender, CAD software, Three.js, and WebGL, it brings concept art, 3D assets, and code together into finished work. M4 can write rendering pipelines and shaders from scratch, render millions of 3D elements in the browser in real time, construct articulated assemblies through parametric modeling and kinematic simulation, and verify outputs programmatically, frame by frame, pixel by pixel.

Code to Video

M4 can produce an entire short film in code: building scenes, choreographing camera moves, generating assets and music, and rendering and compositing the final cut. Because camera paths, lighting, and pacing all live in code, every frame can be precisely controlled and refined.

Turing and the Code War

M4 built this 64-second, seven-scene short documentary entirely in code, covering visuals, camera effects, music, and sound design. For the opening shot, it choreographed 100,000 particles to converge into Alan Turing's portrait, with each particle taking on the portrait's true color and lighting as it settles.

Game Development

M4 can develop complete games in Unreal Engine 5 using C++, Python, and Blender across genres including racing, FPS, and action. It covers the full pipeline, from procedural environments, vehicle physics, gunplay, and combat systems to AI opponents and cutscenes. After each round of changes, it writes automated tests to verify gameplay feel, hit detection, and frame rate.

Wasteland Street FPS

M4 built this Unreal Engine 5 shooter from scratch, implementing movement, aiming, and gunplay in C++ while generating the entire street in Blender. To keep the facades from looking flat, it wrote a script to detect painted window textures and carve them into recessed 3D frames for realistic parallax.

3D Modeling

M4 can build precise 3D models from photographs, technical drawings, and public documents, ranging from a single screw to an entire cathedral. It scripts Blender and CAD tools for parametric modeling so parts can move and disassemble, then brings the finished models into the browser with Three.js for real-time exploration and interaction.

Trinity College Library

Working from historical photos and archival records, M4 reconstructed Dublin's Long Room as an interactive 3D space in the browser. It generated all 40 bookcase bays, the vaulted ceiling, rows of books, and 48 sculpted busts in code, with natural sunlight streaming through the windows, shifting realistically by date and time.

Interactive Websites

M4 builds immersive, interactive websites with Three.js, WebGL, and Canvas where scenes respond in real time as you scroll, click, or explore. Entirely in code, it writes GLSL shaders for light and materials, uses Gaussian splatting to render lifelike environments from millions of points, procedurally generates meadows and cities, and adds physics and character animation.

Interactive 3D Ice Expedition

M4 built this scroll-driven 3D expedition to run live in the browser with over 50,000 particles. It modeled how light filters through translucent ice, programmed fractures to branch outward wherever you strike, and simulated 160 ice shards shattering on impact.

Open Source and What's Next

Following the completion of internal and third-party safety evaluations, we will continue to open-source the model weights. We hope to complete this within the next few weeks.

We believe we are still at the starting line on the journey toward greater intelligence. Objectively, we identified many areas for significant improvement during development, and a substantial gap remains compared with the very best overseas models. We hope to bring stronger future versions to everyone even faster.

Intelligence with Everyone