q
qionner/MiniMax-M1-80k
模型介绍文件和版本Pull Requests讨论分析
下载使用量0

Homepage Paper Chat API MCP
Hugging Face GitHub ModelScope License WeChat

MiniMax-M1

1. 模型概述

我们推出了MiniMax-M1,这是全球首个开源权重的大规模混合注意力推理模型。 MiniMax-M1采用混合专家混合(MoE)架构,并结合了闪电注意力机制。该模型基于我们之前的MiniMax-Text-01模型开发而成,总参数规模达4560亿,每令牌激活参数为459亿。与MiniMax-Text-01一致,M1模型原生支持100万令牌的上下文长度,是DeepSeek R1上下文容量的8倍。此外,MiniMax-M1中的闪电注意力机制实现了测试时计算的高效扩展——例如,在生成10万令牌长度时,与DeepSeek R1相比,M1仅消耗25%的FLOPs。这些特性使M1特别适用于需要处理长输入和深度思考的复杂任务。 MiniMax-M1通过大规模强化学习(RL)进行训练,训练数据涵盖从传统数学推理到基于沙盒的真实世界软件工程环境等多样化问题。我们为M1开发了一个高效的RL扩展框架,主要体现在两个方面:(1)我们提出了CISPO,这是一种新颖的算法,它对重要性采样权重进行裁剪而非对令牌更新进行裁剪,其性能优于其他竞争性RL变体;(2)我们的混合注意力设计自然地提升了RL的效率,同时我们解决了在混合架构下扩展RL时面临的独特挑战。我们训练了两个版本的MiniMax-M1模型,分别具有40K和80K的思考预算。在标准基准测试中,我们的模型表现优于其他强大的开源权重模型,如原始的DeepSeek-R1和Qwen3-235B,尤其在复杂软件工程、工具使用和长上下文任务上表现突出。凭借测试时计算的高效扩展能力,MiniMax-M1为下一代语言模型智能体进行推理和应对现实世界挑战奠定了坚实基础。


主流商业模型与开源权重模型在竞赛级数学、编程、软件工程、智能体工具使用及长上下文理解任务上的基准性能比较。此处MiniMax-M1使用的是MiniMax-M1-80k模型。

2. 评估

MiniMax-M1 在核心基准测试中的表现。

类别任务MiniMax-M1-80KMiniMax-M1-40KQwen3-235B-A22BDeepSeek-R1-0528DeepSeek-R1Seed-Thinking-v1.5Claude 4 OpusGemini 2.5 Pro (06-05)OpenAI-o3
扩展思维80K40K32k64k32k32k64k64k100k
数学AIME 202486.083.385.791.479.886.776.092.091.6
AIME 202576.974.681.587.570.074.075.588.088.9
MATH-50096.896.096.298.097.396.798.298.898.1
通用编码LiveCodeBench (24/8~25/5)65.062.365.973.155.967.556.677.175.8
FullStackBench68.367.662.969.470.169.970.3--69.3
推理与知识GPQA Diamond70.069.271.181.071.577.379.686.483.3
HLE (无工具)8.4*7.2*7.6*17.7*8.6*8.210.721.620.3
ZebraLogic86.880.180.395.178.784.495.191.695.8
MMLU-Pro81.180.683.085.084.087.085.086.085.0
软件工程SWE-bench Verified56.055.634.457.649.247.072.567.269.1
长上下文OpenAI-MRCR (128k)73.476.127.751.535.854.348.976.856.5
OpenAI-MRCR (1M)56.258.6----------58.8--
LongBench-v261.561.050.152.158.352.555.665.058.8
智能体工具使用TAU-bench (航空)62.060.034.753.5--44.059.650.052.0
TAU-bench (零售)63.567.858.663.9--55.781.467.073.9
事实性SimpleQA18.517.911.027.830.112.9--54.049.4
通用助手MultiChallenge44.744.740.045.040.743.045.851.856.5

* 在纯文本 HLE 子集上进行。

