Fine-Tuning Llama 3 on a Custom Dataset: Training LLM for a RAG Q&A Use Case on a Single GPU
5,163
Published 2024-07-01
Model on HF: huggingface.co/curiousily/Llama-3-8B-Instruct-Fina…
Philipp Schmid Post: www.philschmid.de/fine-tune-llms-in-2024-with-trl
Follow me on X: twitter.com/venelin_valkov
AI Bootcamp: www.mlexpert.io/bootcamp
Discord: discord.gg/UaNPxVD6tv
Subscribe: bit.ly/venelin-subscribe
GitHub repository: github.com/curiousily/AI-Bootcamp
👍 Don't Forget to Like, Comment, and Subscribe for More Tutorials!
00:00 - Why fine-tuning?
00:25 - Text tutorial on MLExpert.io
00:53 - Fine-tuning process overview
02:19 - Dataset
02:56 - Lllama 3 8B Instruct
03:53 - Google Colab Setup
05:30 - Loading model and tokenizer
08:18 - Create custom dataset
14:30 - Establish baseline
17:37 - Training on completions
19:04 - LoRA setup
22:25 - Training
26:42 - Load model and push to HuggingFace hub
28:43 - Evaluation (comparing vs the base model)
32:50 - Conclusion
Join this channel to get access to the perks and support my work:
youtube.com/channel/UCoW_WzQNJVAjxo4osNAxd_g/join
#llama3 #llm #rag #finetuning #promptengineering #chatgpt #chatbot #langchain #gpt4
All Comments (6)
-
Full-text tutorial (requires MLExpert Pro): www.mlexpert.io/bootcamp/fine-tuning-llama-3-llm-f… What performance did you get with your fine-tuned model?
-
I trained it with 2 epochs and the result was amazing! Nice explanation btw!!
-
Great stuff as usual. Very useful info!
-
Im looking for this ❣️
-
Can we fine tune to 2bit model ?