Skip to content

Fine-tune open-source LLM on an instruction dataset

Notifications You must be signed in to change notification settings

petermchale/fine-tune-llm

Repository files navigation

Parameter-efficient fine-tuning an open-source 7B-parameter LLM for instruction following

I fine-tuned a 7B LLM on a public instruction dataset using LoRA for 0.5 epochs over 5 hours on a single-GPU g4dn.xlarge EC2 instance.

Due to the size of the LLM, I had to increase the volume size of the EC2 instance:

(pytorch) du -hs .cache/huggingface/hub/models--Salesforce--xgen-7b-8k-base
26G     .cache/huggingface/hub/models--Salesforce--xgen-7b-8k-base

The training code uses the torch, transformers, peft and trl libraries. See requirements.txt.

The training run is tracked here and the fine-tuned model adaptors are available here.

Credit

https://www.youtube.com/watch?v=JNMVulH7fCo

About

Fine-tune open-source LLM on an instruction dataset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published