instructlab  by instructlab

CLI tool for LLM alignment tuning via synthetic data

created 1 year ago
1,334 stars

Top 30.7% on sourcepulse

GitHubView on GitHub
Project Summary

InstructLab Core provides a framework for aligning Large Language Models (LLMs) using a novel synthetic data-based method. It enables users to download pre-trained LLMs, chat with them, and then enhance them by contributing to a companion taxonomy repository, generating synthetic data, and re-training the model. This workflow is designed for researchers and developers looking to customize LLMs with specific knowledge and skills.

How It Works

InstructLab utilizes a "Large-Scale Alignment for Chatbots" (LAB) approach. Users contribute to a structured taxonomy, which then serves as the basis for generating synthetic training data using specified LLMs (teacher models). This synthetic data is used to fine-tune the target LLM via various training pipelines (simple, full, accelerated), allowing for iterative improvement and evaluation against benchmarks like MMLU and MTBench.

Quick Start & Requirements

  • Installation: pip install instructlab (ensure Python 3.11 is used; Python 3.12+ is not supported). GPU acceleration requires specific pip install 'instructlab[cuda]' or instructlab[rocm] commands.
  • Prerequisites: Python 3.11, C++ compiler, Git. Minimum 250GB disk space (500GB recommended for full workflow). Apple M1/M2/M3 Macs or Linux (Fedora tested).
  • Setup: Initialize with ilab config init. Download models with ilab model download.
  • Documentation: InstructLab Core README

Highlighted Details

  • Supports training and inference on Apple Metal (MPS), NVIDIA CUDA, and AMD ROCm.
  • Offers multiple training pipelines (simple, full, accelerated) catering to different hardware capabilities.
  • Includes built-in evaluation benchmarks (DK-Bench, MMLU, MTBench) for assessing model performance.
  • Features a developer preview for Retrieval-Augmented Generation (RAG).

Maintenance & Community

  • Project is actively maintained by InstructLab.
  • Community contributions are encouraged via pull requests to the taxonomy repository.

Licensing & Compatibility

  • The specific license is not explicitly stated in the README, but the project structure suggests an open-source model. Compatibility for commercial use or closed-source linking would require clarification of the license.

Limitations & Caveats

  • Python 3.12+ is not currently supported due to dependency issues.
  • Running the full workflow on a laptop may result in lower-fidelity synthetic data generation and model tuning compared to more powerful hardware.
  • Some model downloads (e.g., Mistral-7B-Instruct-v0.2) may require a Hugging Face token.
Health Check
Last commit

5 days ago

Responsiveness

1 day

Pull Requests (30d)
15
Issues (30d)
16
Star History
81 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.