Finetuning

March 19, 2024 · View on GitHub

We provide a simple training scripts (litgpt/finetune/*.py) that instruction-tunes a pretrained model on the Alpaca dataset. For example, you can either use

LoRA (Hu et al. 2021):

litgpt finetune lora

or Adapter (Zhang et al. 2023):

litgpt finetune adapter

or Adapter v2 (Gao et al. 2023):

litgpt finetune adapter_v2

The finetuning requires at least one GPU with ~12 GB memory (RTX 3060).

It is expected that you have downloaded the pretrained weights as described above. More details about each finetuning method and how you can apply it to your own data can be found in our technical how-to guides.

Finetuning how-to guides

These technical tutorials illustrate how to run the finetuning code.

 

Understanding finetuning -- conceptual tutorials

Looking for conceptual tutorials and explanations? We have some additional articles below: