Transformers documentation

Axolotl

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Axolotl

Axolotl 是一个用于大语言模型的微调与后训练框架。它支持基于适配器的调优、ND-parallel 分布式训练、GRPO 以及 QAT。借助 TRL,Axolotl 还能处理偏好学习、强化学习和奖励建模等工作流。

在 YAML 配置文件中定义你的训练运行。

base_model: NousResearch/Nous-Hermes-llama-1b-v1
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer

datasets:
  - path: tatsu-lab/alpaca
    type: alpaca

output_dir: ./outputs
sequence_len: 512
micro_batch_size: 1
gradient_accumulation_steps: 1
num_epochs: 1
learning_rate: 2.0e-5

使用 train 命令启动训练。

axolotl train my_config.yml

Transformers 集成

Axolotl 的 ModelLoader 封装了 Transformers 的加载流程。

资源

Update on GitHub