🚀 Pytorch Distributed native training library for LLMs/VLMs with OOTB Hugging Face support
📖 Documentation • 🔥 Ready-to-Use Recipes • 💡 Examples • Model Coverage • Performance • 🤝 Contributing
good first issue 또는 help wanted 이슈가 없습니다.
Follow the coding guidelines when adding or modifying code. Existing code is being refactored incrementally and may not yet comply. Agents must also follow AGENTS.md and applicable contributor skills.
Common workflows used for setting up Automodel environment:
The latest Automodel container can be found: here
The container can be run with the following docker command:
docker run --gpus all --network=host -it --rm --shm-size=32g nvcr.io/nvidia/nemo-automodel:26.10.00 /bin/bash
To sync local Automodel directory into the container, mount the local directory into /opt/Automodel and override the installed Automodel repository.
Example docker command:
docker run --gpus all --network=host -it --rm -v <local-Automodel-path>:/opt/Automodel --shm-size=32g nvcr.io/nvidia/nemo-automodel:26.10.00 /bin/bash
Within the container, cd into /opt/Automodel/ and update the pyproject.toml and uv.lock file by running the following command:
bash docker/common/update_pyproject_pytorch.sh /opt/Automodel
Finally, run uv sync to sync the container with the updated repository:
uv sync --locked --extra all --all-groups
[!WARNING] Ensure
bash docker/common/update_pyproject_pytorch.sh /opt/Automodelis executed. Without this command, uv sync will attempt to reinstalltorch. This leads to errors relating to CUDA version mismatch, TE import failures, etc. This work around is required as uv cannot recognize the torch installed in the PyTorch base container.
Uv sync and pip install are both supported in Automodel. Uv sync is the recommened path.
From the local Automodel directory run the following command:
uv sync --locked --extra all
The following optional dependencies are available, please see [project.optional-dependencies] section in pyproject.toml:
Example, installing vlm dependencies:
uv sync --locked --extra vlm
For developers building a custom docker container with Automodel, please refer to Automodel's Dockerfile.
If Nvidia PyTorch container is used as a base image, please review Developing with Automodel container.
The image includes a pinned Mixture-of-Kittens
build for GB200 (SM100) and GB300 (SM103). Pass --build-arg MOK_ARCH=SM100 or
--build-arg MOK_ARCH=SM103 to build for a single target. MoK recipes require
Blackwell GPUs; H100 GPUs are unsupported.
Outside the image, install it with MOK_ARCH=ALL uv sync --extra mok on Linux
with Python 3.12+, CUDA-enabled PyTorch 2.10+ and the matching CUDA 13 toolkit.
Use MOK_ARCH=SM100 or MOK_ARCH=SM103 for a single target. Run
uv cache clean mixture-of-kittens before switching architectures in an existing
installation, then add
--reinstall-package mixture-of-kittens to the sync command.
Command to build Automodel's Dockerfile:
# Set build arguments
export AUTOMODEL_INSTALL=all #(cuda, moe, vlm, ...)
export BASE_IMAGE=pytorch #(cuda, pytorch)
# Dependency install options [True, False]
export INSTALL_TE=True
docker build -f docker/Dockerfile \
--build-arg AUTOMODEL_INSTALL=$AUTOMODEL_INSTALL \
--build-arg BASE_IMAGE=$BASE_IMAGE \
--build-arg INSTALL_MAMBA=$INSTALL_MAMBA \
-t automodel --target=automodel_final .
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get install cudnn-cuda-12
pip install transformer-engine[pytorch]==2.8.0
# Flash-attn version should be selected to satisfy TE requirements
# https://github.com/NVIDIA/TransformerEngine/blob/v2.4/transformer_engine/pytorch/attention/dot_product_attention/utils.py#L108
pip install flash-attn==2.7.4.post1
We use uv for managing dependencies.
New required dependencies can be added by uv add $DEPENDENCY. If
pyproject.toml changes, update both lock files using the same flow as
Generate Uv lock. This updates
the default uv.lock, then updates the PyTorch-container lock file with the
override dependencies from docker/common/uv-pytorch.toml. The PyTorch helper
rewrites pyproject.toml for locking, so the commands below save and restore
your intended pyproject.toml contents:
The workflow can update lock files automatically for same-repository PRs. For PRs opened from forks, the workflow runs in check-only mode because it cannot push fixes back to the fork. If the fork check fails, run this lock update flow locally and include the generated lock files in your branch.
set -e
uv lock --check || uv lock
tmp_pyproject="$(mktemp)"
cp pyproject.toml "$tmp_pyproject"
mv uv.lock uv_main.lock
bash doc