liuhongwei-2026/mythos_fast
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

mythos_fast 在昇腾 NPU 上的部署

1. 简介

  • 模型来源: Shadow0482/mythos_fast(GitCode 镜像: https://ai.gitcode.com/hf_mirrors/Shadow0482/mythos_fast)
  • 基础模型: WeiboAI/VibeThinker-3B(Qwen-family 系列 3B 规模 LLM)
  • 模型任务: 强化学习 / 智能体(tool-use / function calling / agentic 多步推理)
  • 权重格式: GGUF(F16 / 各量化档位)
  • 适配状态: SUCCESS
  • 适配时间: 2026-08-22

mythos_fast 是基于约 200 万条覆盖多步工具调用、函数调用格式、智能体式思维链样本微调得到的端侧强化学习模型,原生以 GGUF 格式对外发布,适配使用 vLLM-Ascend 直接在昇腾 NPU 上完成服务化推理。

2. 验证环境

组件版本
torch2.9.0
torch-npu2.9.0.post1
vllm0.18.0
CANN8.5.1
NPUAscend 910B4 (NPU_VISIBLE_DEVICES=0,1)

3. 服务化推理

3.1 拉取模型权重

# 方式一:GitCode 镜像仓(免网络代理)
git clone https://ai.gitcode.com/hf_mirrors/Shadow0482/mythos_fast.git
# 方式二:GitHub 源仓
git clone https://huggingface.co/Shadow0482/mythos_fast

3.2 安装依赖

export PIP_INDEX_URL=https://repo.huaweicloud.com/repository/pypi/simple/
pip install -r requirements.txt

3.3 启动 vLLM-Ascend 服务化推理

export NPU_VISIBLE_DEVICES=0
vllm serve ./mythos_fast/VibeThinker-3B.F16.gguf \
  --served-model-name mythos_fast \
  --dtype bfloat16 \
  --tensor-parallel-size 1 \
  --max-model-len 8192 \
  --port 8000

也可通过本仓封装脚本一键启动:

python3 inference.py --model-path ./mythos_fast/VibeThinker-3B.F16.gguf \
    --server --port 8000 --device npu:0

3.4 调用测试

# 健康检查
curl http://127.0.0.1:8000/v1/models

# 文本补全(智能体 / tool-use 场景)
curl -s http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"mythos_fast","messages":[{"role":"user","content":"你是一个工具调用助手,请给出调用天气 API 的 function call"}],"temperature":0,"max_tokens":128}'

4. 目录结构

mythos_fast/
├── inference.py        # 服务化推理脚本(CLI 校验 + vLLM-Ascend 服务)
├── README.md           # 部署说明文档
├── requirements.txt    # 环境依赖清单
└── assets/             # 截图素材
          ├── agent_workflow.png
          ├── npu_device_call.png
          └── model_result.png

5. NPU 适配说明

  • 模型为 Qwen-family 3B 架构的 GGUF 权重,vLLM 原生支持 GGUF 反量化加载;
  • 通过 vllm serve 拉起 OpenAI 兼容 HTTP 服务,--tensor-parallel-size 按 NPU 卡数量调整;
  • 昇腾插件(vllm-ascend)自动激活,算子在图模式落到 NPU 执行;
  • 目标为 end-to-end 服务化推理验证,权重无需手工切分。

6. 精度与性能

(截图与指标待补充,见 assets/)

贡献者: liuhongwei-2026 | 赛道: 模型适配赛道