Installation¶
This guide will help you set up the Fine-Tune Pipeline on your system.
Prerequisites¶
Before installing the Fine-Tune Pipeline, ensure you have:
- Python 3.12 or higher
- uv package manager (recommended) or pip
- Git for version control
- CUDA-compatible GPU (recommended for training)
Installing uv (Recommended)¶
We recommend using uv
as the package manager for this project as it provides faster dependency resolution and better environment management.
Windows¶
# Using PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
macOS and Linux¶
Alternative: Using pip¶
Clone the Repository¶
Install Dependencies¶
Using uv (Recommended)¶
Using pip¶
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -e .
Verify Installation¶
To verify that everything is installed correctly, run:
# Check if the main module can be imported
uv run python -c "from app.finetuner import FineTune; print('✅ Installation successful!')"
GPU Setup (Optional but Recommended)¶
For optimal performance, especially during training, we recommend using a CUDA-compatible GPU.
CUDA Installation¶
-
Check CUDA compatibility:
-
Install PyTorch with CUDA support:
-
Verify CUDA installation:
Next Steps¶
Now that you have the pipeline installed, you can:
- Set up your environment with API keys and configurations
- Follow the Quick Start Guide to run your first fine-tuning job
- Explore the Configuration Options to customize your setup
Troubleshooting¶
Common Issues¶
Issue: uv sync
fails with dependency conflicts
Issue: CUDA out of memory during training
# Solution: Reduce batch size in config.toml
device_train_batch_size = 2 # Reduce from default 4
device_validation_batch_size = 2
Issue: Import errors with unsloth
# Solution: Reinstall unsloth
uv remove unsloth
uv add "unsloth[cu118] @ git+https://github.com/unslothai/unsloth.git"
For more troubleshooting tips, see our Troubleshooting Guide.