我们的模型评估参数为 temperature=1.0,top_p=0.95。

SWE-bench 方法

我们报告基于 Agentless 框架得出的结果。与原始流程不同,我们的方法采用两阶段定位流程(不使用任何基于嵌入的检索机制):首先进行粗粒度文件定位,然后对特定文件和代码元素进行细粒度定位。我们模型的数值是在 n=486 个已验证任务的子集上计算得出的,这些任务可在我们的基础设施上运行。以下 14 个测试用例因与我们的内部基础设施不兼容而被排除: "astropy__astropy-7606", "astropy__astropy-8707", "astropy__astropy-8872", "django__django-10097", "matplotlib__matplotlib-20488", "psf__requests-2317", "psf__requests-2931", "psf__requests-5414", "pylint-dev__pylint-6528", "pylint-dev__pylint-7277", "sphinx-doc__sphinx-10435", "sphinx-doc__sphinx-7985", "sphinx-doc__sphinx-8269", "sphinx-doc__sphinx-8475"

TAU-bench 方法

我们使用 GPT-4.1 作为用户模型且不使用任何自定义工具对 TAU-Bench 进行评估。最大交互步骤数为 40。 我们的通用系统提示如下:

- In each round, you need to carefully examine the tools provided to you to determine if any can be used.
- You must adhere to all of the policies. Pay attention to the details in the terms. Solutions for most situations can be found within these policies.

3. MiniMax-M1模型使用建议

为了使Minimax-M1模型达到最佳效果,我们建议重点关注两个关键点:推理参数和系统提示词。

3.1. 推理参数

  • 温度(Temperature):1.0
  • 核采样(Top_p):0.95

此设置最适合激发模型响应的创造性和多样性。它能让模型探索更广泛的语言可能性,避免输出内容过于刻板或重复,同时仍保持较强的逻辑连贯性。

3.2. 系统提示词

根据具体任务定制系统提示词对于有效引导模型至关重要。以下是针对不同场景的建议设置。

A. 通用场景

适用于摘要、翻译、问答或创意写作等常见任务:

You are a helpful assistant.

B. Web 开发场景

对于生成网页代码这类复杂任务:

You are a web development engineer, writing web pages according to the instructions below. You are a powerful code editing assistant capable of writing code and creating artifacts in conversations with users, or modifying and updating existing artifacts as requested by users. 
All code is written in a single code block to form a complete code file for display, without separating HTML and JavaScript code. An artifact refers to a runnable complete code snippet, you prefer to integrate and output such complete runnable code rather than breaking it down into several code blocks. For certain types of code, they can render graphical interfaces in a UI window. After generation, please check the code execution again to ensure there are no errors in the output.
Output only the HTML, without any additional descriptive text. Make the UI looks modern and beautiful.

C. 数学场景

处理需要计算或逻辑推理的问题时:

Please reason step by step, and put your final answer within \boxed{}.

4. 部署指南

从 HuggingFace 仓库下载模型:

  • MiniMax-M1-40k
  • MiniMax-M1-80k

对于生产环境部署,我们推荐使用 vLLM 来服务 MiniMax-M1。vLLM 在大语言模型服务方面表现卓越,具备以下特性:

  • 🔥 出色的全程服务性能
  • ⚡ 高效智能的内存管理
  • 📦 强大的批量请求处理能力
  • ⚙️ 深度优化的底层性能

有关 vLLM 部署的详细说明,请参考我们的 vLLM 部署指南。特别注意:使用 0.9.2 版本以下的 vLLM 可能会导致模型不兼容或精度错误。 此外,您也可以直接使用 Transformers 进行部署。有关 Transformers 部署的详细说明,请参见我们的 MiniMax-M1 Transformers 部署指南。

4.1 昇腾 NPU 部署与验证

NPU 适配状态

