MiniMax has released a technical report on M4, which processes text, images, and video together. For developers building long-conversation services, the key is scaling the model while reducing memory demands. Selective computation and SSD storage of conversation history target services with a 1 million-token context.

1. Separating total size from actual computation

M4 uses a mixture-of-experts architecture that activates 66 billion of its 2.74 trillion parameters per token, selecting compute modules suited to the input. The first 4 of its 68 layers are dense, performing fixed computation without expert selection. The rest each have 384 routed experts and 1 shared expert, with text tokens using the top 4 routed experts.

Images and video are processed by a vision transformer with about 631 million parameters, a neural network that turns visual information into tokens fed into the model alongside text. Compared with using one token per 14×14 pixels in each frame, the report says image tokens are reduced to one quarter and video frame-pair tokens to one eighth.

2. Attention selects the blocks it needs

MSA2 uses sparse attention, computing only selected context blocks rather than reading the entire context each time. According to the company, it reduces per-token key-value cache space for past computation results by 4x versus MSA. Each query selects 128 blocks of 16 tokens, examining 2048 tokens. Earlier block selection also overlaps storage reads with computation.

The following table shows company-reported attention kernel throughput during response generation using FP8, an 8-bit numerical format (report §3.1, Figure 6). An attention kernel is a program that performs attention operations. Each method retains its native head configuration, and indexer computation and top-block selection time are excluded.

Table: Sparse attention kernel throughput during response generation

Conditions: FP8 decoding, each method's native head configuration, based on effective attention operations, excluding indexer computation and top-block selection. MSA=1.

Unit: x

Response generation kernel throughput relative to MSAQSA: Relative throughput 0.70; GLM DSA: Relative throughput 3.88; V4-Pro CSA: Relative throughput 6.30; MSA: Relative throughput 1; MSA2: Relative throughput 8.00QSA0.70GLM DSA3.88V4-Pro CSA6.30MSA1MSA28.00
Response generation kernel throughput relative to MSA
Attention selects the blocks it needs
MethodRelative throughput
QSA0.70
GLM DSA3.88
V4-Pro CSA6.30
MSA1
MSA28.00

Under these conditions, MSA2 reached 8x MSA's throughput. The company reports gains over MSA of 3.98x in training forward passes using BF16, a 16-bit numerical format, 1.54x in backward passes, and 4.48x in FP8 input processing (report §3.1, Figure 6). Gains thus varied by task. A forward pass computes outputs from inputs, while a backward pass propagates errors in reverse.

3. Moving the cache to SSDs and separating compute stages

MFlashKV stores the full key-value history of long conversations on local or remote SSDs. High-bandwidth memory, which enables fast data access, holds compressed indexes that summarize where to look and fixed blocks of frequently accessed history. Combining a block size of 16 with a head dimension of 256 fits an 8-bit cache block into an SSD's 4KiB page.

AFD separates attention and expert computation into different device groups. It collects small batches from the preceding stage so experts can process larger batches.

Fast MegaEngine targets response speed for low request volumes by splitting computation across devices and running kernels consecutively to reduce invocation and synchronization overhead.

Softmax is a function that converts values into probability proportions. The company says reducing repeated softmax computation made the MSA2 kernel about 10% faster on a Chinese accelerator supernode implementation (report §3.3.1). This optimizes computation on selected blocks as well as the design for choosing them.

4. Performance gains trade off against system complexity

On Ascend 950DT, the company reports M4 throughput of 1589 tokens per second per chip at 100 tokens per second per user (report Figure 1(b)). The report's device comparison lists lower high-bandwidth memory capacity, bandwidth, and peak compute performance for 950DT than NVIDIA GB300. It uses this result to highlight jointly designing the model and inference system, which computes model answers, even on devices with limited memory and compute resources.

The cost of larger caches and higher throughput is the operational complexity of coordinating storage reads and work distribution across devices. Power management also matters. The company says limiting compute resources or serializing pipelines to avoid power limits increased the affected kernels' own latency by about 60–150%. This is why optimization must be judged by the full execution flow rather than the speed of individual operations.

5. Benchmark results and usage costs

The company reports that M4 led on 27 of 30 benchmarks, standardized performance tests, among the open-weight models compared in the report (Table 2). It scored 33.0 on the coding evaluation FrontierCode-AA 2.0 and 80.0 on the computer-use evaluation OSWorld v2.1.

Reasoning effort is the amount of computation used to produce an answer and has five levels. The company reports that raising it from low to max increases output tokens as well as scores, as shown below (report Figure 28).

Table: Changes in performance and output with reasoning effort

Conditions: M4, comparing low and max reasoning effort, company-reported results from Figure 28 of the report.

Units: points, x

Evaluation scores by reasoning effortCode++ (internal): low score 32.0, max score 50.3; OSWorld v2.1: low score 69.4, max score 80.0low scoremax scoreCode++ (internal)32.050.3OSWorld v2.169.480.0
Evaluation scores by reasoning effort
Benchmark results and usage costs
Evaluationlow scoremax scoreOutput token multiplier (low→max)
Code++ (internal)32.050.31.5
OSWorld v2.169.480.01.9

Note: The report's default sampling settings are temperature 1.0 and top-p 0.95. top-p selects candidates in descending probability order until their cumulative probability reaches the set threshold. M4 results in the main evaluation table, Table 2, use max reasoning effort.

Service designers can select reasoning effort based on task-specific output volume, not just the highest score.

Kernel comparisons do not measure whole-model throughput. The report lists gaps with top commercial models, practical computer-use efficiency, and the unified model's performance and token efficiency versus individual experts as limitations. At the time of receipt, the repository still listed the weights as coming soon.

The core of the M4 report is the joint design of attention, caching, and device placement to run a massive model in practice.