You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A hands-on collection of 23 notebooks covering LLM fine-tuning (LoRA, QLoRA, PEFT, RLHF), Retrieval-Augmented Generation (RAG), knowledge graphs, quantization, and LLM evaluation — all runnable on Google Colab.
Fine-tune models like Llama 2, Mistral 7B, Falcon 7B, Gemma 2 9B, Phi-1.5, GPT-NeoX 20B, MPT-30B, Bloom, OPT, Vicuna, and GPT-3.5 Turbo using Hugging Face Transformers, TRL, Unsloth, AutoTrain, bitsandbytes, LangChain, Neo4j, and MLflow.
📂 Repository Structure
LLM-Finetuning/
├── fine-tuning/ # Supervised fine-tuning with LoRA, QLoRA, PEFT & more
├── rlhf/ # Reinforcement Learning from Human Feedback
├── rag/ # Retrieval-Augmented & Cache-Augmented Generation
├── knowledge-graphs/ # Knowledge graph construction & graph-based QA
├── quantization/ # Extreme (1-bit / 2-bit) quantization
└── evaluation/ # LLM & RAG pipeline evaluation with MLflow
🔧 Fine-Tuning
Notebook
Description
Colab
Efficiently Train LLMs with LoRA and Hugging Face
Efficient training of large language models using LoRA and Hugging Face.
Fine-Tune Your Own Llama 2 Model in Colab
Step-by-step guide to fine-tuning your own Llama 2 model in a Colab notebook.
Guanaco Chatbot Demo with LLaMA-7B
Chatbot demo powered by the LLaMA-7B model fine-tuned on the Guanaco dataset.
PEFT Fine-Tune Bloom-560m Tagger
Parameter-efficient fine-tuning of Bloom-560m for tagging tasks.
Fine-Tune Meta OPT-6.1b with bitsandbytes + PEFT
Fine-tuning the Meta OPT-6.1b model with 8-bit quantization and PEFT.
Fine-Tune Falcon-7b with BNB Self-Supervised Training
Fine-tuning Falcon-7b using bitsandbytes self-supervised training.
Fine-Tune Llama 2 with QLoRA
Fine-tuning the Llama 2 7B model using the PEFT library and the QLoRA method.
Stable Vicuna 13B 8-bit in Colab
Fine-tuning and running Stable Vicuna 13B in 8-bit precision.
GPT-NeoX-20B 4-bit Training
Training the GPT-NeoX-20B model using 4-bit quantization with bitsandbytes.
MPT-Instruct-30B Model Training
Training MosaicML's MPT-Instruct-30B for instruction following, QA and text generation.
Fine-Tune Microsoft Phi-1.5b on a Custom Dataset
SFT training of Microsoft Phi-1.5b on the DialogStudio dataset with TRL.
Fine-Tune OpenAI GPT-3.5 Turbo
Fine-tuning GPT-3.5 Turbo on your own data via the OpenAI fine-tuning API.
Fine-Tune Mistral 7B Using AutoTrain
Fine-tuning Mistral 7B with the AutoTrain-Advanced library.