Skip to main content
This section walks you through a set of hands-on experiments with FlexAI — from running your very first training job to fine-tuning language, diffusion, and text-to-speech models with techniques like QLoRA and LoRA, and integrating FlexAI with other platforms such as experiment trackers.

Getting Started

Prerequisites

FlexAI CLI: Install the FlexAI CLI by following the steps shown in the Installing the FlexAI CLI guide.

The Experiments

The following table lists out the experiments available. Each experiment is designed to walk you through a specific use case and contains its required code, as well as detailed instructions on how to run it on FlexAI:

Keep in mind

Notes on HuggingFace Accelerate Integration

This section includes experiments that utilize the HuggingFace Accelerate library for efficient training. The FlexAI CLI simplifies running training scripts by automatically determining the appropriate execution method:
  • python: Used for single-accelerator training.
  • torchrun: Automatically used for multi-accelerator distributed training.
If you’re accustomed to using the accelerate launch command, you can seamlessly run the same scripts on FlexAI without modification. Simply provide the script to FlexAI, and it will handle execution. As highlighted in the Accelerate documentation, the accelerate launch command is optional. Instead, the Accelerate functionality integrates directly into your script, making it compatible with other launchers like torchrun.
Unlike accelerate launch, torchrun does not use the YAML configuration file generated by accelerate config.If your training setup relies on specific configurations from the YAML file, you may need to adjust your script to explicitly define these settings using the Accelerator class.By doing so, you ensure seamless execution across different environments while maintaining flexibility for various training setups.