This project involves fine-tuning Llama3 8b to generate JSON formats for arithmetic questions and further post-process the output to perform calculations. This method incorporates the latest fine-tuning techniques such as Qlora, Unsloth, and PEFT. It enables faster training speeds and requires fewer computational resources.
PS: You need a T4 (16GB) GPU to run the code.
Colab Live code: https://drive.google.com/file/d/1NsSS1_M3pNAbkiBnPB3k5JKIkEQg3XNX/view?usp=sharing
- Download all the files in this repo.
- Run
Load_model.py
to load library and Llama3 8b. - Run
Prepare_data.py
to loadfunction_call.jsonl
dataset and prepare dataset. - Run
Fine_tuning.py
- Run
Inference_n_save.py
to test the fine-tuned models and save the model.
This is part of my research study in The University of Chicago. The data is come from: https://github.com/rohanbalkondekar/finetune_llama2