Local LLM fine-tuning: a practical example
summary
Concrete workflow for fine-tuning a local LLM: load metas lama 3.2.2 3B in Google Collab, attach Laura adapters (LoRA) via the ansloth package, prepare 100 cleaned Q/A examples converted to user/assistant tags, and run supervised fine-tuning for ~40 steps on a Tesla D4 GPU using TRL SFT. Less than 1% of params trainable, loss drops ~4→1, model exports to llama runner and is served through anything LLM, producing company-policy answers instead of generic guidance.
AI-written summary · about
chapters (16)
- 0:00Introduction and agenda
- 1:05Why fine-tune LLMs locally
- 2:31What is fine-tuning
- 3:58Tools and setup overview
- 5:00Downloading and initializing the model
- 6:06Adding LoRA adapters
- 7:12Testing the base model
- 8:37Preparing the dataset
- 10:21Formatting the training data
- 11:05Configuring the SFT trainer
- 12:10Training the model
- 13:14Starting the fine-tuning process
- 14:21Exporting the fine-tuned model
- 15:06Testing with Anything LLM
- 17:48Key takeaways and challenges
- 20:24Q&A session
related talks
31mCustomizing LLMs: A Guide to local Fine-Tuning...
39mThe Future is Fine-Tuned: Deploying Task-specific LLMs
21mFrom Data to Precision: Fine-Tuning LLMs for Proprietary Query Languages
30mTowards Clinically Grounded LLMs
09mTailoring Llama for Your Needs: Fine-Tuning & Evaluation
48mPracticalities of Fine-Tuning Llama 2 with AI Studio
40mInstructLab: Applying Open Source Methods to Building and Trai...
50mPimp My Llama - How to Customize LLMs for Your Business Case
