Streamline the fine-tuning process for vision-language models like PaliGemma 2, Florence-2, and Qwen2.5-VL.
Project description
Hello
maestro is a streamlined tool to accelerate the fine-tuning of multimodal models. By encapsulating best practices from our core modules, maestro handles configuration, data loading, reproducibility, and training loop setup. It currently offers ready-to-use recipes for popular vision-language models such as Florence-2, PaliGemma 2, and Qwen2.5-VL.
Quickstart
Install
To begin, install the model-specific dependencies. Since some models may have clashing requirements, we recommend creating a dedicated Python environment for each model.
pip install maestro[paligemma_2]
CLI
Kick off fine-tuning with our command-line interface, which leverages the configuration and training routines defined in each model’s core module. Simply specify key parameters such as the dataset location, number of epochs, batch size, optimization strategy, and metrics.
maestro paligemma_2 train \
--dataset "dataset/location" \
--epochs 10 \
--batch-size 4 \
--optimization_strategy "qlora" \
--metrics "edit_distance"
Python
For greater control, use the Python API to fine-tune your models. Import the train function from the corresponding module and define your configuration in a dictionary. The core modules take care of reproducibility, data preparation, and training setup.
from maestro.trainer.models.paligemma_2.core import train
config = {
"dataset": "dataset/location",
"epochs": 10,
"batch_size": 4,
"optimization_strategy": "qlora",
"metrics": ["edit_distance"]
}
train(config)
Cookbooks
Looking for a place to start? Try our cookbooks to learn how to fine-tune different VLMs on various vision tasks with maestro.
| description | open in colab |
|---|---|
| Finetune PaliGemma 2 for JSON data extraction with LoRA | |
| Finetune Qwen2.5-VL for JSON data extraction with QLoRA |
Contribution
We would love your help in making this repository even better! We are especially looking for contributors with experience in fine-tuning vision-language models (VLMs). If you notice any bugs or have suggestions for improvement, feel free to open an issue or submit a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maestro-1.0.0.tar.gz.
File metadata
- Download URL: maestro-1.0.0.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a12935205e69ad384a3c0e25863cd3b786dc22c9c060223040f04554724fb470
|
|
| MD5 |
cd6497d644240070016cdecfd1038b1a
|
|
| BLAKE2b-256 |
6ddee30424c71744dfcbf822fb8f64a2aaf022afe0a3417721564c2c46f59bb4
|
Provenance
The following attestation bundles were made for maestro-1.0.0.tar.gz:
Publisher:
publish-release.yml on roboflow/maestro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maestro-1.0.0.tar.gz -
Subject digest:
a12935205e69ad384a3c0e25863cd3b786dc22c9c060223040f04554724fb470 - Sigstore transparency entry: 168871446
- Sigstore integration time:
-
Permalink:
roboflow/maestro@0b463cfc6baa55449a2463f6f075d85335c6d018 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-release.yml@0b463cfc6baa55449a2463f6f075d85335c6d018 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maestro-1.0.0-py3-none-any.whl.
File metadata
- Download URL: maestro-1.0.0-py3-none-any.whl
- Upload date:
- Size: 46.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a24e640c8b64f677134fbf519ddfb287051fd06dad8e837536d034fc942b1bf
|
|
| MD5 |
799ae5966c0247587b9c912e630981d9
|
|
| BLAKE2b-256 |
a813c5e14050052842f3f7edae17548b0456b8bb84500e1909450392a9b1042f
|
Provenance
The following attestation bundles were made for maestro-1.0.0-py3-none-any.whl:
Publisher:
publish-release.yml on roboflow/maestro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maestro-1.0.0-py3-none-any.whl -
Subject digest:
1a24e640c8b64f677134fbf519ddfb287051fd06dad8e837536d034fc942b1bf - Sigstore transparency entry: 168871447
- Sigstore integration time:
-
Permalink:
roboflow/maestro@0b463cfc6baa55449a2463f6f075d85335c6d018 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-release.yml@0b463cfc6baa55449a2463f6f075d85335c6d018 -
Trigger Event:
push
-
Statement type: