Skip to main content

Custom Scripts

Extend AITraining with custom preprocessing and postprocessing scripts.

Requirements

Custom scripts can use libraries bundled with AITraining:
  • Python >= 3.8
  • pandas - Data manipulation
  • torch - PyTorch for model operations
  • transformers - Hugging Face models
  • peft - LoRA/adapter operations
These are installed automatically with AITraining.

Data Preprocessing

Custom Data Pipeline

Usage:

DPO Data Preparation

Evaluation Scripts

Custom Evaluation

Benchmark Script

Post-Processing Scripts

Model Merging

Or use the built-in tool:
The built-in tool also supports --token, --pad-to-multiple-of, and --push-to-hub flags. You must specify either --output-folder or --push-to-hub.

Integration Example

Full Training Script

Next Steps

Pipeline Automation

Full pipeline examples

Logging & Debugging

Monitor your scripts