SiAPI.ai

MiniMax M4 and the Economics of a 1M-Token Context

Original reporting by Marcus Reid & Elena FisherOriginal:

Published · 5 min read

At a glance

MiniMax’s 2.74-trillion-parameter model combines sparse attention with an SSD-backed cache to cut the memory required per token. Its one-million-token context shows how serving costs, reinforcement learning and API pricing fit together.

In this article
MiniMax M4 model overview
MiniMax reports 2.74T total parameters, 660B active per token and a one-million-token context window for M4.

How M4 fits long context into memory

A long prompt leaves behind a key-value (KV) cache that the model reads as it generates new tokens. Keeping that cache in high-bandwidth memory (HBM) gets harder as the sequence grows. MiniMax used two changes to make long contexts more practical on the hardware it had available.

MSA2 uses shared KV heads and fine-grained sparse attention across all 68 attention layers. It builds a compact index of relevant blocks and predicts which ones will be needed two layers ahead. MFlashKV keeps the index and frequently used blocks in HBM during decoding. The rest can live on SSD, with lookahead reads overlapping the previous layer’s work.

MetricVersus the previous version
KV capacity per tokenOne quarter as much
Prefill throughput4.48×
Decode throughput8×
Diagram of MSA2 sparse attention and MFlashKV cache offloading
MiniMax’s architecture diagram shows how sparse attention selects blocks and how MFlashKV splits the cache between HBM and SSD.

MiniMax says the model runs on Huawei 950DT and T-Head Zhenwu M890 supernodes. The launch write-up cites a SemiAnalysis comparison at a target of 100 output tokens per second. In that setup, M4 on Huawei 950DT delivered more than three times the throughput of Kimi K3.1 on Nvidia GB300. MiniMax puts the 950DT at half the HBM and 13% of the compute of the GB300. The result compares two model-and-hardware configurations, so it is specific to that serving setup.

Why serving efficiency matters during training

Reinforcement learning (RL) and evaluation require many model runs, particularly when an agent has to take actions and wait for feedback over a long task. MiniMax estimates that RL and evaluation together account for 30–40% of its R&D compute. The team therefore designed for three things at once: portability across chip types, better utilization on each chip, and efficient inference throughout training and evaluation.

For M4, the team reports spending roughly 20% as much compute on RL as it did on pretraining. It trained 28 domain experts and merged them into one model, using CISPO to stabilize training and adding fault tolerance across the cluster, training and inference engines, and agent sandboxes. MiniMax says the strongest gains over its supervised fine-tuning baseline showed up on specialized and long-horizon tasks. The lab described a future RL budget of up to 50% of pretraining compute.

Early versions of M4 also helped prepare RL data, improve infrastructure and monitor training for later versions. MiniMax put that work at about 15% of total R&D compute and reported a score of 38.2 on Posttrain Bench v1.2. The company says it limited certain security-sensitive capabilities in the public release after internal evaluations.

Where MiniMax reports the strongest results

M4 is natively multimodal. MiniMax’s comparison places it ahead of the open-weight models listed across many of the tested tasks, including coding, domain knowledge, design and computer use. The same chart lists closed models for reference. Treat the rankings as MiniMax’s release results and compare them with the workloads you actually run.

MiniMax M4 benchmark comparison with open-weight and closed models across task families
MiniMax’s release comparison across coding, domain tasks, design and other capabilities.

What M4 built in the launch demos

MiniMax published four videos showing what the model could build with code and tools:

  • A short film assembled entirely in code, including scenes, camera movement and music.
  • A 64-second Three.js documentary that opens with 100,000 particles forming a portrait of Alan Turing.
  • An Unreal Engine 5 first-person shooter with gameplay in C++ and a street scene generated with Blender scripts.
  • A part-level CAD model of a robotic dog, with an animation that explodes and reassembles 3,097 parts.

Watch the four demo videos in MiniMax’s original announcement →

In a separate demo, MiniMax gave M4 an empty directory and 24 hours to build a desktop browser. The team reports more than 4,000 tool calls and about 120,000 lines of Rust, including a JavaScript engine built without third-party dependencies. The browser scored 100/100 on Acid3 and ran select React 18 and Redux apps in the demo. Acid3 covers a specific set of web standards, so broader compatibility requires additional testing.

Animated demo of the desktop browser MiniMax M4 built in 24 hours
The original animated demo of M4’s desktop browser project.

API pricing and availability

MiniMax listed M4 through its API, M Plan and MiniMax Code at launch. The API bills fresh input, generated output and cache reads separately.

API regionInput / 1MOutput / 1MCache read / 1M
China¥5¥20¥0.30
International$0.80$3.10$0.05

For repeated repository or document runs, cache hits can lower the cost of rereading the same context. Long generations still accrue output charges, and a one-million-token context window tells you how much can fit in a request. To estimate spend, use the cached input, fresh input and output reported by your own runs.

Original comparison of M4, DeepSeek V4 Pro, GLM-5.3 and other model prices in Chinese yuan
The original CNY price comparison uses a blended unit price. Your own ranking may change with your cache-hit rate and output volume.

What to measure on your own workload

M4’s engineering choices matter most when a model repeatedly works through large contexts or long agent runs. To compare it with your current model, run the same repository task with a cold cache and then with a warm one. Record prompt-processing time, output speed and cost per completed task. That gives you a way to judge whether the long-context gains carry over to the work you pay for.

← Back to Discover