llm_qlora  by georgesung

Fine-tuning tool for LLMs using QLoRA

Created 2 years ago
262 stars

Top 97.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides a streamlined approach to fine-tuning large language models (LLMs) using the QLoRA technique. It targets AI researchers and developers looking to efficiently adapt pre-trained LLMs for specific tasks or datasets, enabling custom model creation with reduced computational resources.

How It Works

The project leverages QLoRA, a parameter-efficient fine-tuning method that quantizes pre-trained LLMs to 4-bit precision and uses Low-Rank Adaptation (LoRA) to fine-tune only a small subset of adapter weights. This significantly reduces memory requirements and computational cost during training while maintaining performance comparable to full fine-tuning.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Run training: python train.py <config_file> (e.g., python train.py configs/llama3_8b_chat_uncensored.yaml)
  • Requires Python 3.8+.
  • Official examples and Colab notebook available for inference.

Highlighted Details

  • Supports fine-tuning of models like Llama3-8B and Llama2-7B.
  • Includes pre-configured YAML files for various datasets and models.
  • Provides instructions for pushing trained models to HuggingFace Hub.
  • Offers guidance on converting models to GGUF format for use with llama.cpp.

Maintenance & Community

  • The repository is maintained by georgesung.
  • Links to HuggingFace models are provided.

Licensing & Compatibility

  • The repository's license is not explicitly stated in the README.
  • Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

Users on Python 3.7 may encounter compatibility issues with newer transformers and peft versions, requiring specific older package versions for stable operation.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Starred by Casper Hansen Casper Hansen(Author of AutoAWQ), Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), and
5 more.

xtuner by InternLM

0.5%
5k
LLM fine-tuning toolkit for research
Created 2 years ago
Updated 1 day ago
Starred by Junyang Lin Junyang Lin(Core Maintainer at Alibaba Qwen), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
25 more.

alpaca-lora by tloen

0.0%
19k
LoRA fine-tuning for LLaMA
Created 2 years ago
Updated 1 year ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), John Yang John Yang(Coauthor of SWE-bench, SWE-agent), and
28 more.

stanford_alpaca by tatsu-lab

0.1%
30k
Instruction-following LLaMA model training and data generation
Created 2 years ago
Updated 1 year ago
Starred by Roy Frostig Roy Frostig(Coauthor of JAX; Research Scientist at Google DeepMind), Zhiqiang Xie Zhiqiang Xie(Coauthor of SGLang), and
40 more.

llama by meta-llama

0.1%
59k
Inference code for Llama 2 models (deprecated)
Created 2 years ago
Updated 7 months ago
Feedback? Help us improve.