Skip to content

Commit d3daf16

Browse files
authored
Merge pull request #169 from roboflow/deps/transformers/qwen
deps: 📦 update transformers version constraints and better qwen2.5 VL support for installation
2 parents 26835d8 + 4c0c9ae commit d3daf16

File tree

5 files changed

+107
-78
lines changed

5 files changed

+107
-78
lines changed

cookbooks/maestro_florence_2_object_detection.ipynb

Lines changed: 7 additions & 6 deletions
Large diffs are not rendered by default.

cookbooks/maestro_paligemma_2_json_extraction.ipynb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"id": "ckbZSXr_nXrD"
77
},
88
"source": [
9-
"# Fine-tuning PaliGemma 2 for JSON Data Extraction using Maestro\n",
10-
"\n",
11-
"---\n",
12-
"\n",
13-
"[![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",
14-
"[![dataset](https://app.roboflow.com/images/download-dataset-badge.svg)](https://universe.roboflow.com/roboflow-jvuqo/pallet-load-manifest)"
15-
]
9+
"# Fine-tuning PaliGemma 2 for JSON Data Extraction using Maestro\n",
10+
"\n",
11+
"---\n",
12+
"\n",
13+
"[![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",
14+
"[![dataset](https://app.roboflow.com/images/download-dataset-badge.svg)](https://universe.roboflow.com/roboflow-jvuqo/pallet-load-manifest)"
15+
]
1616
},
1717
{
1818
"cell_type": "markdown",
@@ -110,7 +110,7 @@
110110
},
111111
"outputs": [],
112112
"source": [
113-
"!pip install \"maestro[paligemma_2]\"\n",
113+
"!pip install \"maestro[paligemma_2]==1.1.0rc2\"\n",
114114
"!pip install roboflow"
115115
]
116116
},
@@ -444,17 +444,17 @@
444444
},
445445
{
446446
"cell_type": "code",
447-
"execution_count": 13,
447+
"execution_count": null,
448448
"metadata": {
449449
"id": "bOyiFToVjGEK"
450450
},
451451
"outputs": [],
452452
"source": [
453-
"from maestro.trainer.common.datasets import RoboflowJSONLDataset\n",
453+
"from maestro.trainer.common.datasets.jsonl import JSONLDataset\n",
454454
"\n",
455-
"ds = RoboflowJSONLDataset(\n",
456-
" jsonl_file_path=f\"{dataset.location}/test/annotations.jsonl\",\n",
457-
" image_directory_path=f\"{dataset.location}/test\",\n",
455+
"ds = JSONLDataset(\n",
456+
" annotations_path=f\"{dataset.location}/test/annotations.jsonl\",\n",
457+
" images_directory_path=f\"{dataset.location}/test\",\n",
458458
")\n",
459459
"\n",
460460
"image, entry = ds[0]"

cookbooks/maestro_qwen2_5_vl_json_extraction.ipynb

Lines changed: 84 additions & 50 deletions
Large diffs are not rendered by default.

docs/index.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,8 @@ we recommend creating a dedicated Python environment for each model.
6767

6868
```bash
6969
pip install "maestro[qwen_2_5_vl]"
70-
pip install git+https://github.com/huggingface/transformers
7170
```
7271

73-
!!! warning
74-
Support for Qwen2.5-VL in transformers is experimental.
75-
For now, please install transformers from source to ensure compatibility.
76-
7772
### CLI
7873

7974
Kick off fine-tuning with our command-line interface, which leverages the configuration

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "maestro"
7-
version = "1.1.0rc1"
7+
version = "1.1.0rc2"
88
description = "Streamline the fine-tuning process for vision-language models like PaliGemma 2, Florence-2, and Qwen2.5-VL."
99
authors = [
1010
{name = "Piotr Skalski", email = "[email protected]"}
@@ -79,16 +79,15 @@ florence_2 = [
7979
paligemma_2 = [
8080
"peft>=0.12",
8181
"torch>=2.4.0",
82-
"transformers<4.49.0",
82+
"transformers>=4.48.3",
8383
"bitsandbytes>=0.45.0"
8484
]
8585
qwen_2_5_vl = [
8686
"accelerate>=1.2.1",
8787
"peft>=0.12",
8888
"torch>=2.4.0",
8989
"torchvision>=0.20.0",
90-
# PyPi doesn't allow git repo packages; uncomment when transformers release support for Qwen2.5-VL
91-
# "transformers @ git+https://github.com/huggingface/transformers",
90+
"transformers>=4.49.0",
9291
"bitsandbytes>=0.45.0",
9392
"qwen-vl-utils>=0.0.8"
9493
]

0 commit comments

Comments
 (0)