模型名称: Xiaomi-Robotics-0-LIBERO (MiBoT)
模型链接: https://ai.gitcode.com/hf_mirrors/XiaomiRobotics/Xiaomi-Robotics-0-LIBERO
模型描述: Xiaomi-Robotics-0-LIBERO (MiBoT) 是小米机器人团队开发的多模态机器人动作生成模型。该模型基于 Qwen3-VL-4B (Vision-Language Model) 作为 backbone,结合 DiT (Diffusion Transformer) 作为策略头,通过扩散模型生成机器人动作序列。模型支持图像/视频输入和文本指令,输出机器人关节动作(action_dim=32, action_length=30)。
模型架构: MiBoTForActionGeneration (VLM + DiT)
参数规模: 约 9B (VLM 4B + DiT ~5B)
| 依赖项 | 版本要求 | 说明 |
|---|---|---|
| Python | >= 3.10 | 推荐 3.11 |
| torch | 2.1.0+ | PyTorch 框架 |
| torch_npu | 2.1.0+ | 昇腾NPU插件(随CANN安装) |
| transformers | 4.57.1 | HuggingFace 库(与模型训练版本一致) |
| huggingface-hub | 0.36.2 | HuggingFace Hub SDK |
| 昇腾驱动 | CANN 8.5.1 | 推荐最新版 |
| numpy | latest | 数值计算 |
| pillow | latest | 图像处理 |
安装命令:
# 1. 安装 CANN (Ascend Toolkit),会自动安装 torch_npu
# 参考:https://www.hiascend.com/software/cann
# 2. 安装 Python 依赖
pip install torch transformers==4.57.1 huggingface-hub==0.36.2 numpy pillow# 检查 NPU 设备
npu-smi info
# 确认 torch_npu 可用
python3 -c "import torch_npu; print(torch.npu.is_available())"# 单条输入推理
python inference.py --input "Pick up the red block on the table"
# 指定模型路径(默认 /tmp/Xiaomi-Robotics-0-LIBERO)
python inference.py --input "Pick up the red block" --model_path /path/to/model
# 批量推理
python inference.py --input_file test_samples.txt| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --input | str | "Pick up the red block on the table" | 文本任务指令 |
| --input_file | str | None | 批量输入文件路径(每行一个指令) |
| --model_path | str | /tmp/Xiaomi-Robotics-0-LIBERO | 模型权重路径 |
| --image | str | None | 输入图像路径(可选) |
| --video | str | None | 输入视频路径(可选) |
| --num_steps | int | 5 | 扩散推理步数(DiT去噪步数) |
| --seed | int | 42 | 随机种子 |
输入:
Pick up the red block on the table输出:
[INFO] 推理完成,耗时: 0.37s
[INFO] 生成动作 shape: torch.Size([1, 30, 32])
[INFO] 动作范围: min=-3.5312, max=3.5625, mean=-0.0393
[输出] 动作序列 (前5步, 前8维):
步骤 1: [-0.0623, -0.2139, -0.0481, -0.3125, 0.0762, 0.1719, -0.9297, -2.5625...]
步骤 2: [-0.1865, -0.0005, -0.3379, -0.2021, -0.0322, -0.0352, 0.7969, -0.3691...]
步骤 3: [-0.1216, -0.2109, 0.1533, -0.3262, 0.0020, -0.0332, 1.1328, -1.0156...]
步骤 4: [-0.1709, -0.1348, -0.2617, 0.0107, 0.1465, 0.0625, -0.7897, -0.5547...]
步骤 5: [-0.0645, -0.5000, -0.0366, -0.0220, -0.5117, 0.2520, -0.5859, -2.1875...]


| 测试项 | 结果 |
|---|---|
| NPU设备 | Ascend910 (2卡),Health: OK |
| torch_npu版本 | 2.9.0.post1+gitee7ba04 |
| CANN版本 | 8.5.1 |
| torch版本 | 2.9.0+cpu |
| 推理设备 | npu:0 |
| 模型加载 | ✅ 成功 |
| 推理运行 | ✅ 成功(0.37s) |
| 输出shape | torch.Size([1, 30, 32]) |
模型已在昇腾NPU (Ascend910) 上成功运行推理,输出30步×32维机器人动作序列。
torch_npu + transformers 4.57.1 框架,通过 MiBoTForActionGeneration 模型类在NPU上执行扩散模型推理。--image/--video 参数)。