{"id":14964548,"url":"https://github.com/ashishpatel26/llm-finetuning","last_synced_at":"2025-05-14T06:11:45.915Z","repository":{"id":173555186,"uuid":"650918061","full_name":"ashishpatel26/LLM-Finetuning","owner":"ashishpatel26","description":"LLM Finetuning with peft","archived":false,"fork":false,"pushed_at":"2025-02-18T07:44:54.000Z","size":3777,"stargazers_count":2412,"open_issues_count":4,"forks_count":651,"subscribers_count":34,"default_branch":"main","last_synced_at":"2025-04-11T16:35:55.873Z","etag":null,"topics":["falcon","fine-tuning","huggingface","llama","llama2","llm","llms","lora","peft","pytorch","text-generation"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashishpatel26.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-08T05:11:00.000Z","updated_at":"2025-04-11T16:13:04.000Z","dependencies_parsed_at":"2023-09-27T12:03:56.461Z","dependency_job_id":"b905bae3-b4a1-4fdc-a39c-7fd3232fda9a","html_url":"https://github.com/ashishpatel26/LLM-Finetuning","commit_stats":{"total_commits":45,"total_committers":1,"mean_commits":45.0,"dds":0.0,"last_synced_commit":"4d646d65763069621d580dd795559711cba3a4c6"},"previous_names":["ashishpatel26/llm-finetuning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishpatel26%2FLLM-Finetuning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishpatel26%2FLLM-Finetuning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishpatel26%2FLLM-Finetuning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishpatel26%2FLLM-Finetuning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashishpatel26","download_url":"https://codeload.github.com/ashishpatel26/LLM-Finetuning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248441417,"owners_count":21103989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["falcon","fine-tuning","huggingface","llama","llama2","llm","llms","lora","peft","pytorch","text-generation"],"created_at":"2024-09-24T13:33:21.869Z","updated_at":"2025-04-11T16:36:00.153Z","avatar_url":"https://github.com/ashishpatel26.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLM-Finetuning\n\n# PEFT Fine-Tuning Project 🚀\n\nWelcome to the PEFT (Pretraining-Evaluation Fine-Tuning) project repository! This project focuses on efficiently fine-tuning large language models using LoRA and Hugging Face's transformers library.\n\n![](https://huggingface.co/datasets/trl-internal-testing/example-images/resolve/main/images/trl_overview.png)\n\n## Fine Tuning Notebook Table 📑\n\n| Notebook Title                                                                                               | Description                                                                                                                                                                                   | Colab Badge                                                                                                                                                                                                                         |\n| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **1. Efficiently Train Large Language Models with LoRA and Hugging Face**                              | Details and code for efficient training of large language models using LoRA and Hugging Face.                                                                                                 | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/1.Efficiently_train_Large_Language_Models_with_LoRA_and_Hugging_Face.ipynb) |\n| **2. Fine-Tune Your Own Llama 2 Model in a Colab Notebook**                                            | Guide to fine-tuning your Llama 2 model using Colab.                                                                                                                                          | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/2.Fine_Tune_Your_Own_Llama_2_Model_in_a_Colab_Notebook.ipynb)               |\n| **3. Guanaco Chatbot Demo with LLaMA-7B Model**                                                        | Showcase of a chatbot demo powered by LLaMA-7B model.                                                                                                                                         | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/3.Guanaco%20Chatbot%20Demo%20with%20LLaMA-7B%20Model.ipynb)                 |\n| **4. PEFT Finetune-Bloom-560m-tagger**                                                                 | Project details for PEFT Finetune-Bloom-560m-tagger.                                                                                                                                          | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/4.PEFT%20Finetune-Bloom-560m-tagger.ipynb#scrollTo=MDqJWba-tpnv)            |\n| **5. Finetune_Meta_OPT-6-1b_Model_bnb_peft**                                                           | Details and guide for finetuning the Meta OPT-6-1b Model using PEFT and Bloom-560m-tagger.                                                                                                    | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/5.Finetune_Meta_OPT-6-1b_Model_bnb_peft.ipynb)                              |\n| **6.Finetune Falcon-7b with BNB Self Supervised Training**                                             | Guide for finetuning Falcon-7b using BNB self-supervised training.                                                                                                                            | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/6.Finetune%20Falcon-7b%20with%20BNB%20Self%20Supervised%20Training.ipynb)   |\n| **7.FineTune LLaMa2 with QLoRa**                                                                       | Guide to fine-tune the Llama 2 7B pre-trained model using the PEFT library and QLoRa method                                                                                                   | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/7.FineTune_LLAMA2_with_QLORA.ipynb)                                         |\n| **8.Stable_Vicuna13B_8bit_in_Colab**                                                                   | Guide of Fine Tuning Vecuna 13B_8bit                                                                                                                                                          | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/8.Stable_Vicuna13B_8bit_in_Colab.ipynb)                                     |\n| **9. GPT-Neo-X-20B-bnb2bit_training**                                                                  | Guide How to train the GPT-NeoX-20B model using bfloat16 precision                                                                                                                            | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/9.GPT-neo-x-20B-bnb_4bit_training.ipynb)                                    |\n| **10. MPT-Instruct-30B Model Training**                                                                | MPT-Instruct-30B is a large language model from MosaicML that is trained on a dataset of short-form instructions. It can be used to follow instructions, answer questions, and generate text. | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/10.MPT_Instruct_30B.ipynb)                                                  |\n| **11.RLHF_Training_for_CustomDataset_for_AnyModel**                                                    | How train a Model with RLHF training on any LLM model with custom dataset                                                                                                                     | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/11_RLHF_Training_for_CustomDataset_for_AnyModel.ipynb)                      |\n| **12.Fine_tuning_Microsoft_Phi_1_5b_on_custom_dataset(dialogstudio)**                                  | How train a model with trl SFT Training on Microsoft Phi 1.5 with custom                                                                                                                      | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/12_Fine_tuning_Microsoft_Phi_1_5b_on_custom_dataset(dialogstudio).ipynb)    |\n| **13. Finetuning OpenAI GPT3.5 Turbo**                                                                 | How to finetune GPT 3.5 on your own data                                                                                                                                                      | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/13.Fine_tuning_OpenAI_GPT_3_5_turbo.ipynb)                                  |\n| **14. Finetuning Mistral-7b FineTuning Model using Autotrain-advanced**                                | How to finetune Mistral-7b using autotrained-advanced                                                                                                                                         | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/14.Finetuning_Mistral_7b_Using_AutoTrain.ipynb)                             |\n| **15. RAG LangChain Tutorial**                                                                         | How to Use RAG using LangChain                                                                                                                                                                | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/15.RAG_LangChain.ipynb)                                                     |\n| **16. Knowledge Graph LLM with LangChain PDF Question Answering**                                      | How to build knowledge graph with pdf question answering                                                                                                                                      | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/16.Neo4j_and_LangChain_for_Enhanced_Question_Answering.ipynb)               |\n| **17. Text to Knolwedge Graph with OpenAI Function with Neo4j and Langchain Agent Question Answering** | How to build knowledge graph from text or Pdf Document with pdf question Answering                                                                                                            | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/17.OpenAI_Constructing_Graph_for_Questio_Answer.ipynb)                      |\n| **18. Convert the Document to Knowledgegraph using Langchain and Openai**                              | This notebook is help you to understand how easiest way you can convert your any documents into Knowledgegraph for your next RAG based Application                                            | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/18.Convert_Document_to_Knowledge_Graph_Langchain_Openai.ipynb)              |\n| **19. How to train a 1-bit Model with LLMs?**                                                          | This notebook is help you to train a model with 1-bit and 2-bit quantization method using hqq framework                                                                                       | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/19.HQQ_1bit_ipynb.ipynb)                                                    |\n| **20.Alpaca_+_Gemma2_9b_Unsloth_2x_faster_finetuning**                                                 | This notebook is help you to train a model with gemma2 9b                                                                                                                                     | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/20.Alpaca_%2B_Gemma2_9b_Unsloth_2x_faster_finetuning.ipynb)                 |\n| **21.RAG Pipeline Evaluation Using MLFLOW Best Industry Practice**                                     | This notebook provides a comprehensive guide to evaluating the 21 RAG (Retrieve-then-Answer Generation) pipeline using MLFLOW, adhering to best industry practices.                           | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/21_RAG_Pipeline_Evaluation_Using_MLFLOW_Best_Industry_Practise.ipynb)       |\n| **22. Evaluate a Hugging Face LLM with `mlflow.evaluate()`**                                         | This notebook provides a comprehensive guide on evaluating a Hugging Face Language Learning Model (LLM) using mlflow_evaluate.                                                                | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/22.Evaluate_a_Hugging_Face_LLM_with_mlflow_evaluate.ipynb)                  |\n| **23. Optimizing LLMs with Cache-Augmented-Generation**                                                | Explores techniques from the research paper Cache-Augmented Generation (CAG) to enhance LLM efficiency and response speed using caching strategies.                                           | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/23_CAG_Optimizing_LLMs_with_cache_augmented_generation.ipynb)               |\n\n## Contributing 🤝\n\nContributions are welcome! If you'd like to contribute to this project, feel free to open an issue or submit a pull request.\n\n## License 📝\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\nCreated with ❤️ by [Ashish](https://github.com/ashishpatel26/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishpatel26%2Fllm-finetuning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashishpatel26%2Fllm-finetuning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishpatel26%2Fllm-finetuning/lists"}