[Inquiry]: Question about controlling reasoning effort for MiniMax-M2 in local SGLang deployment

未关闭
#52 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
25/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
停滞
领域
ai

调研方向

The issue names the sglang.launch_server command and the OpenAI compatible /v1/chat/completions endpoint, but no repository files or tests. Start by checking the project’s usage guidance for local inference and reasoning controls. Done means providing a supported configuration or clarifying whether a reasoning budget can be set for MiniMax-M2 locally.

由索引模型根据 Issue 内容生成。

描述

question
Basic Information - Models Used

MiniMax-M2

Description

I am running your MiniMax-M2 model locally using SGLang. I am very impressed with the capabilities of M2 on OpenRouter (especially with reasoning enabled), but I am struggling to reproduce similar behavior and control over the reasoning process in my local deployment.

Setup

  • Model: MiniMaxAI/MiniMax-M2 (open weights)
  • Inference stack: SGLang (launched via sglang.launch_server)
  • Endpoint: OpenAI-compatible /v1/chat/completions
  • Typical launch command (simplified):
python -m sglang.launch_server \
  --model-path MiniMaxAI/MiniMax-M2 \
  --host 0.0.0.0 \
  --port 8010 \
  --tp-size 4 \
  --reasoning-parser minimax-append-think \
  --mem-fraction-static 0.85

Problem

For my use case, I often send long texts (up to ~5,000 tokens) for analysis and transformation. When I do this:

  • On OpenRouter, with reasoning.effort set to high, the model typically produces a reasonable amount of <think>...</think> content (roughly ~1,000 tokens of reasoning) and then a high-quality final answer. The behavior is stable and predictable.

  • On my local SGLang deployment, with a similar prompt and max_tokens set to a large value, the model often:

    • generates extremely long <think> blocks,
    • consumes almost all available max_tokens on thinking,
    • times out or ends with a truncated answer (sometimes only partial thoughts and no final response),
    • and overall provides worse final quality than what I see via OpenRouter.

I have tried:

  • Reducing max_tokens (e.g. to 512/1024),
  • Adding system prompts such as:
    "You are MiniMax-M2 running in LOW reasoning mode. Use only brief internal <think> blocks and then output a concise final answer."

However, the model seems to ignore these instructions in practice: it still spends most of the budget on <think>, and the generation often ends before the final answer.

My questions

  1. Is there a supported way to control reasoning effort / thinking budget for MiniMax-M2 in a local deployment, similar to reasoning.effort (“low/medium/high/minimal/none”) that OpenRouter exposes?

  2. Does MiniMax-M2 (open weights) support any parameters like:

    • reasoning_effort, or
    • reasoning: { "effort": "low|medium|high" },
      when used via an OpenAI-compatible /v1/chat/completions API (SGLang / vLLM), or are such controls implemented only in your internal inference stack?
  3. Is there an official recommendation for:

    • limiting the number of tokens that can be used for <think>...</think>, or
    • enabling a “non-thinking” or “short-thinking” mode for tasks where long reasoning is unnecessary (for example, analysis of a 5000-token article and returning a structured JSON summary)?
  4. Do you have an example configuration (launch parameters + request payload) for:

    • “MiniMax-M2 with controlled reasoning budget”,
      ideally with something equivalent to “low/medium/high” effort that you internally use?
  5. Are there any upcoming plans to expose an official way to control the reasoning budget (maximum thinking tokens, toggle for long thinking, etc.) for local deployments of MiniMax-M2, so that its behavior can be made closer to what users see on OpenRouter?

For my workload, the inability to reliably cap the reasoning length makes it very difficult to use M2 on long inputs: the model can “think forever”, hit timeouts, and still not produce a final answer. Any guidance, recommended parameters, or reference code from your side would be extremely helpful.

If needed, I can provide a small reproducible script (Python + example prompt) that demonstrates the difference in behavior between OpenRouter and my local SGLang setup.

主要语言
没有语言数据
星标
2.6k
派生
216
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MiniMax-AI/MiniMax-M2 的其他 Issue

查看 MiniMax-AI/MiniMax-M2 的全部 Issue

相似的 Issue

更多 AI Infra & Agents Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。