| ## Setup |
| ### Installation |
| ```bash |
| # create and activate conda environment |
| conda create -n cua-lite python=3.10 -y |
| conda activate cua-lite |
| |
| # install pytorch with CUDA 12.4 (other pytorch/cuda versions should also work) |
| conda install cuda=12.4 -c nvidia |
| pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 \ |
| --index-url https://download.pytorch.org/whl/cu124 |
| |
| # install cua-lite package |
| pip install -e . |
| ``` |
|
|
| ### (optional) Slurm setup |
| For [Slurm](https://slurm.schedmd.com/) users, update [`scripts/train.slurm.sh`](/scripts/train.slurm.sh) for your cluster: |
| ```diff |
| - #SBATCH --partition=mllm_safety # Note: adjust this for your cluster |
| - #SBATCH --quotatype=spot # Note: adjust this for your cluster |
| + #SBATCH --partition=YOUR_PARTITION |
| + #SBATCH --quotatype=YOUR_QUOTATYPE |
| ``` |
| Next, create a directory for your job logs: |
| ```shell |
| mkdir logs |
| ``` |
| This folder will store the log files generated by your sbatch jobs. |
|
|