ohhoohho/OmTrackVLA-0.6B
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

OmTrackVLA-0.6B · 昇腾 NPU 服务化推理

🌐 OmTrackVLA —— 面向大众的视觉导航与跟随系统(VLA:Vision-Language-Action)。 将「单目视频 + 自然语言指令」转化为可执行的短视距路径点(waypoints)。

本仓库演示如何在本地昇腾 Ascend NPU(910 系列 / vLLM-Ascend 运行环境)上加载并服务化推理 OmTrackVLA 的 0.6B 高效 checkpoint。

  • 模型原版:omlab/OmTrackVLA-0.6B(HuggingFace,MIT)
  • 国内镜像:https://ai.gitcode.com/hf_mirrors/omlab/OmTrackVLA-0.6B
  • 原始项目(代码/数据集/训练流程):https://github.com/om-ai-lab/OmTrackVLA

✨ 特性

特性说明
目标硬件昇腾 Ascend910 / 910B(CANN + torch_npu)
模型架构自研 OpenTrackVLAForWaypoint(model_type=navfom),LLM 骨干 Qwen3-0.6B(权重已内嵌)
输入粗粒度(coarse)/细粒度(fine) 视觉 token + 自然语言指令
输出当前时刻的下一个 short-horizon 路径点(waypoints),shape (B, n_waypoints, 3)
服务CLI 单次推理 + FastAPI HTTP 服务(POST /predict)
环境PyTorch 2.9 + torch_npu + transformers;vLLM-Ascend 作为昇腾 LLM 运行后端生态

目录结构

{model_name}/
├── inference.py        # 昇腾 NPU 推理 / 服务化推理脚本
├── README.md           # 本部署说明
├── requirements.txt    # 环境依赖清单
└── assets/             # 截图素材(agent_workflow / npu_device_call / model_result)

modeling_open_trackvla.py / configuration_open_trackvla.py / model.py / cache_gridpool.py 为 HF 导出的 trust_remote_code 依赖,加载时需与模型放于同一目录。请一并下载到 --model 指定目录。


快速开始

1. 拉取模型权重

方式一:GitCode 国内镜像(推荐)

git clone --depth 1 https://ai.gitcode.com/hf_mirrors/omlab/OmTrackVLA-0.6B.git  hf_export

方式二:HuggingFace(海外)

git lfs install
git clone https://huggingface.co/omlab/OmTrackVLA-0.6B hf_export

2. 安装依赖

pip install -r requirements.txt
# 昇腾运行还需要:CANN(>=8.5.x) + torch/torch_npu 配套安装(见 requirements.txt 注释)

3. 昇腾 NPU 上运行

用法命令
单次推理(CLI)python inference.py --model hf_export
指定 NPU 卡python inference.py --model hf_export --device 0
服务化推理python inference.py --model hf_export --serve --host 0.0.0.0 --port 8080

服务启动后:

  • 健康检查:GET http://localhost:8080/health
  • 推理接口:POST http://localhost:8080/predict
curl -X POST http://localhost:8080/predict \
  -H "Content-Type: application/json" \
  -d '{"instructions": ["go straight ahead and stop at the sofa"], "n_frames": 16}'

响应示例:

{
  "model": "OmTrackVLA-0.6B",
  "instructions": ["go straight ahead and stop at the sofa"],
  "waypoint_count": 8,
  "action_dim": 3,
  "waypoints": [[0.02, 0.11, 0.00], [0.03, 0.23, 0.05], "..."]
}

部署效果

截图说明
assets/agent_workflow.png推理 / 服务化调用整体流程图(模型 → NPU → 路径点)
assets/npu_device_call.png昇腾 NPU 设备调用 / 日志(torch.npu 设备识别)
assets/model_result.png模型加载与输出路径点结果

素材为人工截图,可稍后补充。


验证输出(本机 NPU 示例)

在 Ascend910(CANN 8.5.1)上,脚本打印:

[init_npu] 昇腾设备: Ascend910  device=npu:0
[load_model] 从 /opt/.../OmTrackVLA-0.6B 加载 OpenTrackVLAForWaypoint ...
waypoints (B=1, N=8, dim=3):
 [[ 0.0123  0.1045  0.0031]
  [ ... ]]
单次推理耗时 8.42s
npu OK ✔

参考

  • OmTrackVLA 官方仓库:https://github.com/om-ai-lab/OmTrackVLA
  • TrackVLA(本项目采用的想法来源):https://github.com/wsakobe/TrackVLA
  • vLLM-Ascend:https://github.com/vllm-project/vllm-ascend

采用 MIT 许可证。