├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Youssef Hosni 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hands-On-LLM-Fine-Tuning 2 | Hands-on tutorials on fine-tuning various LLMs using different fine-tuning techniques 3 | 4 | [![Substack](https://img.shields.io/badge/Substack-%23006f5c.svg?style=for-the-badge&logo=substack&logoColor=FF6719)](https://youssefh.substack.com/) 5 | [![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://medium.com/@yousefhosni) 6 | [![Kaggle](https://img.shields.io/badge/Kaggle-035a7d?style=for-the-badge&logo=kaggle&logoColor=white)](https://www.kaggle.com/youssef19) 7 | [![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?style=for-the-badge&logo=YouTube&logoColor=white)](https://www.youtube.com/@ToDataBeyond) 8 | 9 | ## Full Fine-Tunning ## 10 | * [Training GPT-2 From Scratch: A Step-by-Step Guide](https://medium.com/gitconnected/training-gpt-2-from-scratch-a-step-by-step-guide-844bb7fc5f94?sk=0253e805c4d3a262994cdfe2ca0029c7) 11 | 12 | ## Parameter Efficient Fine-Tuning (PEFT) ## 13 | * [Finetune Falcon-7b with LoRA: A Step-by-Step Guide](https://medium.com/gitconnected/finetune-falcon-7b-with-lora-a-step-by-step-guide-cd11b06f5ef5?sk=443a96715dea7b1810911124c4ea04c2) 14 | 15 | ## Instruction Fine-Tunning ## 16 | * [Instruction Fine-Tuning FLAN-T5 Large Language Models for Summarization: Step-by-Step Guide](https://medium.com/towards-artificial-intelligence/instruction-fine-tuning-large-language-models-for-summarization-step-by-step-guide-bb1e13a2f9cb?sk=edfd12cd43006dcbd2db906c6c44c5b1) 17 | * [Instruction Fine-Tuning LLM using SFT for Financial Sentiment: A Step-by-Step Guide](https://medium.com/towards-artificial-intelligence/instruction-fine-tuning-llm-using-sft-for-financial-sentiment-a-step-by-step-guide-f93c4aa0153a?sk=7cc18ab6e32ecbe608432f17094b69ac) 18 | 19 | ## Reasoning Fine-Tunning ## 20 | * [Fine-Tuning DeepSeek R1 on Reasoning Task with Unsloth [Part 1]](https://open.substack.com/pub/youssefh/p/fine-tuning-deepseek-r1-on-reasoning?r=1sqbmi&utm_campaign=post&utm_medium=web&showWelcomeOnShare=false) 21 | * [Fine-Tuning DeepSeek R1 on Reasoning Task with Unsloth [Part 2]](https://open.substack.com/pub/youssefh/p/fine-tuning-deepseek-r1-on-reasoning-2d2?r=1sqbmi&utm_campaign=post&utm_medium=web&showWelcomeOnShare=false) 22 | * [Gemma 3 Financial Reasoning Fine-Tuning](https://open.substack.com/pub/youssefh/p/gemma-3-fine-tuning-crash-course?r=1sqbmi&utm_campaign=post&utm_medium=web&showWelcomeOnShare=false) 23 | * [Gemma 3 Medical Reasoning Fine-Tuning](https://open.substack.com/pub/youssefh/p/gemma-3-reasoning-fine-tuning-crash?r=1sqbmi&utm_campaign=post&utm_medium=web&showWelcomeOnShare=false) 24 | * [Gemma 3 Reasoning Fine-Tuning with GRPO [Part 1] ](https://open.substack.com/pub/youssefh/p/gemma-3-reasoning-fine-tuning-with?r=1sqbmi&utm_campaign=post&utm_medium=web&showWelcomeOnShare=false) 25 | * [Gemma 3 Reasoning Fine-Tuning with GRPO [Part 2] ](https://open.substack.com/pub/youssefh/p/gemma-3-reasoning-fine-tuning-with-4a0?r=1sqbmi&utm_campaign=post&utm_medium=web&showWelcomeOnShare=false) 26 | * [Qwen 3 Mathematical Reasoning Fine Tuning with GRPO Technique #1](https://open.substack.com/pub/youssefh/p/qwen-3-mathematical-reasoning-fine?r=1sqbmi&utm_campaign=post&utm_medium=web&showWelcomeOnShare=false) 27 | * [Qwen 3 Mathematical Reasoning Fine Tuning with GRPO Technique #2](https://open.substack.com/pub/youssefh/p/qwen-3-mathematical-reasoning-fine-221?r=1sqbmi&utm_campaign=post&utm_medium=web&showWelcomeOnShare=false) 28 | 29 | ## Fine-Tunning Frameworks ## 30 | * [Fine-Tuning Mistral 7B with Hugging Face AutoTrain to Generate Better Midjourney Prompts](https://medium.com/gitconnected/fine-tuning-mistral-7b-with-hugging-face-autotrain-to-generate-better-midjourney-prompts-fb96057c138a?sk=84ab8c1c81987290333d482d285ed0fd) 31 | --------------------------------------------------------------------------------