模型名称: UnifoLM-VLM-Base 模型链接: https://ai.gitcode.com/hf_mirrors/unitreerobotics/UnifoLM-VLM-Base 模型描述: UnifoLM-VLM-Base 是一个用于机器人操作与视觉语言任务的统一基础模型,支持图像-语言联合推理与任务规划。本适配包面向昇腾 NPU 提供参考部署说明与 NPU 适配入口。 模型架构: Vision-Language Model(VLM) 参数规模: 以分片权重形式提供,当前本地已就绪权重约 16.1 GB
| 依赖项 | 版本要求 | 说明 |
|---|---|---|
| Python | >= 3.10 | 推荐 3.11 |
| torch | 2.1.0+ | 当前环境为 2.9.0+cpu |
| torch_npu | 与 CANN 配套 | 昇腾 NPU 运行依赖 |
| transformers | >= 4.45.0 | 模型加载与推理 |
| 昇腾驱动 | CANN 8.5.1 | 当前环境版本 |
| Pillow | 建议安装 | 图像预处理依赖 |
安装命令:
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/UnifoLM-VLM-Base --input "Describe what you see." --max_length 256| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --input | str | - | 单条输入文本 |
| --input_file | str | - | 批量输入文件路径 |
| --model_path | str | /tmp/UnifoLM-VLM-Base | 本地模型路径 |
| --max_length | int | 256 | 最大生成长度 |
输入:
Describe what you see.输出:
当前环境下已完成 NPU 环境检查与权重文件落盘,但端到端模型生成尚未完成验证;完整样例输出将在后续接入官方推理流程后补充。


| 测试项 | 结果 |
|---|---|
| NPU 设备检测 | 可用 |
| torch_npu 可用性 | True |
| CANN 版本 | 8.5.1 |
| torch 版本 | 2.9.0+cpu |
| 模型权重文件 | 已落盘 3/4 分片,分片1 下载超时 |
| 端到端推理 | 待补全分片1后验证 |
说明:已确认可在 NPU 上运行基础张量运算与设备调用;完整模型推理验证需要补全
model-00001-of-00004.safetensors后继续完成。
torch_npu + transformers,优先使用 NPU 设备推理。FileNotFoundError。accelerate 进行设备映射或权重分片。