A machine learning pipeline built with ZenML for fine-tuning LLMs (default Gemma 3n) to generating alternative text descriptions for images.
- Python 3.12
- uv - Fast Python package installer and resolver
- ZenML - MLOps for Reliable AI
- unsloth - Easily finetune & train LLMs
- Hugging Face Account - Required for model access (token needed)
- OpenAI API Key - Required for OpenAI services
- Clone the repository:
git clone https://github.com/scheidti/zenml-alt-text.git
cd zenml-alt-text
-
Install uv (if not already installed)
-
Create a virtual environment and install dependencies:
uv venv
source .venv/bin/activate
uv sync
- Set up environment variables:
cp .env.example .env
# Edit .env file with your configuration
- Run pipelines:
# Data preparation pipeline
python run.py --pipeline data_preparation
# Batch processing pipeline
python run.py --pipeline batch_processing
# Training pipeline
python run.py --pipeline training
Each pipeline is configured through YAML files in the configs/
directory:
data_preparation.yaml
: Configuration for data preprocessingbatch_processing.yaml
: Configuration for batch inferencetraining.yaml
: Configuration for model training
This project is licensed under the MIT License - see the LICENSE file for details.