Skip to content

A machine learning pipeline built with ZenML for fine-tuning LLMs (default Gemma 3n) to generating alternative texts for images.

License

Notifications You must be signed in to change notification settings

scheidti/zenml-alt-text

Repository files navigation

ZenML Alt Text Fine-Tuning Project

A machine learning pipeline built with ZenML for fine-tuning LLMs (default Gemma 3n) to generating alternative text descriptions for images.

📋 Prerequisites

  • 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

🛠️ Installation

  1. Clone the repository:
git clone https://github.com/scheidti/zenml-alt-text.git
cd zenml-alt-text
  1. Install uv (if not already installed)

  2. Create a virtual environment and install dependencies:

uv venv
source .venv/bin/activate
uv sync
  1. Set up environment variables:
cp .env.example .env
# Edit .env file with your configuration
  1. 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

⚙️ Configuration

Each pipeline is configured through YAML files in the configs/ directory:

  • data_preparation.yaml: Configuration for data preprocessing
  • batch_processing.yaml: Configuration for batch inference
  • training.yaml: Configuration for model training

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A machine learning pipeline built with ZenML for fine-tuning LLMs (default Gemma 3n) to generating alternative texts for images.

Topics

Resources

License

Stars

Watchers

Forks

Languages