模型名称: mythos_fast 模型链接: https://ai.gitcode.com/hf_mirrors/Shadow0482/mythos_fast 模型描述: mythos_fast 是基于 WeiboAI/VibeThinker-3B 的微调版本,针对 tool-use 与 agentic task execution 场景优化,提供 GGUF 量化权重以支持本地高效推理。本适配包面向昇腾 NPU 提供基于 transformers + torch_npu 的参考推理入口。 模型架构: Qwen2ForCausalLM(Qwen2 架构) 参数规模: 约 3B
| 依赖项 | 版本要求 | 说明 |
|---|---|---|
| Python | >= 3.10 | 推荐 3.11 |
| torch | 2.1.0+ | 当前环境为 2.9.0+cpu |
| torch_npu | 与 CANN 配套 | 昇腾 NPU 运行依赖 |
| transformers | >= 4.40.0 | 模型加载与推理 |
| 昇腾驱动 | CANN 8.5.1 | 当前环境版本 |
| sentencepiece | 建议安装 | 部分 tokenizer 依赖 |
| protobuf | 建议安装 | 序列化依赖 |
安装命令:
pip install -r requirements.txt注意:
torch_npu需通过对应 CANN 昇腾环境提供,请勿随意覆盖安装。
# 检查 NPU 设备
npu-smi info
# 确认 NPU 可用
python3 -c "import torch; import torch_npu; print(torch.npu.is_available())"python3 inference.py --model_path /tmp/mythos_fast --input "Hello, who are you?" --max_length 256| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --input | str | - | 单条输入文本 |
| --input_file | str | - | 批量输入文件路径 |
| --model_path | str | /tmp/mythos_fast | 本地模型路径 |
| --max_length | int | 512 | 最大生成长度 |
输入:
Hello, who are you?输出:
当前环境下已完成 NPU 设备可用性验证(torch.npu.is_available() = True),但源仓库以 GGUF 为主,未提供完整 PyTorch 权重;端到端模型推理示例待补全权重后补充。


| 测试项 | 结果 |
|---|---|
| NPU 设备检测 | 可用 |
| torch_npu 可用性 | True |
| CANN 版本 | 8.5.1 |
| torch 版本 | 2.9.0+cpu |
| NPU 张量运算 | 已验证通过 |
| 端到端模型推理 | 待补全 PyTorch 权重后验证 |
说明:已确认可在 NPU 上运行基础张量运算与设备调用;完整模型推理验证需要补全 PyTorch 权重文件后继续完成。
torch_npu + transformers,优先使用 NPU 设备推理。bfloat16 以提升 NPU 推理性能。accelerate 进行设备映射或权重分片。