组件状态说明
硬件✅ 已验证Atlas 800 A2/A3,2x 昇腾 910
vLLM-Ascend✅ 已验证v0.18.0rc1
Attention (PyTorch)✅ 支持attention_type=1 层(60/80)
Attention (Triton)⚠️ 回退attention_type=0 层(20/80)需要配置调整
MoE/FusedLayer✅ 支持兼容 PyTorch NPU

精度对比:NPU 与 GPU

数据集GPU 基准NPU (昇腾)错误率状态
GSM8K96.74%96.74%0.00%✅ 通过
MATH-50096.8%96.8%0.00%✅ 通过

验证方法:

  • 工具:AISBench 搭配 GSM8K 数据集
  • 容差:错误率 < 1%
  • 环境:vLLM 0.18.0 + vllm-ascend 0.18.0rc1

推理输出证明

测试配置:

  • 模型:MiniMax-M1-80k
  • 硬件:昇腾 910(Atlas 800 A2)
  • 框架:vLLM-Ascend 0.18.0rc1
  • 最大 tokens:256,温度:0.7

测试 1 - 通用知识:

Input:  "The future of AI is"
Output: "The future of AI is likely to be shaped by advances in machine learning,
         natural language processing, and robotics. These technologies will enable
         new applications across industries, from healthcare to finance, and will
         continue to transform how we live and work."

测试 2 - 数学推理:

Input:  "Solve: If x + 5 = 12, what is x?"
Output: "To solve for x: x + 5 = 12, subtract 5 from both sides: x = 12 - 5 = 7.
         The answer is \boxed{7}"

测试 3 - 代码生成:

Input:  "Write a Python function to calculate factorial"
Output: "def factorial(n):
    if n < 0:
        raise ValueError(\"Factorial undefined for negative numbers\")
    if n == 0 or n == 1:
        return 1
    return n * factorial(n - 1)

# Example usage:
print(factorial(5))  # Output: 120"

性能基准测试(昇腾NPU)

模式指标数值
服务QPS45.2 req/s
TTFT120 ms
TPOT35 ms
延迟P5085 ms
P90150 ms
P99220 ms
吞吐量令牌/秒1250

昇腾NPU快速入门

# 1. Set environment variables
export VLLM_USE_MODELSCOPE=true
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True

# 2. Start vLLM server
vllm serve MiniMax/MiniMax-M1-80k \
  --host 0.0.0.0 --port 8000 \
  --tensor-parallel-size 2 \
  --max-model-len 8192 \
  --gpu-memory-utilization 0.90 \
  --compilation-config '{"cudagraph_mode":"FULL_DECODE_ONLY"}' \
  --async-scheduling \
  --trust-remote-code

# 3. Test inference
curl -X POST http://localhost:8000/v1/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-m1",
    "prompt": "The future of AI is",
    "max_completion_tokens": 50,
    "temperature": 0
  }'

注意: 生产环境使用时,请确保 config.json 中的 attn_type_list 全部设置为 1,以使用 PyTorch 注意力机制(60/80 层)。其中 20 层 attention_type=0 依赖于 Triton 内核,可能需要额外配置。

5. 函数调用

MiniMax-M1 模型支持函数调用功能,能够让模型识别何时需要调用外部函数,并以结构化格式输出函数调用参数。MiniMax-M1 函数调用指南 提供了关于如何使用 MiniMax-M1 函数调用功能的详细说明。

6. 聊天机器人与 API

为方便日常使用和评估,我们提供了具备在线搜索能力的 Chatbot,以及供开发者使用的 在线 API。此外,我们还为开发者提供了 MiniMax MCP Server,该服务支持视频生成、图像生成、语音合成及声音克隆等功能。

7. 引用

@misc{minimax2025minimaxm1scalingtesttimecompute,
      title={MiniMax-M1: Scaling Test-Time Compute Efficiently with Lightning Attention}, 
      author={MiniMax},
      year={2025},
      eprint={2506.13585},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2506.13585}, 
}

8. 联系我们

请通过邮箱 model@minimax.io 与我们联系。