xllm  by bobazooba

SDK for efficient LLM finetuning with advanced methods

Created 1 year ago
407 stars

Top 71.6% on SourcePulse

GitHubView on GitHub
Project Summary

X—LLM is a Python library designed to simplify and accelerate the fine-tuning of Large Language Models (LLMs) for engineers and researchers. It integrates cutting-edge optimization techniques like QLoRA, DeepSpeed, and Flash Attention 2, allowing users to focus on data and model improvements rather than complex implementation details.

How It Works

X—LLM employs a configuration-driven approach, abstracting complex training pipelines into a unified Config object. This allows users to easily toggle advanced features such as LoRA/QLoRA, 4-bit quantization, gradient checkpointing, and Flash Attention 2. The library handles the underlying integration with libraries like bitsandbytes, transformers, and deepspeed, streamlining the process of setting up efficient training runs.

Quick Start & Requirements

  • Install: pip install xllm or pip install "xllm[train]" for training dependencies.
  • Requirements: Python 3.8+, PyTorch 2.0.1+, CUDA 11.8+.
  • Example: X—LLM Prototyping Notebook

Highlighted Details

  • Supports numerous Hugging Face Transformers models (Yi-34B, Mistral, Llama 2, etc.).
  • Integrates QLoRA, DeepSpeed, GPTQ, Flash Attention 2, FSDP, and gradient checkpointing.
  • Seamlessly pushes checkpoints to HuggingFace Hub and reports to Weights & Biases.
  • Offers built-in capabilities for fusing LoRA weights and GPTQ quantization.

Maintenance & Community

Licensing & Compatibility

  • License: MIT.
  • Compatible with commercial use and closed-source projects.

Limitations & Caveats

The library currently primarily supports the SODA dataset for demonstration, with plans to add more. Users are responsible for data preparation and handling. There's an open issue regarding DeepSpeed Stage 3 compatibility with bitsandbytes.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), and
26 more.

axolotl by axolotl-ai-cloud

0.5%
10k
CLI tool for streamlined post-training of AI models
Created 2 years ago
Updated 18 hours ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Stefan van der Walt Stefan van der Walt(Core Contributor to scientific Python ecosystem), and
12 more.

litgpt by Lightning-AI

0.1%
13k
LLM SDK for pretraining, finetuning, and deploying 20+ high-performance LLMs
Created 2 years ago
Updated 6 days ago
Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), and
36 more.

unsloth by unslothai

0.6%
46k
Finetuning tool for LLMs, targeting speed and memory efficiency
Created 1 year ago
Updated 17 hours ago
Feedback? Help us improve.