curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"uv venv ar1_venv
source ar1_venv/bin/activate
uv sync --activeThe model requires access to gated resources. Request access here:
Then authenticate:
hf auth loginGet your token at: https://huggingface.co/settings/tokens
NOTE: This script will download both some example data (relatively small) and the model weights (22 GB). The latter can be particularly slow depending on network bandwidth. For reference, it takes around 2.5 minutes on a 100 MB/s wired connection.
python src/alpamayo_r1/test_inference.pyIn case you would like to obtain more trajectories and reasoning traces, please feel free to change
the num_traj_samples=1 argument to a higher number (Line 60).
We provide a notebook with similar inference code at notebook/inference.ipynb.
alpamayo_r1_release/
├── notebook/
│ └── inference.ipynb # Example notebook
├── src/
│ └── alpamayo_r1/
│ ├── action_space/
│ │ └── ... # Action space definitions
│ ├── diffusion/
│ │ └── ... # Diffusion model components
│ ├── geometry/
│ │ └── ... # Geometry utilities and modules
│ ├── models/
│ │ ├── ... # Model components and utils functions
│ ├── __init__.py # Package marker
│ ├── config.py # Model and experiment configuration
│ ├── helper.py # Utility functions
│ ├── load_physical_aiavdataset.py # Dataset loader
│ ├── test_inference.py # Inference test script
├── pyproject.toml # Project dependencies
└── uv.lock # Locked dependency versions
The model uses Flash Attention 2 by default. If you encounter compatibility issues:
# Use PyTorch's scaled dot-product attention instead
config.attn_implementation = "sdpa"Apache License 2.0 - see LICENSE for details.
Alpamayo-R1 is a pre-trained reasoning model designed to accelerate research and development in the autonomous vehicle (AV) domain. It is intended to serve as a foundation for a range of AV-related use cases-from instantiating an end-to-end backbone for autonomous driving to enabling reasoning-based auto-labeling tools. In short, it should be viewed as a building block for developing customized AV applications.
Important notes:
- Alpamayo-R1 is provided solely for research, experimentation, and evaluation purposes.
- Alpamayo-R1 is not a fully fledged driving stack. Among other limitations, it lacks access to critical real-world sensor inputs, does not incorporate required diverse and redundant safety mechanisms, and has not undergone automotive-grade validation for deployment.
By using this model, you acknowledge that it is a research tool intended to support scientific inquiry, benchmarking, and exploration—not a substitute for a certified AV stack. The developers and contributors disclaim any responsibility or liability for the use of the model or its outputs.