xllm  by bobazooba

SDK for efficient LLM finetuning with advanced methods

Created 2 years 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

2 years ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), and
8 more.

h2o-llmstudio by h2oai

0.1%
5k
LLM Studio: framework for LLM fine-tuning via GUI or CLI
Created 2 years ago
Updated 3 weeks ago
Starred by Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), Eugene Yan Eugene Yan(AI Scientist at AWS), and
1 more.

ms-swift by modelscope

1.1%
12k
SDK for fine-tuning and deploying LLMs/MLLMs
Created 2 years ago
Updated 1 day 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 3 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
41 more.

unsloth by unslothai

0.5%
51k
Finetuning tool for LLMs, targeting speed and memory efficiency
Created 2 years ago
Updated 1 day ago
Feedback? Help us improve.