IMvision12 commited on
Commit
a637eb4
·
verified ·
1 Parent(s): 54c6dd4

Migrate to zeromodels (rename kf_*.json -> zm_*.json, fix refs in config + README, ensure tag + badge)

Browse files
README.md CHANGED
@@ -2,12 +2,12 @@
2
  pipeline_tag: image-text-to-text
3
  license: apache-2.0
4
  base_model: Qwen/Qwen2.5-VL-7B-Instruct
5
- library_name: kerasformers
6
  language:
7
  - en
8
  tags:
9
  - keras
10
- - kerasformers
11
  - qwen2_5_vl
12
  - qwen2.5-vl
13
  - multimodal
@@ -18,15 +18,15 @@ tags:
18
  - tf
19
  ---
20
 
21
- *See [our collection](https://huggingface.co/collections/kerasformers/qwen25-vl-6a7cc9f463d6956b6c3ba911) for all Qwen2.5-VL sizes.*
22
 
23
  # Run Qwen2.5-VL with Keras 3: JAX, PyTorch, or TensorFlow
24
 
25
- [![GitHub](https://img.shields.io/badge/GitHub-KerasFormers-181717?logo=github)](https://github.com/IMvision12/KerasFormers) [![Docs](https://img.shields.io/badge/Docs-Qwen2.5--VL-1f6feb)](https://imvision12.github.io/KerasFormers/qwen2_5_vl/) [![HuggingFace](https://img.shields.io/badge/HuggingFace-Qwen2.5--VL-ffd21e?logo=huggingface&logoColor=black)](https://huggingface.co/collections/kerasformers/qwen25-vl-6a7cc9f463d6956b6c3ba911)
26
 
27
- # kerasformers/qwen2.5-vl-7b-instruct
28
 
29
- Pure-**Keras 3** conversion of [`Qwen/Qwen2.5-VL-7B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**. This is the **7B** variant, served here as **image + text -> text** via `Qwen2_5VLProcessor`; weights are stored in **bfloat16**.
30
 
31
  For model details, license, and usage terms, see the upstream [model card](https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct).
32
 
@@ -44,10 +44,10 @@ Paper: [Qwen-VL: A Frontier Large Vision-Language Model with Versatile Abilities
44
  import os
45
  os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
46
 
47
- from kerasformers.models.qwen2_5_vl import Qwen2_5VLTextGenerate, Qwen2_5VLProcessor
48
 
49
- model = Qwen2_5VLTextGenerate.from_weights("kerasformers/qwen2.5-vl-7b-instruct")
50
- processor = Qwen2_5VLProcessor.from_weights("kerasformers/qwen2.5-vl-7b-instruct")
51
 
52
  inputs = processor(conversation=[
53
  {"role": "user", "content": [{"type": "text", "text": "Hello, who are you?"}]}
@@ -63,10 +63,10 @@ import os
63
  os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
64
 
65
  from PIL import Image
66
- from kerasformers.models.qwen2_5_vl import Qwen2_5VLConditionalGenerate, Qwen2_5VLProcessor
67
 
68
- model = Qwen2_5VLConditionalGenerate.from_weights("kerasformers/qwen2.5-vl-7b-instruct")
69
- processor = Qwen2_5VLProcessor.from_weights("kerasformers/qwen2.5-vl-7b-instruct")
70
 
71
  inputs = processor(conversation=[
72
  {"role": "user", "content": [
@@ -78,14 +78,14 @@ outputs = model.generate(**inputs, max_new_tokens=64)
78
  print(processor.decode(outputs[0]))
79
  ```
80
 
81
- Load any Qwen2.5-VL variant the same way with `from_weights("kerasformers/<variant>")`:
82
 
83
  | Variant | Hub |
84
  | --- | --- |
85
- | `qwen2.5-vl-3b-instruct` | [kerasformers/qwen2.5-vl-3b-instruct](https://huggingface.co/kerasformers/qwen2.5-vl-3b-instruct) |
86
- | `qwen2.5-vl-7b-instruct` | [kerasformers/qwen2.5-vl-7b-instruct](https://huggingface.co/kerasformers/qwen2.5-vl-7b-instruct) |
87
- | `qwen2.5-vl-32b-instruct` | [kerasformers/qwen2.5-vl-32b-instruct](https://huggingface.co/kerasformers/qwen2.5-vl-32b-instruct) |
88
- | `qwen2.5-vl-72b-instruct` | [kerasformers/qwen2.5-vl-72b-instruct](https://huggingface.co/kerasformers/qwen2.5-vl-72b-instruct) |
89
 
90
  ## Special Thanks
91
 
 
2
  pipeline_tag: image-text-to-text
3
  license: apache-2.0
4
  base_model: Qwen/Qwen2.5-VL-7B-Instruct
5
+ library_name: zeromodels
6
  language:
7
  - en
8
  tags:
9
  - keras
10
+ - zeromodels
11
  - qwen2_5_vl
12
  - qwen2.5-vl
13
  - multimodal
 
18
  - tf
19
  ---
20
 
21
+ *See [our collection](https://huggingface.co/collections/zeromodels/qwen25-vl-6a7cc9f463d6956b6c3ba911) for all Qwen2.5-VL sizes.*
22
 
23
  # Run Qwen2.5-VL with Keras 3: JAX, PyTorch, or TensorFlow
24
 
25
+ [![GitHub](https://img.shields.io/badge/GitHub-ZeroModels-181717?logo=github)](https://github.com/IMvision12/ZeroModels) [![Docs](https://img.shields.io/badge/Docs-Qwen2.5--VL-1f6feb)](https://imvision12.github.io/ZeroModels/qwen2_5_vl/) [![HuggingFace](https://img.shields.io/badge/HuggingFace-Qwen2.5--VL-ffd21e?logo=huggingface&logoColor=black)](https://huggingface.co/collections/zeromodels/qwen25-vl-6a7cc9f463d6956b6c3ba911)
26
 
27
+ # zeromodels/qwen2.5-vl-7b-instruct
28
 
29
+ Pure-**Keras 3** conversion of [`Qwen/Qwen2.5-VL-7B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct) for [zeromodels](https://github.com/IMvision12/ZeroModels). One implementation runs unmodified on **TensorFlow / Torch / JAX**. This is the **7B** variant, served here as **image + text -> text** via `Qwen2_5VLProcessor`; weights are stored in **bfloat16**.
30
 
31
  For model details, license, and usage terms, see the upstream [model card](https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct).
32
 
 
44
  import os
45
  os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
46
 
47
+ from zeromodels.models.qwen2_5_vl import Qwen2_5VLTextGenerate, Qwen2_5VLProcessor
48
 
49
+ model = Qwen2_5VLTextGenerate.from_weights("zeromodels/qwen2.5-vl-7b-instruct")
50
+ processor = Qwen2_5VLProcessor.from_weights("zeromodels/qwen2.5-vl-7b-instruct")
51
 
52
  inputs = processor(conversation=[
53
  {"role": "user", "content": [{"type": "text", "text": "Hello, who are you?"}]}
 
63
  os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
64
 
65
  from PIL import Image
66
+ from zeromodels.models.qwen2_5_vl import Qwen2_5VLConditionalGenerate, Qwen2_5VLProcessor
67
 
68
+ model = Qwen2_5VLConditionalGenerate.from_weights("zeromodels/qwen2.5-vl-7b-instruct")
69
+ processor = Qwen2_5VLProcessor.from_weights("zeromodels/qwen2.5-vl-7b-instruct")
70
 
71
  inputs = processor(conversation=[
72
  {"role": "user", "content": [
 
78
  print(processor.decode(outputs[0]))
79
  ```
80
 
81
+ Load any Qwen2.5-VL variant the same way with `from_weights("zeromodels/<variant>")`:
82
 
83
  | Variant | Hub |
84
  | --- | --- |
85
+ | `qwen2.5-vl-3b-instruct` | [zeromodels/qwen2.5-vl-3b-instruct](https://huggingface.co/zeromodels/qwen2.5-vl-3b-instruct) |
86
+ | `qwen2.5-vl-7b-instruct` | [zeromodels/qwen2.5-vl-7b-instruct](https://huggingface.co/zeromodels/qwen2.5-vl-7b-instruct) |
87
+ | `qwen2.5-vl-32b-instruct` | [zeromodels/qwen2.5-vl-32b-instruct](https://huggingface.co/zeromodels/qwen2.5-vl-32b-instruct) |
88
+ | `qwen2.5-vl-72b-instruct` | [zeromodels/qwen2.5-vl-72b-instruct](https://huggingface.co/zeromodels/qwen2.5-vl-72b-instruct) |
89
 
90
  ## Special Thanks
91
 
kf_config.json → zm_config.json RENAMED
@@ -1,7 +1,7 @@
1
  {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.2.2",
4
- "model_module": "kerasformers.models.qwen2_5_vl",
5
  "model_class": "Qwen2_5VLConditionalGenerate",
6
  "variant": "qwen2.5-vl-7b-instruct",
7
  "weights": "model.weights.json",
 
1
  {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.2",
4
+ "model_module": "zeromodels.models.qwen2_5_vl",
5
  "model_class": "Qwen2_5VLConditionalGenerate",
6
  "variant": "qwen2.5-vl-7b-instruct",
7
  "weights": "model.weights.json",
kf_preprocessor.json → zm_preprocessor.json RENAMED
@@ -1,22 +1,22 @@
1
- {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.2.2",
4
- "preprocessor_module": "kerasformers.models.qwen2_vl",
5
- "preprocessor_class": "Qwen2VLImageProcessor",
6
- "variant": "qwen2.5-vl-7b-instruct",
7
- "patch_size": 14,
8
- "spatial_merge_size": 2,
9
- "temporal_patch_size": 2,
10
- "min_pixels": 3136,
11
- "max_pixels": 1003520,
12
- "image_mean": [
13
- 0.48145467042922974,
14
- 0.45782750844955444,
15
- 0.40821072459220886
16
- ],
17
- "image_std": [
18
- 0.2686295509338379,
19
- 0.2613025903701782,
20
- 0.27577710151672363
21
- ]
22
  }
 
1
+ {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.2",
4
+ "preprocessor_module": "zeromodels.models.qwen2_vl",
5
+ "preprocessor_class": "Qwen2VLImageProcessor",
6
+ "variant": "qwen2.5-vl-7b-instruct",
7
+ "patch_size": 14,
8
+ "spatial_merge_size": 2,
9
+ "temporal_patch_size": 2,
10
+ "min_pixels": 3136,
11
+ "max_pixels": 1003520,
12
+ "image_mean": [
13
+ 0.48145467042922974,
14
+ 0.45782750844955444,
15
+ 0.40821072459220886
16
+ ],
17
+ "image_std": [
18
+ 0.2686295509338379,
19
+ 0.2613025903701782,
20
+ 0.27577710151672363
21
+ ]
22
  }