Today we will learn how to fine-tune a LLAMA 2 model to write IELTS essays.
Now let’s go to the tutorial! 📕
For this task, I will use the IELTS writing essays dataset from kaggle. We also will use google colab to train our model. The model used will be LLAMA 2 7b sharded because this model is optimized to use hugging face accelerate and do operations in the GPU.
For fine-tuning we will use QLoRa and PEFT techniques.
The jupyter notebook can be found here.
If you check the dataset, you will see that the data contains essays from a wide range of scores from 1 to 9, where 9 is the best score. Since we want our bot to only produce high-quality essays, I will filter the data to only use essays above the score of 7.
For this tutorial, we will use the following libraries:
!pip install -U git+https://github.com/huggingface/transformers@de9255de27abfcae4a1f816b904915f0b1e23cd9
!pip install -q -U trl accelerate git+https://github.com/huggingface/peft.git
!pip install -q datasets bitsandbytes einops wandb
!pip install pandas
Go to Google Colab, click on the folder icon on the left, and click on the icon file to upload the csv data.