Installing AI Training
This guide will walk you through installing AI Training on your computer. The process takes about 5-10 minutes.What You’ll Get
When you install AI Training withpip or uv, you get:
- Command Line Interface - The
aitrainingcommand for training models - Chat Interface - Test and interact with your trained models via browser
- Python API - Import and use in your Python scripts
Prerequisites
Before installing AI Training, you need Python on your system. Python is a programming language that AI Training runs on.Check if Python is Installed
Open your terminal (Mac) or Command Prompt (Windows) and type:Python 3.8.0 or higher, you’re good to go. AI Training requires Python 3.8 or newer (3.10+ recommended).
If you get an error or have an older version, follow the installation steps below.
Installing Python
- Windows
- Mac
- Linux
Windows Installation
-
Download Python
- Go to python.org/downloads
- Click the yellow “Download Python” button
- Save the installer
-
Run the Installer
- Double-click the downloaded file
- Important: Check “Add Python to PATH” at the bottom
- Click “Install Now”
- Wait for installation to complete
-
Verify Installation
- Open Command Prompt (search for “cmd” in Start menu)
- Type:
python --version - You should see the Python version
-
Install pip (if needed)
- pip usually comes with Python, but verify:
- If not found, run:
Installing AI Training
Once Python is ready, you have two options for installing AI Training. We recommend usinguv for faster installation.
Option 1: Using uv (Recommended)
uv is a modern Python package installer that’s much faster than pip and handles virtual environments automatically.Install uv first:
- Windows
- Mac/Linux
Then install AI Training:
Option 2: Using pip (Traditional method)
If you prefer the traditional approach or can’t install uv:Step 1: Create a Virtual Environment
A virtual environment keeps AI Training’s files separate from other Python projects.- Windows
- Mac/Linux
(aitraining-env) in your terminal when the environment is active.
Step 2: Install AI Training
Step 3: Verify Installation
Check that everything installed correctly:Choose Your Interface
AI Training offers three ways to work:Command Line
Best for trainingTrain models with commands. Good for scripts and automation.Start with:
aitraining --helpChat Interface
Best for testingTest your trained models interactively in a browser.Start with:
aitraining chatPython API
Best for developersIntegrate training into your Python applications.Start with:
from autotrain.trainers.clm.params import LLMTrainingParamsOptional Dependencies
Some features require additional packages:| Feature | Package | Install | Platform |
|---|---|---|---|
| Faster LoRA training | unsloth | pip install unsloth | Linux (SFT only, llama/mistral/gemma/qwen2) |
| Flash Attention 2 | flash-attn | pip install flash-attn | Linux (CUDA) |
| Distributed training | accelerate | Included | Linux/Mac/Windows |
| DeepSpeed Zero-3 | deepspeed | pip install deepspeed | Linux |
| 4/8-bit quantization | bitsandbytes | Included | Linux only |
Accelerate is required for multi-GPU and distributed training. It is included with AITraining. DeepSpeed is optional and provides Zero-3 memory optimization for very large models.
GPU Setup (Optional)
For NVIDIA GPU training, you may want to reinstall PyTorch with your specific CUDA version:Weights & Biases Setup (Optional)
AITraining uses W&B for logging by default. To enable:WANDB_API_KEY=your_key
Common Issues
'python' is not recognized (Windows)
'python' is not recognized (Windows)
Python isn’t in your system PATH. Try:
- Use
python3instead ofpython - Reinstall Python and check “Add Python to PATH”
- Manually add Python to PATH in System Environment Variables
Permission denied errors
Permission denied errors
On Mac/Linux, you might need to use Or better, use a virtual environment (shown above).
sudo:pip: command not found
pip: command not found
pip didn’t install with Python. Install it:Or on Linux:
PyTorch installation fails
PyTorch installation fails
- Make sure you have enough disk space (PyTorch is large)
- Try upgrading pip first:
pip install --upgrade pip - For GPU support, ensure CUDA drivers are installed
Next Steps
Installation complete! Now you’re ready to train your first model:Quick Start Tutorial
Train your first AI model in 10 minutes
Need Help?
- Join our Discord community for support
- Check GitHub issues for known problems
- Email support@monostate.ai for direct help