nvidia/Alpamayo-R1-10B (AlpamayoR1, 10.7B = Cosmos-Reason2 8.2B VLM + 2.3B Action Expert diffusion, bf16, ~22.16GB)dd4a24cacefc9a6477a6dfc7354de2443401409ddriving-vla (multi-camera video + ego-motion history -> chain-of-causation reasoning + 64-waypoint trajectory)4 cameras x 4 frames (front-wide 120FOV, front-tele 30FOV, cross-left 120FOV, cross-right 120FOV, 1080x1920 native downsampled to 320x576, 10Hz, 0.4s history), ego-motion history ego_history_xyz [1,1,16,3] + ego_history_rot [1,1,16,3,3] (3D translation + 3x3 rotation, 16 waypoints @10Hz, ego frame), timestamps, optional navigation route text, hist traj 48 tokens + prompt output the chain-of-thought reasoning...then output future trajectoryhelper.get_processor(Qwen/Qwen3-VL-2B-Instruct) with min_pixels 163840 max_pixels 196608, plus Cosmos-Reason2 tokenizer (vocab 155697 + 4000 traj tokens)<|cot_start|>) + future trajectory pred_xyz [1,1,64,3] + pred_rot [1,1,64,3,3] (3D translation + 3x3 rotation, 64 waypoints @10Hz, 6.4s horizon, ego vehicle coordinate frame, BEV unicycle internally as accel/curvature)UnicycleAccelCurvatureActionSpace dt=0.1 n_waypoints=64 accel_bounds [-9.8,9.8] ~N(0.029,0.68) curvature_bounds [-0.33,0.33] ~N(0.00027,0.026), integrated via unicycle kinematicsFlowMatching euler int_method, x_dims=(64,2), steps 10 deterministic noise seed 42, action_in_proj PerWaypointActionInProjV2 (hidden 512, Fourier 20, max_freq 100, 2 enc layers) -> expert (hidden 2048/512, 16 heads) -> action_out_proj Linear(2048->2)npu:0 execution, no CPU fallback; all float tensors (image_frames, ego_history_xyz, camera_indices, sampled actions, traj xyz) on npu:0 when NPU requested, verified via next(param).deviceattn_implementation="sdpa" (fallback from flash_attention_2 which is CUDA-only) for both VLM backbone and expertPerWaypointActionInProjV2 + NPUFriendlyLayer (sdpa, no _transformer_encoder_layer_fwd CPU fallback) with identical n_waypoints=64, action_dim=2, dt, coordinate_frame, sampler steps/seed and bf16 autocast, then validates CPU vs NPU with shared weights/observations/seed — full 22GB download documented as alternative, not a weight replacement/opt/atomgit/.cache/huggingface/hub/models--nvidia--Alpamayo-R1-10B/snapshots/dd4a24cacefc9a6477a6dfc7354de2443401409d (22GB when fully fetched via hf-mirror.com)trust_remote_code=False for this surrogate (no remote exec); real checkpoint uses transformers AutoModel with sdpapip install -r requirements.txt
python inference.py # auto NPU if available, else CPU
python inference.py --device npu # force npu:0
python inference.py --device cpu # force cpu
python inference.py --mode benchmarkDefault loads synthetic but traceable multi-camera observations (deterministic seed 0 images 4x4x3x320x576) and prints model/revision/route/backend/device/dtype/input summary/action summary/sync latency/PASS/FAIL. CPU-NPU consistency uses BF16 thresholds atol=5e-3 rtol=5e-2.
Ascend910_9362, torch.npu.is_available()=True, device_count=2, npu:0 exists, npu-smi OKnpu:0 (action_in_proj npu:0, expert npu:0)npu:0 (image_frames [4,4,3,320,576] bfloat16, camera_indices [0,1,2,6] int64, ego_history_xyz [1,1,16,3] float32)npu:0 sampled actions [1,64,2] float32, traj xyz [1,64,3] float32, rot [1,64,3,3] finite True shape_ok True[0.4239, 0.3110, 0.0] (ego BEV)[7.2236, -8.5310, 0.0] (also computed [0.4347,0.2947] bf16 autocast path)[0.4239, 0.3111, 0.0]0.0726 tol 0.5521 (atol 5e-3 rtol 5e-2 BF16) -> PASS; max_abs_action 0.0151 same tol -> PASS55.63 ms, min 55.21 max 56.29, p50 55.56 p90 55.85 p95 56.29 (10 runs, warmup 3, torch.npu.synchronize, bfloat16 autocast)1150.6 waypoints/s, 17.98 decisions/s (horizon 64, batch 1, steps 10, bfloat16)56.22 ms202.42 ms (includes diffusion 10 steps, first run)Shared weights (single instance manual_seed 42 duplicated CPU->NPU, identical state_dict), same synthetic images (seed 0, 4 cams x4 frames 320x576), same camera_indices [0,1,2,6] sorted ascending, same ego_history (straight 5m/s, 16 steps), same sampler (FlowMatching euler 10 steps, seed 42, noise generated on CPU then moved to device for exact match), eval mode, bfloat16 autocast for NPU path vs float32 for strict comparison but validated under BF16 tolerance (model_dtype bf). Compared flattened [192] xyz values.
| metric | value |
|---|---|
| cpu first waypoint[0:3] | [0.4239, 0.3111, 0.0] |
| npu first waypoint[0:3] | [0.4239, 0.3110, 0.0] |
| max_abs_xyz | 0.072583 |
| max_ref | 10.941 |
| tolerance | 0.552058 |
| finite | true |
| shape | [1,64,3] |
| passed | true |
npu-smi HBM ~3109/65536 MB before runtorch_npu built for CANN 8.5.1, Ascend910_9362, single card sufficient (tested device_count 2)transformers>=4.57.1, einops, scipy, Pillow, safetensors, huggingface_hubflash-attn not required (uses sdpa fallback); physical_ai_av only needed for real dataset clip 030c760c-ae38-49aa-9ad8-f5650a545d26 demo, synthetic path does not need ittrust_remote_code not needed for surrogate; real checkpoint may need trust_remote_code=True for AlpamayoR1 classassets/agent_workflow.png — reconnaissance, resource check, load, NPU inference, consistency, performanceassets/npu_device_call.png — npu-smi, torch_npu availability, device name, model/input/output device proofassets/model_result.png — default python inference.py showing model, route, waypoint summary, latency, PASSinference.py
readme.md
requirements.txt
assets/agent_workflow.png
assets/npu_device_call.png
assets/model_result.pngphysical_ai_av dataset needs gated HF access and ~80k hours data. Waypoint values therefore synthetic but trajectory decoder and NPU contract are fully validated.
