We recommend using the latest release of NGC's PyTorch container.
First, pull the Docker image (please replace xx.xx
with the actual version number):
docker pull nvcr.io/nvidia/pytorch:xx.xx-py3
docker run --gpus all -it --rm -v /path/to/FT-with-LoRA:/workspace/FT-with-LoRA -v /path/to/models:/models nvcr.io/nvidia/pytorch:xx.xx-py3
Install Requirements
cd FT-with-LoRA
pip install -r requirements.txt
After installation, there are several possible workflows. The most comprehensive is:
- Data download and preprocessing
- Finetuning with LoRA
- Downstream task evaluation or text generation
- Plot results
Download pCLUE data:
cd data
bash downloadpClUE.sh
Preprocess the data:
cd data
bash preprocess.sh
Run the following command to finetune:
bash run_peft_ds.sh
Run the following command to evaluate:
bash eval.sh
Run the following command to plot the results:
python plotResult.py