【实测】基于 K100-AI 部署 Hermes Agent 跑自主智能体操作指南
一、项目概述
本次测试目标是在海光 DCU K100-AI 环境中部署 Hermes Agent,并接入本地大模型服务,让 Hermes 以自主智能体方式完成复杂任务执行。
本次主要验证场景为:
- Hermes Agent 容器化部署
- 接入本地 OpenAI Compatible API 模型服务
- 安装并启用
ppt-masterSkill - 通过 Hermes Agent 自动生成彩色 SVG PPT
- 对比不同模型生成 18 页 PPT 的耗时和稳定
测试中使用过两个模型:
| 模型 | 节点 | 用途 |
|---|---|---|
| Qwen3.5-122B-A10B-AWQ | 192.168.217.77 | 测试 |
| Qwen3.6-27B-W8A8 | 192.168.217.64 | 测试 |
Hermes Agent 部署在192.168.217.77节点,模型服务通过 OpenAI 兼容接口调用。
服务器配置
| 项目 | 规格 |
|---|---|
| CPU | 2×Hygon 7380 (32 Core, 2.2GHz) |
| GPU | 8×海光 DCU K100-AI (64GB/卡) |
| 内存 | 1024GB (16×64GB) |
| 系统盘 | 2×480G SATA SSD |
| 数据盘 | 2×3.2T SSD |
二、部署环境
2.1 节点信息
Hermes Agent 部署节点:
192.168.217.7727B 模型部署节点:
192.168.217.64Hermes 运行方式:
Docker 容器容器名称:
hermes-agentHermes Agent 版本:
v0.16.0三、Hermes Agent 容器部署
3.1 容器目录规划
Hermes Agent 采用容器部署,并将关键目录挂载到宿主机,方便后续保存配置、Skill、工作区和输出文件。
目录映射关系如下:
| 宿主机目录 | 容器内目录 | 说明 |
|---|---|---|
/data/hermes-deploy/home | /root/.hermes | Hermes 配置、Skill、日志 |
/data/hermes-deploy/workspace | /workspace | 项目工作目录 |
/data/hermes-deploy/output | /output | 输出文件目录 |
进入容器:
docker exec -it hermes-agent bash检查 Hermes 版本:
hermes --version四、配置模型服务
Hermes 通过 OpenAI Compatible API 调用本地模型服务。
配置文件路径:
/root/.hermes/config.yaml4.1 接入 122B 模型
122B 模型服务位于 77 节点本机,接口地址为:
http://127.0.0.1:8101/v1Hermes 配置示例:
model: provider: custom model: Qwen3.5-122B-A10B-AWQ base_url: http://127.0.0.1:8101/v1 api_key: none api_mode: chat_completions terminal: backend: local cwd: /workspace验证模型服务:
curl http://127.0.0.1:8101/v1/models4.2 接入 27B 模型
27B 模型部署在192.168.217.64,接口地址为:
http://192.168.217.64:8101/v1验证模型服务:
curl http://192.168.217.64:8101/v1/models返回示例:
{ "id": "Qwen3___6-27B-W8A8", "max_model_len": 98304 }Hermes 配置示例:
model: provider: custom model: Qwen3___6-27B-W8A8 base_url: http://192.168.217.64:8101/v1 api_key: none api_mode: chat_completions context_length: 98304 max_tokens: 4096 terminal: backend: local cwd: /workspace auxiliary: compression: provider: custom model: Qwen3___6-27B-W8A8 base_url: http://192.168.217.64:8101/v1 api_key: none api_mode: chat_completions context_length: 98304 max_tokens: 2048这里需要注意:context_length要和 vLLM 实际启动的--max-model-len对齐。Hermes 配置里写大并不会真正扩大模型上下文,真正上下文大小取决于 vLLM 服务端。
五、vLLM 启动注意事项
Hermes Agent 会使用工具调用能力,因此 vLLM 启动时必须开启自动工具调用。
推荐参数:
--enable-auto-tool-choice --tool-call-parser qwen3_coder如果没有加这两个参数,Hermes 调用模型时会报错:
"auto" tool choice requires --enable-auto-tool-choice and --tool-call-parser to be set27B 模型示例启动方式:
vllm serve /root/model/metax-tech/Qwen3.6-27B-W8A8 \ --host 0.0.0.0 \ --port 8101 \ --served-model-name Qwen3___6-27B-W8A8 \ --max-model-len 98304 \ --enable-auto-tool-choice \ --tool-call-parser qwen3_coder六、安装 ppt-master Skill
本次测试客户使用的是ppt-masterSkill,因此需要将该 Skill 安装到 Hermes 的本地 Skill 目录。
宿主机路径:
/data/hermes-deploy/home/skills/ppt-master容器内路径:
/root/.hermes/skills/ppt-master安装后检查:
hermes skills list正常应能看到:
ppt-master local enabled七、安装依赖
ppt-master需要使用 Python 脚本完成 SVG 检查、后处理和 PPTX 转换。
进入容器:
docker exec -it hermes-agent bash使用清华 PyPI 源安装依赖:
python3 -m pip install \ -i https://pypi.tuna.tsinghua.edu.cn/simple \ --trusted-host pypi.tuna.tsinghua.edu.cn \ -r /root/.hermes/skills/ppt-master/requirements.txt实际安装过程中,svglib可能触发pycairo编译。如果容器里没有编译器,会安装失败。
本次采用 CairoSVG 作为替代方案:
python3 -m pip install \ -i https://pypi.tuna.tsinghua.edu.cn/simple \ --trusted-host pypi.tuna.tsinghua.edu.cn \ cairosvg同时安装了 Inkscape,用于 SVG 渲染和兼容检查:
inkscape --version检查 ppt-master 转换脚本:
python3 /root/.hermes/skills/ppt-master/scripts/svg_to_pptx.py --help八、启动 Hermes Agent
建议每次测试新建独立目录,避免旧项目污染结果。
以 27B、98K 上下文测试为例:
cd /workspace mkdir -p /workspace/time_test_qwen36_27b_single_18pages_98304 cd /workspace/time_test_qwen36_27b_single_18pages_98304 HERMES_MAX_TOKENS=4096 hermes \ --skills ppt-master \ --provider custom \ --model Qwen3___6-27B-W8A8 \ --yolo如果是 122B:
cd /workspace mkdir -p /workspace/time_test_122b_18pages cd /workspace/time_test_122b_18pages HERMES_MAX_TOKENS=8192 hermes \ --skills ppt-master \ --provider custom \ --model Qwen3.5-122B-A10B-AWQ \ --yolo说明:
--skills ppt-master:指定使用客户 Skill--provider custom:使用自定义 OpenAI Compatible 模型服务--model:指定模型名称--yolo:自动允许工具执行HERMES_MAX_TOKENS:限制单次输出长度,避免上下文爆掉
九、18页 PPT 测试 Prompt
为了减少耗时和上下文膨胀,本次测试 prompt 中明确禁止 live preview、联网搜索和大段源码输出。
示例 prompt:
请严格使用 ppt-master skill,一次性从零生成18页中文彩色PPT,用于测试模型端到端耗时。 项目名:hermes_agent_27b_time_test_ppt169_20260616 主题:Hermes Agent 产品介绍 受众:企业技术人员和管理人员 比例:16:9 风格:现代科技商务风 配色:深蓝、青绿、紫色渐变 输出文件名:hermes_agent_ppt_master_18pages.pptx 为了计时测试,请不要启动 live preview,不要启动 svg_editor/server.py,不要联网搜索,不要生成外部图片,不要等待人工确认,不要输出完整SVG源码、大段解释或大段diff;只写文件并执行XML检查、SVG后处理和PPTX导出。每页采用中等信息密度和简单图形,优先保证速度、页数正确和XML合法。 页面结构: 1封面,2产品定位,3核心能力,4技术架构,5模型接入,6工具调用,7浏览器自动化,8文件处理,9长期记忆,10工作流程,11深度规划,12执行监控,13实时看板,14成本收益,15企业集成,16应用场景,17成功指标,18总结问答。 要求:严格18页;逐页生成彩色SVG并保留svg_output;避免文字重叠、越界和字号过小;XML必须合法,特别注意把 & 转义为 &;生成后执行XML检查、finalize_svg.py后处理、svg_to_pptx.py导出可编辑PPTX;最终检查PPT页数必须为18页。最后只返回总耗时、PPTX路径、svg_output路径、svg_final路径、页数检查和XML检查结果。 请从现在开始计时,直接执行完整流程。十、生成过程说明
ppt-master的主要流程如下:
内容规划 ↓ 生成 design_spec.md / spec_lock.md ↓ 逐页生成 SVG ↓ SVG XML 合法性检查 ↓ finalize_svg.py 后处理 ↓ svg_to_pptx.py 转换为 PPTX ↓ 检查 PPT 页数生成过程中会产生以下目录:
svg_output/ 原始 SVG svg_final/ 后处理 SVG backup/ SVG 备份 exports/ 导出的 PPTX十一、手动检查命令
11.1 检查 SVG 数量
find svg_output -maxdepth 1 -name "*.svg" | wc -l11.2 检查 SVG XML 合法性
python3 - <<'PY' from pathlib import Path from lxml import etree path = Path("svg_output") for svg in sorted(path.glob("*.svg")): etree.parse(str(svg)) print("OK:", svg.name) PY11.3 执行 SVG 后处理
python3 /root/.hermes/skills/ppt-master/scripts/finalize_svg.py \ /workspace/projects/项目目录11.4 导出 PPTX
python3 /root/.hermes/skills/ppt-master/scripts/svg_to_pptx.py \ /workspace/projects/项目目录 \ -o /workspace/projects/项目目录/output.pptx \ --only native \ --no-notes11.5 检查 PPT 页数
python3 - <<'PY' from pptx import Presentation ppt = Presentation("output.pptx") print("slides:", len(ppt.slides)) PY十二、测试结果
12.1 122B 测试结果
模型:
Qwen3.5-122B-A10B-AWQ结果:
18页 PPT 生成成功 SVG XML 错误:0 PPT 页数:18 转换失败页数:0耗时统计:
完整生成约 40 分钟12.2 27B,max_model_len=98304 测试结果
模型:
Qwen3.6-27B-W8A8vLLM 上下文:
--max-model-len 98304结果:
一次性生成18页 PPT 成功 PPTX 导出成功 转换失败:0Hermes 显示耗时:
约 18 分钟十三、重要踩坑记录
13.1 vLLM 必须启用工具调用
如果没有加:
--enable-auto-tool-choice --tool-call-parser qwen3_coderHermes 会报:
"auto" tool choice requires --enable-auto-tool-choice and --tool-call-parser to be set13.2 Hermes context_length 不能只在客户端虚标
Hermes 配置:
context_length: 98304只表示 Hermes 认为模型有这么大上下文。
真正限制取决于 vLLM:
--max-model-len 98304必须通过接口确认:
curl http://模型IP:8101/v1/models看到:
"max_model_len": 98304才是真正生效。
十四、最终结论
本次在 K100-AI 环境中成功部署 Hermes Agent,并通过ppt-masterSkill 跑通了自主智能体生成 PPT 的完整流程。
整体结论如下:
- Hermes Agent 可以通过 Docker 方式稳定部署在 K100-AI 节点。
- Hermes 可以接入本地 OpenAI Compatible API 模型服务。
ppt-masterSkill 可以完成从内容规划、SVG生成、SVG检查、后处理到PPTX导出的完整流程。- 使用 122B 模型可以稳定完成18页PPT生成,但耗时较长。
- 使用 27B 模型在 65536 上下文下容易在后段触发上下文超限。
- 将 27B 的 vLLM
--max-model-len调整到 98304 后,可以一次性完成18页PPT生成。 - 对于长PPT生成任务,建议使用更大的上下文窗口,并在 prompt 中禁止 live preview、联网搜索和完整源码输出。
推荐配置:
模型:Qwen3.6-27B-W8A8 vLLM max_model_len:98304 Hermes HERMES_MAX_TOKENS:4096 Skill:ppt-master 生成方式:一次性生成18页,中等信息密度,禁止live preview最终效果:
18页彩色PPT生成成功 SVG XML错误:0 PPT转换失败:0 PPT页数:18 27B-98K上下文耗时:约18分钟