LLM-Finetuning

ashishpatel26长期未更新

用 PEFT 和 LoRA 对 Falcon、Llama、Llama2 等大模型做低成本微调的实战教程合集,以 Jupyter Notebook 形式提供可直接跑通的训练流程。

LLM Finetuning with peft

暂无版本2,996star769fork同步于 2026-11-07 07:31 UTC

怎么上手

由 README 提炼,执行前请确认
README 未提供安装命令,直接打开对应 Notebook 的 Colab 链接运行
硬件要求按 README 说明

README 未说明具体显存要求;示例以 Colab Notebook 形式提供,涉及 7B 至 30B 模型及 8bit/4bit/2bit 量化训练

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 LoRA、QLoRA、PEFT 等方案微调大模型的 Colab Notebook 合集,照着跑就能上手

用 PEFT 和 LoRA 对 Falcon、Llama、Llama2 等大模型做低成本微调的实战教程合集,以 Jupyter Notebook 形式提供可直接跑通的训练流程。

核心能力

  • 用 LoRA 和 Hugging Face transformers 高效训练大模型
  • 覆盖 Llama 2、Falcon、Mistral、Gemma2 等模型的微调示例
  • 提供 QLoRA、bnb 4bit/8bit 量化微调 Notebook
  • 包含 RLHF 与 trl SFT 自定义数据集训练流程
  • 附带 RAG、知识图谱与 Neo4j 问答教程

容易踩的坑

多数 Notebook 需在 Colab 环境运行并额外下载对应基座模型;部分示例依赖 bitsandbytes、peft、trl、autotrain-advanced、hqq 等额外库;GPT-3.5 微调示例需自备 OpenAI API 凭证

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    LLM-Finetuning

    PEFT Fine-Tuning Project 🚀

    Welcome 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.

    Fine Tuning Notebook Table 📑

    Notebook TitleDescriptionColab Badge
    1. Efficiently Train Large Language Models with LoRA and Hugging FaceDetails and code for efficient training of large language models using LoRA and Hugging Face.Open in Colab
    2. Fine-Tune Your Own Llama 2 Model in a Colab NotebookGuide to fine-tuning your Llama 2 model using Colab.Open in Colab
    3. Guanaco Chatbot Demo with LLaMA-7B ModelShowcase of a chatbot demo powered by LLaMA-7B model.Open in Colab
    4. PEFT Finetune-Bloom-560m-taggerProject details for PEFT Finetune-Bloom-560m-tagger.Open in Colab
    5. Finetune_Meta_OPT-6-1b_Model_bnb_peftDetails and guide for finetuning the Meta OPT-6-1b Model using PEFT and Bloom-560m-tagger.Open in Colab
    6.Finetune Falcon-7b with BNB Self Supervised TrainingGuide for finetuning Falcon-7b using BNB self-supervised training.Open in Colab
    7.FineTune LLaMa2 with QLoRaGuide to fine-tune the Llama 2 7B pre-trained model using the PEFT library and QLoRa methodOpen in Colab
    8.Stable_Vicuna13B_8bit_in_ColabGuide of Fine Tuning Vecuna 13B_8bitOpen in Colab
    9. GPT-Neo-X-20B-bnb2bit_trainingGuide How to train the GPT-NeoX-20B model using bfloat16 precisionOpen in Colab
    10. MPT-Instruct-30B Model TrainingMPT-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
    11.RLHF_Training_for_CustomDataset_for_AnyModelHow train a Model with RLHF training on any LLM model with custom datasetOpen in Colab
    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 customOpen in Colab
    13. Finetuning OpenAI GPT3.5 TurboHow to finetune GPT 3.5 on your own dataOpen in Colab
    14. Finetuning Mistral-7b FineTuning Model using Autotrain-advancedHow to finetune Mistral-7b using autotrained-advancedOpen in Colab
    15. RAG LangChain TutorialHow to Use RAG using LangChainOpen in Colab
    16. Knowledge Graph LLM with LangChain PDF Question AnsweringHow to build knowledge graph with pdf question answeringOpen in Colab
    17. Text to Knolwedge Graph with OpenAI Function with Neo4j and Langchain Agent Question AnsweringHow to build knowledge graph from text or Pdf Document with pdf question AnsweringOpen in Colab
    18. Convert the Document to Knowledgegraph using Langchain and OpenaiThis notebook is help you to understand how easiest way you can convert your any documents into Knowledgegraph for your next RAG based ApplicationOpen in Colab
    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 frameworkOpen in Colab
    20.Alpaca_+_Gemma2_9b_Unsloth_2x_faster_finetuningThis notebook is help you to train a model with gemma2 9bOpen in Colab
    21.RAG Pipeline Evaluation Using MLFLOW Best Industry PracticeThis 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
    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
    23. Optimizing LLMs with Cache-Augmented-GenerationExplores techniques from the research paper Cache-Augmented Generation (CAG) to enhance LLM efficiency and response speed using caching strategies.Open in Colab

    Contributing 🤝

    Contributions are welcome! If you'd like to contribute to this project, feel free to open an issue or submit a pull request.

    License 📝

    This project is licensed under the MIT License.


    Created with ❤️ by Ashish