## Installation
Step 1: Please first follow the installation instruction of [Large-DiT-ImageNet](https://github.com/Alpha-VLLM/LLaMA2-Accessory/tree/main/Large-DiT-ImageNet). We use ``cuda-12.1`` and ``gcc 9.4.0``.

Step 2: Install relevant packages
- replace fairscale with our modified package
    cd fairscale
    pip install -e .

Step 3: Training
- To train the model, please run the following command:
    bash train.sh

Step 4: Extract ternary checkpoints
- To extract the ternary checkpoints, please run the following command:
    python save_ternary_ckpt.py

