一个免费开源的大语言模型微调框架
🎉 最新动态
展开查看更多历史更新
- 2025年03月:Axolotl 已实现序列并行(SP)支持。阅读[博客](https://huggingface.co/blog/axolotl-ai-co/long-context-with-sequence-parallelism-in-axolotl)和[文档](https://docs.axolotl.ai/docs/sequence_parallelism.html),了解如何在微调时扩展上下文长度。
- 2025年06月:支持 mistral-common 分词器的 Magistral 已添加到 Axolotl。查看[文档](https://docs.axolotl.ai/docs/models/magistral.html),开始使用 Axolotl 训练你自己的 Magistral 模型!
- 2025年04月:Axolotl 已添加 Llama 4 支持。查看[文档](https://docs.axolotl.ai/docs/models/llama-4.html),开始使用 Axolotl 的线性化版本训练你自己的 Llama 4 模型!
- 2025年03月:(测试版)Axolotl 现已支持多模态模型微调。查看[文档](https://docs.axolotl.ai/docs/multimodal.html),微调你自己的模型!
- 2025年02月:Axolotl 添加了 LoRA 优化,以减少单 GPU 和多 GPU 训练(DDP 和 DeepSpeed)中 LoRA 和 QLoRA 的内存使用并提高训练速度。跳转到[文档](https://docs.axolotl.ai/docs/lora_optims.html)尝试一下。
- 2025年02月:Axolotl 已添加 GRPO 支持。深入阅读我们的[博客](https://huggingface.co/blog/axolotl-ai-co/training-llms-w-interpreter-feedback-wasm)和 [GRPO 示例](https://github.com/axolotl-ai-cloud/grpo_code),体验一下吧!
- 2025年01月:Axolotl 已添加奖励建模/过程奖励建模微调支持。参见[文档](https://docs.axolotl.ai/docs/reward_modelling.html)。
✨ 概述
Axolotl 是一个免费开源的工具,旨在简化最新大语言模型(LLM)的后训练和微调流程。
特性:
🚀 快速开始 - 几分钟内开始 LLM 微调
要求:
- NVIDIA GPU(Ampere 或更新架构,支持
bf16 和 Flash Attention)或 AMD GPU
- Python 3.11
- PyTorch ≥2.8.0
Google Colab

安装
使用 pip
pip3 install -U packaging==26.0 setuptools==75.8.0 wheel ninja
pip3 install --no-build-isolation axolotl[flash-attn,deepspeed]
# 下载示例 axolotl 配置、deepspeed 配置
axolotl fetch examples
axolotl fetch deepspeed_configs # 可选
使用 Docker
使用 Docker 安装比在自己的环境中安装更不容易出错。
docker run --gpus '"all"' --rm -it axolotlai/axolotl:main-latest
其他安装方法请参见此处。
云服务提供商
- [RunPod](https://runpod.io/gsc?template=v2ickqhz9s&ref=6i7fkpdz)
- [Vast.ai](https://cloud.vast.ai?ref_id=62897&template_id=bdd4a49fa8bce926defc99471864cace&utm_source=github&utm_medium=developer_community&utm_campaign=template_launch_axolotl&utm_content=readme)
- [PRIME Intellect](https://app.primeintellect.ai/dashboard/create-cluster?image=axolotl&location=Cheapest&security=Cheapest&show_spot=true)
- [Modal](https://www.modal.com?utm_source=github&utm_medium=github&utm_campaign=axolotl)
- [Novita](https://novita.ai/gpus-console?templateId=311)
- [JarvisLabs.ai](https://jarvislabs.ai/templates/axolotl)
- [Latitude.sh](https://latitude.sh/blueprint/989e0e79-3bf6-41ea-a46b-1f246e309d5c)
你的第一次微调
# 获取 axolotl 示例
axolotl fetch examples
# 或者,指定自定义路径
axolotl fetch examples --dest path/to/folder
# 使用 LoRA 训练一个模型
axolotl train examples/llama-3/lora-1b.yml
就这么简单!查看我们的入门指南获取更详细的步骤说明。
📚 文档
🤝 获取帮助
🌟 贡献
欢迎贡献!请参阅我们的贡献指南了解详情。
📈 遥测
Axolotl 包含可选的遥测功能,帮助我们了解项目的使用情况并确定改进的优先级。我们收集基本的系统信息、模型类型和错误率——从不收集个人数据或文件路径。遥测功能默认启用。要禁用它,请设置 AXOLOTL_DO_NOT_TRACK=1。更多详情,