Installation Guide for Eagle2.5

October 25, 2025 ยท View on GitHub

Step 1: Create a New Conda Environment (If Docker not used)

Create an environment named eagle with Python 3.10:

conda create -n eagle python=3.10
conda activate eagle

Step 2: Install PyTorch and Flash Attention (If Docker not used; match your CUDA)

Install PyTorch and Flash Attention:

pip install torch==2.5.0 --index-url https://download.pytorch.org/whl/cu124
pip install flash-attn==2.4.2 --no-build-isolation

(optional) Flash-Attention 3 for Hopper

# Flash-Attention 3 for Hopper
git clone https://github.com/Dao-AILab/flash-attention
cd flash-attention/hopper
python setup.py install

Step 3: Install Eagle2.5

Clone and install:

# Clone the repository
git clone -b main --single-branch https://github.com/NVlabs/Eagle.git

# Navigate to the working directory and install
cd Eagle/Eagle2_5
pip install -e .

๐Ÿšจ Troubleshooting Common Issues

Transformers Installation

The project requires transformers==4.51.0 as specified in pyproject.toml. If you encounter issues installing this version, follow these steps:

  1. Remove the transformers dependency "transformers"==4.51.0 from pyproject.toml
  2. Install transformers manually using the following commands:
    git clone https://github.com/huggingface/transformers.git
    cd transformers
    git checkout 279c2e302ae4993986d6681c5885990c55eb5972
    pip install -e .
    
  • Error: ImportError: libGL.so.1: cannot open shared object file

    Fix by installing libgl1:

    sudo apt update
    sudo apt install libgl1
    

โœ… Setup complete! You're now ready to use Eagle2.5.