Skip to main content

LLM Trainer

Reason this release was yanked:

incorrect version in project version

Project description

Axolotl

GitHub License tests Releases
contributors GitHub Repo stars
discord twitter
tests-nightly multigpu-semi-weekly tests phorm.ai

Axolotl is a tool designed to streamline post-training for various AI models. Post-training refers to any modifications or additional training performed on pre-trained models - including full model fine-tuning, parameter-efficient tuning (like LoRA and QLoRA), supervised fine-tuning (SFT), instruction tuning, and alignment techniques. With support for multiple model architectures and training configurations, Axolotl makes it easy to get started with these techniques.

Axolotl is designed to work with YAML config files that contain everything you need to preprocess a dataset, train or fine-tune a model, run model inference or evaluation, and much more.

Features:

  • Train various Huggingface models such as llama, pythia, falcon, mpt
  • Supports fullfinetune, lora, qlora, relora, and gptq
  • Customize configurations using a simple yaml file or CLI overwrite
  • Load different dataset formats, use custom formats, or bring your own tokenized datasets
  • Integrated with xformers, flash attention, liger kernel, rope scaling, and multipacking
  • Works with single GPU or multiple GPUs via FSDP or Deepspeed
  • Easily run with Docker locally or on the cloud
  • Log results and optionally checkpoints to wandb, mlflow or Comet
  • And more!

๐Ÿš€ Quick Start

Requirements:

  • NVIDIA GPU (Ampere or newer for bf16 and Flash Attention) or AMD GPU
  • Python 3.11
  • PyTorch โ‰ฅ2.4.1

Installation

pip3 install --no-build-isolation axolotl[flash-attn,deepspeed]

# Download example axolotl configs, deepspeed configs
axolotl fetch examples
axolotl fetch deepspeed_configs  # OPTIONAL

Other installation approaches are described here.

Your First Fine-tune

# Fetch axolotl examples
axolotl fetch examples

# Or, specify a custom path
axolotl fetch examples --dest path/to/folder

# Train a model using LoRA
axolotl train examples/llama-3/lora-1b.yml

That's it! Check out our Getting Started Guide for a more detailed walkthrough.

โœจ Key Features

  • Multiple Model Support: Train various models like LLaMA, Mistral, Mixtral, Pythia, and more
  • Training Methods: Full fine-tuning, LoRA, QLoRA, and more
  • Easy Configuration: Simple YAML files to control your training setup
  • Performance Optimizations: Flash Attention, xformers, multi-GPU training
  • Flexible Dataset Handling: Use various formats and custom datasets
  • Cloud Ready: Run on cloud platforms or local hardware

๐Ÿ“š Documentation

๐Ÿค Getting Help

๐ŸŒŸ Contributing

Contributions are welcome! Please see our Contributing Guide for details.

Supported Models

fp16/fp32 lora qlora gptq gptq w/flash attn flash attn xformers attn
llama โœ… โœ… โœ… โœ… โœ… โœ… โœ…
Mistral โœ… โœ… โœ… โœ… โœ… โœ… โœ…
Mixtral-MoE โœ… โœ… โœ… โ“ โ“ โ“ โ“
Mixtral8X22 โœ… โœ… โœ… โ“ โ“ โ“ โ“
Pythia โœ… โœ… โœ… โŒ โŒ โŒ โ“
cerebras โœ… โœ… โœ… โŒ โŒ โŒ โ“
btlm โœ… โœ… โœ… โŒ โŒ โŒ โ“
mpt โœ… โŒ โ“ โŒ โŒ โŒ โ“
falcon โœ… โœ… โœ… โŒ โŒ โŒ โ“
gpt-j โœ… โœ… โœ… โŒ โŒ โ“ โ“
XGen โœ… โ“ โœ… โ“ โ“ โ“ โœ…
phi โœ… โœ… โœ… โ“ โ“ โ“ โ“
RWKV โœ… โ“ โ“ โ“ โ“ โ“ โ“
Qwen โœ… โœ… โœ… โ“ โ“ โ“ โ“
Gemma โœ… โœ… โœ… โ“ โ“ โœ… โ“
Jamba โœ… โœ… โœ… โ“ โ“ โœ… โ“

โœ…: supported โŒ: not supported โ“: untested

โค๏ธ Sponsors

Thank you to our sponsors who help make Axolotl possible:

  • Modal - Modal lets you run jobs in the cloud, by just writing a few lines of Python. Customers use Modal to deploy Gen AI models at large scale, fine-tune large language models, run protein folding simulations, and much more.

Interested in sponsoring? Contact us at wing@axolotl.ai

๐Ÿ“œ License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axolotl-0.8.0.dev0.tar.gz (249.4 kB view details)

Uploaded Source

File details

Details for the file axolotl-0.8.0.dev0.tar.gz.

File metadata

  • Download URL: axolotl-0.8.0.dev0.tar.gz
  • Upload date:
  • Size: 249.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for axolotl-0.8.0.dev0.tar.gz
Algorithm Hash digest
SHA256 d59d6c6fed48a6636e0f0d4a1997f9ad570a9be49c4e594bb045ce6f04bab09c
MD5 4beb6adef9cd0e6b112b944ce6ad3695
BLAKE2b-256 a5dd8fd29d30e48d698a865ef0efabc563c45d922b13cec26291b4ec029b6ae9

See more details on using hashes here.

Provenance

The following attestation bundles were made for axolotl-0.8.0.dev0.tar.gz:

Publisher: pypi.yml on axolotl-ai-cloud/axolotl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page