Skip to content

Latest commit

 

History

History

llm-finetuning

LLM Finetuning using HuggingFace + Determined

In this demo, we finetune the TinyLlama-1.1B-Chat on a text-to-SQL dataset. We ran this on two 80 GB A100 GPUs.

To get started, first install Determined on your local machine:

pip install determined

Then finetune:

det e create distributed.yaml . 

Change configuration options in distributed.yaml. Some important options are:

  • slots_per_trial: the number of GPUs to use.
  • dataset_subset: the difficulty subset to train on.
  • per_device_train_batch_size: the batch size per GPU.

Test your model's generation capabilities:

python test_model.py --exp_id <exp_id> --dataset_subset <dataset_subset>

Where

  • <exp_id> is the id of your finetuning experiment in the Determined UI.
  • <dataset_subset> is one of "easy", "medium", or "hard".

To test the pretrained model (not finetuned), leave out --exp_id. For example:

python test_model.py --dataset_subset easy

Contributors