Skip to content

datanizing/oreilly-finetuning-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

O'Reilly Live Course: Finetuning Open Source Large Language Models

Repository for the course with all material.

Presentation

The slides contain additional background and theroretical information.

Python setup

uv

If possible, work with uv. Clone the repository and run uv sync.

anaconda

Create an venv or conda environment and install the following packages:

  • ipykernel
  • ipython
  • ipywidgets
  • jupyter
  • tqdm
  • transformers
  • sentence-transformers
  • bitsandbytes
  • datasets
  • flash-attn
  • liger-kernel
  • peft
  • trl
  • unsloth

flash-attn should be installed with the option --no-build-isolation.

Of course, you can also Use the supplied requirements.txt, but some dependencies might be outdated.

runpod

You can also use runpod. uv is already preinstalled there.

Notebooks

You can either try to run the notebooks directly or try to follow how I run them and use it as a documentation (or run it later).

Classification

Similarity (embedding) finetuning

Generative model finetuning

Full finetune of a Qwen SLM with 700 million parameters

LoRA finetune of a Llama model with 1.7 billion parameters

LoRA finetune of a SmoLm model from Hugging Face

LoRA finetune of a Phi 3.5 model with ~ 4 billion parameters

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors