Prhub

#24991 [Docs] Update MiniCPM-V-4.6 documentation and deployment configuration

原始 PR 作者 AgainstEntropy 合并时间 2026-05-12 02:10 文件变更 2 提交数 3 评论 1 代码增减 +89 / -45

执行摘要

更新 MiniCPM-V-4.6 文档,支持 Thinking 变体

为了反映 MiniCPM-V-4.6 在 HuggingFace 上正式发布的 Base 与 Thinking 两个变体,以及更新后的工具调用格式(Qwen3.5 XML 结构),需要同步更新部署配置文档,并移除之前的预览状态标记。

建议合并。该 PR 及时更新了文档,使社区能正确部署 MiniCPM-V-4.6 的 Base 和 Thinking 变体。

讨论亮点

该 PR 没有引发 review 讨论,由 wisclmy0611 直接审核通过。

实现拆解

  1. 在部署交互组件(minicpm-v-4_6-deployment.jsx)中添加 variant 选项,支持 Base 和 Thinking 两个模型路径的动态切换。
  2. 更新工具调用解析器配置,从原来的 qwen 改为 qwen3_coder,以匹配新版本的工具调用格式。
  3. 调整 Reasoning Parser 的默认状态为禁用(disabled),因为 Thinking 变体本身已具备思考能力。
  4. 在 cookbook 文档(MiniCPM-V-4_6.mdx)中更新模型介绍、许可证信息、基准测试结果,并移除预览期占位注释。
文件 模块 状态 重要度
docs_new/src/snippets/autoregressive/minicpm-v-4_6-deployment.jsx 交互组件 modified 5.4
docs_new/cookbook/autoregressive/OpenBMB/MiniCPM-V-4_6.mdx 使用文档 modified 3.91

关键符号

MiniCPMV46Deployment generateCommand

关键源码片段

docs_new/src/snippets/autoregressive/minicpm-v-4_6-deployment.jsx core-logic

部署交互组件,新增 variant 选项,实现模型路径动态选择,是前端展示的核心变更。

// 选项配置:包含硬件、变体、推理、工具调用、Mamba 缓存等
const options = {
  hardware: {
    name: 'hardware',
    title: 'Hardware Platform',
    items: [
      { id: 'a100', label: 'A100', default: false },
      { id: 'h100', label: 'H100', default: false },
      { id: 'h200', label: 'H200', default: true },
      { id: 'b200', label: 'B200', default: false },
    ],
  },
  variant: { // 新增:Base / Thinking 变体选择
    name: 'variant',
    title: 'Variant',
    items: [
      { id: 'base', label: 'Base', subtitle: 'MiniCPM-V-4.6', default: true },
      { id: 'thinking', label: 'Thinking', subtitle: 'MiniCPM-V-4.6-Thinking', default: false },
    ],
  },
  reasoning: { name: 'reasoning', title: 'Reasoning Parser',
    items: [
      { id: 'enabled', label: 'enabled', default: false },
      { id: 'disabled', label: 'disabled', default: true },
    ],
  },
  toolcall: { name: 'toolcall', title: 'Tool Call Parser',
    items: [
      { id: 'enabled', label: 'enabled', default: false },
      { id: 'disabled', label: 'disabled', default: true },
    ],
  },
  mambaCache: { name: 'mambaCache', title: 'Mamba Radix Cache',
    items: [
      { id: 'v1', label: 'V1', default: false },
      { id: 'v2', label: 'V2', default: true },
    ],
  },
};// 各硬件推荐的 tp 和 mem-fraction-static
const modelConfigs = {
  a100: { tp: 1, mem: 0.7 },
  h100: { tp: 1, mem: 0.7 },
  h200: { tp: 1, mem: 0.5 },
  b200: { tp: 1, mem: 0.4 },
};// 核心命令生成函数
const generateCommand = (values) => {
  const { variant, hardware, reasoning, toolcall, mambaCache } = values;
  const hwConfig = modelConfigs[hardware];
  if (!hwConfig) return `# Error: Unknown hardware platform`;  const { tp, mem } = hwConfig;
  const isBlackwell = hardware === 'b200';
  // 根据变体选择模型路径
  const modelPath = variant === 'thinking'
    ? 'openbmb/MiniCPM-V-4.6-Thinking'
    : 'openbmb/MiniCPM-V-4.6';  let cmd = `sglang serve --model-path ${modelPath}`;
  if (tp > 1) cmd += ` \
  --tp ${tp}`;
  cmd += ` \
  --trust-remote-code`;
  cmd += ` \
  --dtype bfloat16`;
  if (isBlackwell) cmd += ` \
  --attention-backend trtllm_mha`;
  cmd += ` \
  --mem-fraction-static ${mem}`;
  if (reasoning === 'enabled') cmd += ` \
  --reasoning-parser qwen3`;
  if (toolcall === 'enabled') cmd += ` \
  --tool-call-parser qwen3_coder`; // 更新为 qwen3_coder
  if (mambaCache === 'v2') cmd += ` \
  --mamba-scheduler-strategy extra_buffer`;
  cmd += ` \
  --host 0.0.0.0 --port 30000`;  return cmd;
};

评论区精华

没有提炼出高价值讨论线程

当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。

风险与影响

变更仅涉及文档内容和前端 Docusaurus 交互组件,不影响后端运行时逻辑。风险极低,但需确保模型路径和参数在对应 HuggingFace 仓库存在。

影响范围仅限于查阅 MiniCPM-V-4.6 部署文档的用户,提供了更准确的部署命令和变体选择能力。对现有系统无影响。

低风险

关联 Issue

未识别关联 Issue

当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。

完整报告

参与讨论