> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-zh/yu-yan-mo-xing/minimax-m27.md).

# MiniMax M2.7（229B MoE 编码）

{% hint style="info" %}
**状态（2026年4月）：** MiniMax M2.7 于以下时间发布到 HuggingFace： **2026年4月9日** 由 MiniMaxAI 发布，并达到了 **三周内 49.6 万次下载** ——按采用情况来看，这是我们 4 月更新中最大的开放权重发布。权重地址： [huggingface.co/MiniMaxAI/MiniMax-M2.7](https://huggingface.co/MiniMaxAI/MiniMax-M2.7) ，采用 **MiniMax 自定义许可证** (`许可证：其他`）。它是 **不** Apache/MIT — 请阅读 [LICENSE](https://huggingface.co/MiniMaxAI/MiniMax-M2.7/blob/main/LICENSE) ，再进行任何商业部署。
{% endhint %}

{% hint style="warning" %}
**更正：** 我们模型索引的早期版本曾将 M2.7 列为仅限专有 API 的模型。到 2026 年 4 月 9 日，这一说法是错误的——权重是公开的。本指南已替换该条目。
{% endhint %}

MiniMax M2.7 是一个 **2290 亿参数的混合专家模型** （256 个专家，每个 token 激活 8 个），也是 MiniMax M2 家族的最新成员——该系列围绕 **自我演化 / RL 驱动的后训练** 以及 **智能体编码** 工作负载构建。2.7 版本是 MiniMax 托管编码智能体的公开、自托管对应版本，MiniMax 将其定位为在智能体基准上可与 Claude Sonnet 4.5 竞争，并在其中一些基准上接近 Claude Opus 4.6 水平。

有趣的架构细节是 **交错思考** （在 M2.1 中引入，并在 2.5/2.7 中继续改进）：模型在多轮工具调用过程中交替进行 `<think>` 推理块和正常生成，因此思维链会在函数调用往返之间持续存在，而不会在每一轮被丢弃。这正是它对长程智能体有趣的原因——每次你碰到一个 `tool_use` 边界时，推理轨迹都不会重置。

对于 Clore.ai 用户来说，实际消息是 M2.7 官方仓库提供了一个 **FP8（float8\_e4m3fn）检查点** 。这使得单节点部署在 **4× H100 80GB** 或 **2× H200 141GB** 上成为可能——不需要 H200 octet 或 16 卡机架。如果你一直在运行 [GLM-5.1](/guides/guides_v2-zh/yu-yan-mo-xing/glm-5-1.md) ，并且想在你的智能体栈里加入第二个具有不同偏好特征的开放权重模型，那么它就是适合搭配的那个。

### 关键规格

| 属性                   | 数值                                               |
| -------------------- | ------------------------------------------------ |
| 总参数量                 | 2290 亿（MoE，256 个专家）                              |
| 每个 Token 的专家数        | 256 个中的 8 个                                      |
| 激活参数量                | **未正式公布** ——见模型卡。M2 家族历史上约为 100 亿激活参数；公开引用前请先核实。 |
| 隐藏维度 / 层数            | 3,072 / 62                                       |
| 注意力                  | 48 个头，8 个 KV（GQA）                                |
| 上下文窗口                | 204,800 个 token（20 万）                            |
| 张量类型                 | F32、BF16、F8\_E4M3                                |
| MTP                  | 已启用多 Token 预测（3 个 MTP 模块）                        |
| 许可证                  | **MiniMax 自定义——默认非商业用途**                         |
| 发布日期                 | 2026年4月9日                                        |
| HuggingFace 下载量（3 周） | 约 49.6 万                                         |
| 推荐采样                 | `temperature=1.0`, `top_p=0.95`, `top_k=40`      |
| 主要工具链                | vLLM、SGLang、Transformers、KTransformers、MLX-LM    |

### 为什么选择 MiniMax M2.7？

* **2290 亿开放权重** ——仍然能装进单个 4×H100 节点的最大“真正”开放权重编码模型，且是 FP8 版本
* **交错思考** — `<think>` 块在工具调用轮次之间会持续存在，这对 SWE 风格智能体确实很有用
* **多语言编码重点** —— MiniMax 强调 Rust、Go、Java、Kotlin、Swift 和 TypeScript 的强大表现，而不只是 Python
* **采用信号** ——三周 49.6 万次下载，是我们追踪到的 2026 年 4 月所有开放权重发布中社区接受度最高的一个
* **支持 MTP** —— 通过多 Token 预测模块内置了推测解码，可在 H100/H200 上带来实际吞吐提升
* **托管备用方案** —— 如果你的工作负载超出单节点能力，MiniMax 的托管端点可用；在架构设计阶段你无需二选一

***

## 需求

{% hint style="warning" %}
**Clore.ai 市场上未列出多 GPU 的 80GB 级机型。** 目前列出的最大配置是 4× RTX PRO 6000 Blackwell（每张 96GB，共 380GB）以及 8–11× RTX 5090（每张 32GB）。A100 / H200 / B200 容量可按 [裸机](https://clore.ai/bare-metal) 需求提供。部署前请查看 [GPU 价格与可用性](/guides/guides_v2-zh/ru-men-zhi-nan/pricing.md) 。
{% endhint %}

{% hint style="warning" %}
**2290 亿仍然是 2290 亿。** BF16 权重约为 460GB。FP8 检查点大约只有其一半——约 230GB——这就是单节点部署可行的原因。社区 INT4 量化可将其压到约 120GB 以下，但不属于官方支持。
{% endhint %}

| 组件     | 爱好者（INT4 GGUF，卸载）         | 推荐（单节点 FP8）                      | 完整 BF16                      |
| ------ | ------------------------- | -------------------------------- | ---------------------------- |
| GPU 显存 | 24–48GB GPU + 128GB+ 内存卸载 | 4× H100 80GB **或** 2× H200 141GB | 8× H100 80GB / 4× H200 141GB |
| 总显存    | 约 48GB GPU + 卸载           | 320GB / 282GB                    | 640GB / 564GB                |
| 内存     | 128GB                     | 256GB                            | 512GB                        |
| 磁盘     | 200GB NVMe                | 400GB NVMe                       | 600GB NVMe                   |
| CUDA   | 12.8+                     | 12.8+                            | 12.8+                        |

**Clore.ai 选择：** 位于 **2× H200** 上的 FP8 检查点是最干净的部署目标——张量并行切分最少、NCCL 往返更少，而且 20 万上下文的计算完全可行。 **4× H100** 如果 H200 库存紧张，这是更便宜的替代方案。

***

## 选项 A — Ollama / GGUF（量化）

{% hint style="warning" %}
**仅限社区量化版本。** MiniMax 并未为 M2.7 发布官方 GGUF 权重。社区 Q4/Q5 构建通常在发布后 1–2 周出现——请搜索 [huggingface.co/models?search=minimax-m2.7+gguf](https://huggingface.co/models?search=minimax-m2.7+gguf) 并核实上传者。MoE 量化在低于 Q4 时质量会有差异。
{% endhint %}

```bash
# 一旦有社区 Q4_K_M 构建可用（先检查 HuggingFace）
docker exec ollama ollama pull minimax-m2.7:q4_K_M
docker exec ollama ollama run minimax-m2.7:q4_K_M

# 或者直接在下载好的 GGUF 上使用 llama.cpp
docker run --gpus all -it --rm -p 8080:8080 \\
  -v $(pwd)/models:/models \\
  ghcr.io/ggerganov/llama.cpp:server-cuda \\
  -m /models/minimax-m2.7-q4_k_m.gguf \
  --n-gpu-layers 80 --ctx-size 32768 \
  --temp 1.0 --top-p 0.95 --top-k 40 \
  --port 8080 --host 0.0.0.0
```

仅供爱好者使用。真实工作负载请使用 vLLM 或 SGLang 结合 FP8 检查点。

***

## 方案 B — vLLM（生产 API，推荐）

vLLM 是首选的服务目标。官方 FP8 检查点就是应当拉取的版本——质量与 BF16 相同，但显存大约只有一半。

### docker-compose.yml — 4× H100 80GB

```yaml
version: "3.8"
services:
  vllm:
    image: vllm/vllm-openai:latest
    ports:
      - "8000:8000"
    volumes:
      - hf_cache:/root/.cache/huggingface
    command: >
      --model MiniMaxAI/MiniMax-M2.7
      --quantization fp8
      --tensor-parallel-size 4
      --max-model-len 65536
      --gpu-memory-utilization 0.88
      --enable-auto-tool-choice
      --tool-call-parser hermes
      --served-model-name minimax-m2.7
      --trust-remote-code
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    shm_size: "16gb"

volumes:
  hf_cache:
```

### docker-compose.yml — 2× H200 141GB

降到 `--tensor-parallel-size` 2，并提高 `--max-model-len` 以利用余量：

```yaml
    command: >
      --model MiniMaxAI/MiniMax-M2.7
      --quantization fp8
      --tensor-parallel-size 2
      --max-model-len 131072
      --gpu-memory-utilization 0.90
      --enable-auto-tool-choice
      --tool-call-parser hermes
      --enable-chunked-prefill
      --served-model-name minimax-m2.7
      --trust-remote-code
```

### 冒烟测试

```bash
curl http://localhost:8000/v1/chat/completions \\
  -H "Content-Type: application/json" \\
  -d '{
    "model": "minimax-m2.7",
    "messages": [
      {"role": "system", "content": "你是一名高级工程师。在跨工具调用进行推理时，请使用交错思考。"},
      {"role": "user", "content": "审计这个 Rust async 处理器的 tokio 取消安全性：..."}
    ],
    "max_tokens": 4096,
    "temperature": 1.0,
    "top_p": 0.95
  }'
```

{% hint style="info" %}
**不要把 `temperature` 降到 1.0 以下。** MiniMax 推荐的采样参数是 `T=1.0, top_p=0.95, top_k=40`。贪婪解码会悄然破坏 `<think>` 多轮工具调用中的交错。
{% endhint %}

***

## 选项 C — SGLang

SGLang 的 MoE 调度器在 Hopper 上与 vLLM 相比具有竞争力，并且由于 EAGLE 推测解码与 M2.7 的 MTP 模块叠加，在长上下文编码补全上往往更胜一筹。

```bash
docker pull lmsysorg/sglang:latest

python3 -m sglang.launch_server \\
  --model-path MiniMaxAI/MiniMax-M2.7 \
  --quantization fp8 \\
  --tp-size 4 \
  --mem-fraction-static 0.88 \
  --context-length 65536 \
  --enable-mixed-chunk \
  --speculative-algorithm EAGLE \
  --speculative-num-steps 3 \
  --speculative-eagle-topk 1 \
  --speculative-num-draft-tokens 4 \
  --served-model-name minimax-m2.7 \
  --trust-remote-code
```

在长智能体轨迹上，吞吐量预计比原生 vLLM 高约 1.5–2 倍。把 `--tp-size` 降到 H200 上的 2。

***

## Clore.ai GPU 推荐

| 配置                      | 显存           | 预期性能                                  | Clore.ai 成本                           |
| ----------------------- | ------------ | ------------------------------------- | ------------------------------------- |
| 1× RTX 4090 24GB + 内存卸载 | 24GB + 128GB | INT4 爱好者方案，约 5–10 tok/s               | $0.14–0.42/小时                         |
| 4× A100 80GB            | 320GB        | BF16 分片，约 15–25 tok/s                 | [裸机](https://clore.ai/bare-metal)     |
| **4× H100 80GB（FP8）**   | **320GB**    | **FP8 生产部署，约 40–60 tok/s**            | **约 $4.16/小时**                        |
| **2× H200 141GB（FP8）**  | **282GB**    | **FP8 生产部署，约 50–70 tok/s，完整 20 万上下文** | [**裸机**](https://clore.ai/bare-metal) |
| 8× H100 80GB            | 640GB        | 完整 BF16，约 80+ tok/s                   | 约 $8.32/小时                            |

{% hint style="success" %}
**最佳性价比：** 2× H200 配合 FP8 检查点。吞吐级别与 4× H100 相同，但张量并行往返减半，通常在市场上按天计算更便宜，而且还能保留足够的显存余量来支持完整的 20 万上下文。
{% endhint %}

在这里租用这些机器：

* [**裸金属 H200**](https://clore.ai/bare-metal) ——推荐用于 2× H200 FP8 部署
* [**租用 H100 GPU**](https://clore.ai/rent-h100.html) ——用于 4× H100 FP8 部署
* [**裸金属 A100 80GB**](https://clore.ai/bare-metal) —— BF16 多 GPU 备用方案
* [**租用 RTX 4090**](https://clore.ai/rent-4090.html) ——仅供 INT4 爱好者使用
* [**市场**](https://clore.ai/marketplace) ——完整库存，按需与竞价现货

***

## 应用场景

* **多语言 SWE 智能体** ——Rust、Go、Java、Kotlin、Swift 和 TypeScript 获得一流支持，而不只是 Python/JS
* **长周期工具调用循环** ——交错思考让推理轨迹在数百次 `tool_use` 往返
* **代码库审计** ——20 万上下文可将一个中型服务及其测试一次性放进同一个提示词中
* **重构流水线** ——通过 MTP 模块在大量文件编辑中保持持续正确性
* **多智能体编排** ——将 M2.7 作为规划器，与较小模型（Qwen3.5、GLM-4.7-Flash）作为执行器配对
* **作为 Claude Sonnet/Opus 的自托管替代方案** 用于非商业编码研究——但 **请先阅读许可证**

***

## 基准

{% hint style="warning" %}
**这是厂商声称——请独立核实。** 以下数字来自 MiniMax 2026 年 4 月 9 日的发布说明。独立复现结果仍在陆续出现。
{% endhint %}

| 基准               | MiniMax M2.7 | Claude Sonnet 4.5（厂商参考） | Claude Opus 4.6（厂商参考） | GPT-5.3-Codex |
| ---------------- | ------------ | ----------------------- | --------------------- | ------------- |
| SWE-Pro          | **56.22%**   | \~55%                   | \~57.3%               | 56.2%         |
| VIBE-Pro         | **55.6%**    | —                       | \~57%                 | —             |
| Terminal Bench 2 | **57.0%**    | —                       | —                     | —             |
| GDPval-AA（ELO）   | **1495**     | —                       | —                     | —             |

MiniMax 的表述是：M2.7 在他们关心的智能体编码套件上与 Claude Sonnet 4.5 持平或更优，并在 SWE-Pro / VIBE-Pro 上落在 Claude Opus 4.6 的几个点差距内。请将其视为方向性信号，而不是最终排名——与封闭前沿模型的差距每一版都在缩小。

***

## MiniMax M2 家族

| 版本       | 发布            | 架构重点                       | 推荐用途               |
| -------- | ------------- | -------------------------- | ------------------ |
| M2       | 2025年10月      | 初始 229B MoE 发布，经过 RL 调优的编码 | 参考 / 历史版本          |
| M2.1     | 2025年12月      | **交错思考** 引入                | 最早值得用于智能体的版本       |
| M2.5     | 2026年2月       | 自我演化 RL 后训练，更长上下文          | 如果磁盘受限，这是一个稳定的编码模型 |
| **M2.7** | **2026年4月9日** | **改进的多语言编码、MTP、官方 FP8**    | **默认选择——就用这个**     |

如果你是从零开始，跳过早期版本，直接上 M2.7。架构差异会叠加，而且 FP8 的使用体验明显更好。

***

## 故障排查

| 问题                           | 解决方案                                                                                                                     |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `OutOfMemoryError` 在 FP8 加载时 | 需要约 230GB 显存。使用 4× H100 80GB 或 2× H200 141GB。先把 `--max-model-len` 降到 32768。                                              |
| HuggingFace 下载缓慢             | `huggingface-cli download MiniMaxAI/MiniMax-M2.7 --local-dir ./weights --resume-download`。预计 FP8 约 230GB / BF16 约 460GB。 |
| 工具调用被静默丢弃                    | 设置 `--enable-auto-tool-choice --tool-call-parser hermes` 在 vLLM 中。M2.7 使用 Hermes 风格的工具标签。                                |
| `<think>` 块为空或乱码             | 采样必须为 `temperature=1.0, top_p=0.95, top_k=40`。贪婪解码会破坏交错思考。                                                               |
| MTP 错误 / 形状不匹配               | 将 vLLM 更新到最新稳定版；MTP 支持是后期才加入的，旧版本不包含这些模块。                                                                                |
| H100 上 20 万上下文 OOM           | 使用 `--enable-chunked-prefill` 并从 `--max-model-len 65536`开始。实际上完整 20 万上下文需要 H200。                                         |
| 许可证混淆                        | 默认 = 非商业用途。任何付费产品使用前请发送邮件至 `api@minimax.io` ，主题写“ M2.7 licensing ”。                                                      |

***

## 下一步

* **音频兄弟模型：** [MiniMax Speech](/guides/guides_v2-zh/yin-pin-yu-yu-yin/minimax-speech.md) ——同一厂商，音频/语音生成
* **开放许可证替代方案：** [GLM-5.1](/guides/guides_v2-zh/yu-yan-mo-xing/glm-5-1.md) ——744B / 40B 激活参数，MIT 许可证，SWE-Bench Pro 顶尖
* **超大上下文替代方案：** [DeepSeek V4](/guides/guides_v2-zh/yu-yan-mo-xing/deepseek-v4.md) ——100 万上下文，多模态
* **更便宜的智能体选项：** [GLM-4.7 Flash](/guides/guides_v2-zh/yu-yan-mo-xing/glm-47-flash.md) ——可在单个 H100 上运行，MIT
* **Clore.ai 市场：** [clore.ai/marketplace](https://clore.ai/marketplace) ——来自现货市场的 H100/H200/A100

### 链接

* [HuggingFace 上的 MiniMax M2.7](https://huggingface.co/MiniMaxAI/MiniMax-M2.7)
* [MiniMax M2.7 许可证](https://huggingface.co/MiniMaxAI/MiniMax-M2.7/blob/main/LICENSE) ——商业使用前请先阅读
* [MiniMax 平台](https://www.minimax.io)
* [vLLM 文档](https://docs.vllm.ai)
* [SGLang 仓库](https://github.com/sgl-project/sglang)
* [KTransformers](https://github.com/kvcache-ai/ktransformers)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-zh/yu-yan-mo-xing/minimax-m27.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
