If you need additional features like , SentencePiece , or the Transformer Engine , use the following command for a complete setup:
Are you planning to run or fine-tuning , and do you have a specific GPU cluster configuration in mind? Installation — Megatron Core - NVIDIA Documentation Download Install Megatron Repo zip
Before installing the repository, verify that your environment includes the following essential software and hardware components: If you need additional features like , SentencePiece
uv pip install --group build uv pip install --no-build-isolation -e ".[training,dev]" Use code with caution. Copied to clipboard Step 1: Install uv (if not already present):
NVIDIA recommends using the package manager for a faster, more reliable installation. Step 1: Install uv (if not already present): curl -LsSf https://astral.sh/uv/install.sh | sh Use code with caution. Copied to clipboard
docker run --ipc=host --shm-size=512m --gpus all -it nvcr.io/nvidia/pytorch:24.02-py3 Use code with caution. Copied to clipboard
While developers typically use git clone , you can manually download the repository: Navigate to the NVIDIA Megatron-LM GitHub . Click the green button and select Download ZIP . Extract the ZIP file to your desired directory: unzip Megatron-LM-main.zip cd Megatron-LM-main Use code with caution. Copied to clipboard 3. Installation Steps