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 is a fine-tuning and post-training framework for large language models. It supports adapter-based tuning, ND-parallel distributed training, GRPO, and QAT. Through TRL, Axolotl also handles preference learning, reinforcement learning, and reward modeling workflows.

Define your training run in a YAML config file.

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

Launch training with the train command.

axolotl train my_config.yml

Transformers integration

Axolotl’s ModelLoader wraps the Transformers load flow.

Resources

Update on GitHub