Loading repository data…
Loading repository data…
c4dt / repository
Jupyter notebooks for the LLM fine-tuning pitfalls hands-on workshop
This repository contains the exercises of the Center for Digital Trust (C4DT)'s workshop "Pitfalls in finetuning LLMs" in the summer 2024.
The slides for the morning presentation are here: Morning Presentation
You can find the slides for the exercises here: Afternoon Slides
The repository contains 3 notebooks with exercises:
It also contains 2 modules (share.py and evaluation.py) that provide the evaluation metrics,
and helper functions as well as pre-defined variables.
The following metrics are used:
The repository also contains a notebook with the results of the benchmarks we evaluated:
Llama 2 [11] is used for the evaluation and finetuning. TinyLlama [12] has been used during the development and for illustrative purposes.
We used 3 datasets:
and created an additional dataset based on the identity-shifting examples in [1].
To reproduce the results in [2], we added 50 additional with the canary to [5]. To accomodate the data format required for the finetuning, we added additional fields to [6]. [7] has been used as is.
The script prepare.py contains the code used for the dataset preparation.
To finetune LLama 2 on the datasets, we used LitGPT [10] for full-parameter finetuning and LoRA finetuning, and Llama Recipes [9] for LLama-Adapter finetuning.