Skip to content

Commit

Permalink
Merge pull request #169 from roboflow/deps/transformers/qwen
Browse files Browse the repository at this point in the history
deps: 📦 update transformers version constraints and better qwen2.5 VL support for installation
  • Loading branch information
SkalskiP authored Feb 18, 2025
2 parents 26835d8 + 4c0c9ae commit d3daf16
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 78 deletions.
13 changes: 7 additions & 6 deletions cookbooks/maestro_florence_2_object_detection.ipynb

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions cookbooks/maestro_paligemma_2_json_extraction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"id": "ckbZSXr_nXrD"
},
"source": [
"# Fine-tuning PaliGemma 2 for JSON Data Extraction using Maestro\n",
"\n",
"---\n",
"\n",
"[![colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/roboflow/maestro/blob/develop/cookbooks/maestro_paligemma_2_json_extraction.ipynb)\n",
"[![dataset](https://app.roboflow.com/images/download-dataset-badge.svg)](https://universe.roboflow.com/roboflow-jvuqo/pallet-load-manifest)"
]
"# Fine-tuning PaliGemma 2 for JSON Data Extraction using Maestro\n",
"\n",
"---\n",
"\n",
"[![colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/roboflow/maestro/blob/develop/cookbooks/maestro_paligemma_2_json_extraction.ipynb)\n",
"[![dataset](https://app.roboflow.com/images/download-dataset-badge.svg)](https://universe.roboflow.com/roboflow-jvuqo/pallet-load-manifest)"
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -110,7 +110,7 @@
},
"outputs": [],
"source": [
"!pip install \"maestro[paligemma_2]\"\n",
"!pip install \"maestro[paligemma_2]==1.1.0rc2\"\n",
"!pip install roboflow"
]
},
Expand Down Expand Up @@ -444,17 +444,17 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {
"id": "bOyiFToVjGEK"
},
"outputs": [],
"source": [
"from maestro.trainer.common.datasets import RoboflowJSONLDataset\n",
"from maestro.trainer.common.datasets.jsonl import JSONLDataset\n",
"\n",
"ds = RoboflowJSONLDataset(\n",
" jsonl_file_path=f\"{dataset.location}/test/annotations.jsonl\",\n",
" image_directory_path=f\"{dataset.location}/test\",\n",
"ds = JSONLDataset(\n",
" annotations_path=f\"{dataset.location}/test/annotations.jsonl\",\n",
" images_directory_path=f\"{dataset.location}/test\",\n",
")\n",
"\n",
"image, entry = ds[0]"
Expand Down
134 changes: 84 additions & 50 deletions cookbooks/maestro_qwen2_5_vl_json_extraction.ipynb

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,8 @@ we recommend creating a dedicated Python environment for each model.

```bash
pip install "maestro[qwen_2_5_vl]"
pip install git+https://github.com/huggingface/transformers
```

!!! warning
Support for Qwen2.5-VL in transformers is experimental.
For now, please install transformers from source to ensure compatibility.

### CLI

Kick off fine-tuning with our command-line interface, which leverages the configuration
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "maestro"
version = "1.1.0rc1"
version = "1.1.0rc2"
description = "Streamline the fine-tuning process for vision-language models like PaliGemma 2, Florence-2, and Qwen2.5-VL."
authors = [
{name = "Piotr Skalski", email = "[email protected]"}
Expand Down Expand Up @@ -79,16 +79,15 @@ florence_2 = [
paligemma_2 = [
"peft>=0.12",
"torch>=2.4.0",
"transformers<4.49.0",
"transformers>=4.48.3",
"bitsandbytes>=0.45.0"
]
qwen_2_5_vl = [
"accelerate>=1.2.1",
"peft>=0.12",
"torch>=2.4.0",
"torchvision>=0.20.0",
# PyPi doesn't allow git repo packages; uncomment when transformers release support for Qwen2.5-VL
# "transformers @ git+https://github.com/huggingface/transformers",
"transformers>=4.49.0",
"bitsandbytes>=0.45.0",
"qwen-vl-utils>=0.0.8"
]
Expand Down

0 comments on commit d3daf16

Please sign in to comment.