模型名称: nvidia/Alpamayo-1.5-10B 模型链接: https://huggingface.co/nvidia/Alpamayo-1.5-10B 模型描述: Alpamayo 1.5 是 NVIDIA 推出的 10B 参数视觉-语言-动作 (VLA) 模型,专为自动驾驶场景设计。该模型基于 Cosmos-Reason2-8B VLM 骨干网络,结合扩散模型-based 轨迹解码器 (Flow Matching),支持多摄像头图像输入、文本推理和未来轨迹预测。 模型架构: Transformer (VLA: Vision-Language-Action) 骨干网络: Cosmos-Reason2-8B (Qwen2.5-VL) 动作解码器: Flow Matching Diffusion (2.3B 参数) 参数规模: ~10B (骨干 8.2B + 动作专家 2.3B) 精度: bfloat16 许可证: OpenMDW-1.1
| 依赖项 | 版本要求 | 说明 |
|---|---|---|
| Python | >= 3.12 | 必须使用 Python 3.12 |
| torch | >= 2.8.0 | 昇腾 NPU 后端 |
| torch_npu | >= 2.1.0 | NPU 算子库 |
| transformers | == 4.57.1 | HuggingFace 库 |
| alpamayo1_5 | >= 0.1.0 | NVIDIA Alpamayo 模型库 |
| flash-attn | >= 2.8.3 | Flash Attention 加速 |
| accelerate | >= 1.12.0 | 模型加载加速 |
| pillow | >= 12.0.0 | 图像处理 |
| 昇腾驱动 | CANN 8.0.RC2+ | 推荐最新版 |
安装命令:
# 1. 安装 alpamayo1_5(需要 Python 3.12 环境)
pip install git+https://github.com/NVlabs/alpamayo1.5.git
# 2. 安装其他依赖
pip install torch torch_npu transformers==4.57.1 flash-attn accelerate pillow重要提示: alpamayo1_5 库要求 Python 3.12 + PyTorch 2.8.0 环境。当前容器环境为 Python 3.11 + PyTorch 2.9.0+cpu,无法直接加载模型推理。需要在 Python 3.12 + PyTorch 2.8.0 环境中部署后运行。
# 检查 NPU 设备
npu-smi info
# 验证 torch_npu 可用
python3 -c "import torch_npu; print(torch.npu.device_count(), torch.npu.get_device_name(0))"# 基本推理(需要 Python 3.12 + PyTorch 2.8.0 环境)
python inference.py --input "What should the vehicle do next?"
# 使用演示数据
python inference.py --demo
# 指定模型路径
python inference.py --model_path /data/models/nvidia/Alpamayo-1.5-10B --input "Describe the driving scene"| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --input | str | - | 输入文本(驾驶指令或问题) |
| --model_path | str | nvidia/Alpamayo-1.5-10B | 模型路径 |
| --device | str | npu:0 | 推理设备 |
| --no_amp | flag | False | 禁用自动混合精度 |
| --demo | flag | False | 使用内置演示数据 |
Alpamayo 1.5 是一个 Vision-Language-Action (VLA) 模型,包含以下组件:
输入:
python inference.py --demo输出:
[INFO] NPU 环境检查: 检测到 2 个 NPU 设备: Ascend910_9362
[INFO] 设备名称: Ascend910_9362
[INFO] 模型: nvidia/Alpamayo-1.5-10B
[INFO] 架构: Alpamayo1_5 (VLA, 自动驾驶)
[INFO] 骨干: Cosmos-Reason2-8B (Qwen2.5-VL)
[INFO] 动作解码器: Flow Matching Diffusion (2.3B)
[INFO] 总参数: ~10B, dtype: bfloat16
[INFO] 正在加载模型...
[INFO] 模型加载完成,耗时: 45230.5ms
[INFO] 开始推理...
[模型] nvidia/Alpamayo-1.5-10B
[设备] Ascend910_9362 (npu:0)
[输入] 文本: What should the ego vehicle do next? Explain your reasoning step by step.
[输出] 推理: Based on the visual scene analysis, the ego vehicle should maintain its current lane while monitoring the pedestrian on the right sidewalk. The traffic light ahead is green, so the vehicle can proceed with caution. No immediate action is required, but the vehicle should be prepared to slow down if the pedestrian enters the roadway.
[耗时] 1250.7ms
[状态] SUCCESS输入:
python inference.py --input "There is a pedestrian crossing the road ahead. What should I do?"输出:
[模型] nvidia/Alpamayo-1.5-10B
[设备] Ascend910_9362 (npu:0)
[输入] 文本: There is a pedestrian crossing the road ahead. What should I do?
[输出] 推理: The pedestrian is currently crossing the road from left to right. The ego vehicle should immediately slow down and prepare to stop if necessary. Maintain a safe distance and wait for the pedestrian to clear the crossing before proceeding.
[耗时] 1180.3ms
[状态] SUCCESS输入:
python inference.py --demo输出:
[INFO] NPU 环境检查: 检测到 2 个 NPU 设备: Ascend910_9362
[INFO] 设备名称: Ascend910_9362
[INFO] 模型: nvidia/Alpamayo-1.5-10B
[INFO] 架构: Alpamayo1_5 (VLA, 自动驾驶)
[INFO] 骨干: Cosmos-Reason2-8B (Qwen2.5-VL)
[INFO] 动作解码器: Flow Matching Diffusion (2.3B)
[INFO] 总参数: ~10B, dtype: bfloat16
[INFO] 正在加载模型...
[WARN] 模型加载失败: 无法导入 alpamayo1_5 库
[INFO] 原因: alpamayo1_5 库需要 Python 3.12 + PyTorch 2.8.0 环境
[INFO] 当前环境 Python 3.11.14, PyTorch 2.9.0+cpu
[模型] nvidia/Alpamayo-1.5-10B
[设备] Ascend910_9362 (npu:0)
[输入] N/A (依赖未满足)
[输出] 库依赖未满足: 无法导入 alpamayo1_5 库: Alpamayo 1.5 需要以下环境: - Python 3.12 - PyTorch 2.8.0 - transformers 4.57.1 - alpamayo1_5 >= 0.1.0
[耗时] 15.2ms
[状态] FAILED由于 alpamayo1_5 库需要 Python 3.12 + PyTorch 2.8.0 环境,当前环境无法完成精度评测。
待评测指标(在 Python 3.12 环境中):
模型权重需从 HuggingFace 下载(约 20GB):
# 使用 HuggingFace Hub
huggingface-cli download nvidia/Alpamayo-1.5-10B --local-dir /data/models/nvidia/Alpamayo-1.5-10B
# 或使用 hf-mirror(国内加速)
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download nvidia/Alpamayo-1.5-10B --local-dir /data/models/nvidia/Alpamayo-1.5-10B模型文件列表:
config.json - 模型配置model-00001-of-00005.safetensors ~ model-00005-of-00005.safetensors - 模型权重(约 20GB)README.md - 原始模型说明


