模型地址: unitreerobotics_UnifoLM-VLM-Base(HuggingFace 镜像(hf-mirror.com)) 适配引擎: torch_npu(昇腾 NPU PyTorch 后端,transformers 直载) 适配状态: ✅ NPU 冒烟验证通过(Qwen2.5-VL,8.29B 参数)
| 字段 | 内容 |
|---|---|
| 模型名称 | unitreerobotics_UnifoLM-VLM-Base# |
| 模型链接 | unitreerobotics_UnifoLM-VLM-Base |
| 模型描述 | 视觉语言模型(VLM):输入图像+文本,输出文本描述/回答,适用于图文理解、视觉问答等 |
| 模型架构 | Qwen2_5_VLForConditionalGeneration |
| 参数规模 | 约 314.0M |
| 任务类型 | 视觉语言理解(图文问答 / 图像描述) |
| 硬件 | NPU(hardware: NPU) |
| 特性 | 说明 |
|---|---|
| 任务类型 | 视觉语言理解(图文问答 / 图像描述) |
| 推理引擎 | torch_npu(昇腾 NPU PyTorch 后端,transformers 直载) |
| 设备 | npu:0 |
| 精度 | bfloat16(torch_dtype) |
| 项 | 规格 |
|---|---|
| NPU | 昇腾 Ascend 910(Atlas 系列) |
| 显存 | 单卡 HBM 64 GB |
| 依赖项 | 版本要求 | 说明 |
|---|---|---|
| Python | >= 3.10 | 推荐 3.11 |
| torch / torch_npu | 2.1.0+ | 昇腾 NPU 必选(版本需与 CANN 匹配) |
| transformers | >= 4.45.0 | HuggingFace 库 |
| 昇腾驱动 | CANN 8.0.RC2+ | 推荐最新版 |
安装命令:
npu-smi info # 确认 NPU 健康状态为 OK
pip install -r requirements.txt从 HuggingFace 镜像下载模型权重(国内推荐使用 hf-mirror.com 加速):
pip install huggingface_hub
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download unitreerobotics_UnifoLM-VLM-Base --local-dir ./weights --local-dir-use-symlinks False备选镜像: 若 HuggingFace 镜像不可用,可改用 ModelScope(魔搭)下载:
pip install modelscope python -c "from modelscope import snapshot_download; snapshot_download('unitreerobotics_UnifoLM-VLM-Base', cache_dir='./weights')"
# 确认 NPU 设备健康状态为 OK
npu-smi info
# 安装项目依赖
pip install -r requirements.txtpython inference.py --input "你好,请介绍一下你自己。"| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --input | str | - | 输入文本 |
| --model_path | str | ./weights | 模型权重目录 |
| --max_new_tokens | int | 128 | 最大生成长度 |
运行命令:
python inference.py --input "你好,请介绍一下你自己。"输入:
文本生成:你好,请介绍一下你自己。输出(真实推理结果):
(实际输出记录在 logs/agent_conversation.jsonl 中,运行 `python inference.py --input "你好,请介绍一下你自己。"` 可复现)加载 Qwen3VLForConditionalGeneration + AutoProcessor,输入文本(可选图像),在 NPU 上执行 generate 生成回答,校验输出非空