LLaMA-LoRA-Tuner  by zetavg

Gradio UI for LoRA fine-tuning and model evaluation

created 2 years ago
472 stars

Top 65.5% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Gradio-based UI for fine-tuning and evaluating Low-Rank Adaptation (LoRA) models, primarily targeting LLaMA and similar large language models. It's designed for researchers and power users who want an accessible way to experiment with model customization without deep coding expertise, offering a ChatGPT-like interface for testing and a streamlined fine-tuning process.

How It Works

The tool leverages Gradio for its interactive web UI, allowing users to load various base models (LLaMA, GPT-J, Dolly, Pythia) and fine-tune them using LoRA. It supports multiple dataset formats (JSON, JSONL, Alpaca, OpenAI prompt-completion) and integrates prompt templating for efficient data handling. The architecture emphasizes ease of use, with options for one-click deployment on Google Colab and integration with SkyPilot for cloud-based execution.

Quick Start & Requirements

  • Google Colab: Open the provided Colab notebook and select "Runtime > Run All". Requires a Google account and a standard GPU runtime.
  • SkyPilot: Install SkyPilot, create a .yaml configuration, and run sky launch. Supports various cloud providers (Lambda Labs, GCP, AWS, Azure) and requires specifying GPU resources (e.g., A10:1).
  • Local: Use conda create -n llm-tuner python=3.8, conda activate llm-tuner, pip install -r requirements.lock.txt, and python app.py. Requires Python 3.8 and appropriate hardware.
  • Dependencies: Python 3.8, CUDA (implied for GPU usage), Gradio, Hugging Face libraries, bitsandbytes (with a noted patch for CUDA 12.1).
  • Resources: Google Drive for data storage, cloud storage mounts for SkyPilot.
  • Links: Colab Notebook, SkyPilot, Demo Video.

Highlighted Details

  • One-click Google Colab deployment for quick setup.
  • Supports multiple base models including LLaMA, GPT-J, Dolly, and Pythia.
  • Flexible dataset loading from local files, Hugging Face, or direct text input.
  • New Chat UI and Demo Mode available on the dev branch for model demonstration.

Maintenance & Community

  • Active development noted with a dev branch introducing new features.
  • Discussions available on GitHub for user support and feature requests.

Licensing & Compatibility

  • The repository does not explicitly state a license in the README.

Limitations & Caveats

  • The dev branch's new Chat UI and Demo Mode currently lack fine-tuning capabilities and are not backward compatible with older prompt template formats.
  • Google Colab's free tier may lead to slower training and potential execution termination for long tasks.
Health Check
Last commit

2 years ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.