xllm  by bobazooba

SDK for efficient LLM finetuning with advanced methods

created 1 year ago
403 stars

Top 73.0% 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

1 week

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

Explore Similar Projects

Starred by Jeremy Howard Jeremy Howard(Cofounder of fast.ai) and Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake).

SwissArmyTransformer by THUDM

0.3%
1k
Transformer library for flexible model development
created 3 years ago
updated 7 months ago
Starred by Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake) and Travis Fischer Travis Fischer(Founder of Agentic).

lingua by facebookresearch

0.1%
5k
LLM research codebase for training and inference
created 9 months ago
updated 2 weeks ago
Starred by Lewis Tunstall Lewis Tunstall(Researcher at Hugging Face), Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), and
5 more.

torchtune by pytorch

0.2%
5k
PyTorch library for LLM post-training and experimentation
created 1 year ago
updated 1 day ago
Feedback? Help us improve.