IMvision12 commited on
Commit
a16ffb6
·
verified ·
1 Parent(s): 335df9e

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/Qwen3-VL-8B-Thinking
5
- library_name: kerasformers
6
  language:
7
  - en
8
  tags:
9
  - keras
10
- - kerasformers
11
  - qwen3_vl
12
  - qwen3-vl
13
  - multimodal
@@ -20,11 +20,11 @@ tags:
20
 
21
  # Run Qwen3-VL with Keras 3: JAX, PyTorch, or TensorFlow
22
 
23
- [![GitHub](https://img.shields.io/badge/GitHub-KerasFormers-181717?logo=github)](https://github.com/IMvision12/KerasFormers) [![Docs](https://img.shields.io/badge/Docs-Qwen3--VL-1f6feb)](https://imvision12.github.io/KerasFormers/qwen3_vl/) [![HuggingFace](https://img.shields.io/badge/HuggingFace-Qwen3--VL-ffd21e?logo=huggingface&logoColor=black)](https://huggingface.co/collections/kerasformers/qwen3-vl-6a7d7677c2926ecbddb1ed0a)
24
 
25
- # kerasformers/qwen3-vl-8b-thinking
26
 
27
- Pure-**Keras 3** conversion of [`Qwen/Qwen3-VL-8B-Thinking`](https://huggingface.co/Qwen/Qwen3-VL-8B-Thinking) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**. This is the **8B** variant, served here as **image + text -> text** via `Qwen3VLProcessor`; weights are stored in **bfloat16**.
28
 
29
  For model details, license, and usage terms, see the upstream [model card](https://huggingface.co/Qwen/Qwen3-VL-8B-Thinking).
30
 
@@ -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.qwen3_vl import Qwen3VLTextGenerate, Qwen3VLProcessor
48
 
49
- model = Qwen3VLTextGenerate.from_weights("kerasformers/qwen3-vl-8b-thinking")
50
- processor = Qwen3VLProcessor.from_weights("kerasformers/qwen3-vl-8b-thinking")
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.qwen3_vl import Qwen3VLConditionalGenerate, Qwen3VLProcessor
67
 
68
- model = Qwen3VLConditionalGenerate.from_weights("kerasformers/qwen3-vl-8b-thinking")
69
- processor = Qwen3VLProcessor.from_weights("kerasformers/qwen3-vl-8b-thinking")
70
 
71
  inputs = processor(conversation=[
72
  {"role": "user", "content": [
@@ -78,18 +78,18 @@ outputs = model.generate(**inputs, max_new_tokens=64)
78
  print(processor.decode(outputs[0]))
79
  ```
80
 
81
- Load any Qwen3-VL variant the same way with `from_weights("kerasformers/<variant>")`:
82
 
83
  | Variant | Hub |
84
  | --- | --- |
85
- | `qwen3-vl-2b-instruct` | [kerasformers/qwen3-vl-2b-instruct](https://huggingface.co/kerasformers/qwen3-vl-2b-instruct) |
86
- | `qwen3-vl-2b-thinking` | [kerasformers/qwen3-vl-2b-thinking](https://huggingface.co/kerasformers/qwen3-vl-2b-thinking) |
87
- | `qwen3-vl-4b-instruct` | [kerasformers/qwen3-vl-4b-instruct](https://huggingface.co/kerasformers/qwen3-vl-4b-instruct) |
88
- | `qwen3-vl-4b-thinking` | [kerasformers/qwen3-vl-4b-thinking](https://huggingface.co/kerasformers/qwen3-vl-4b-thinking) |
89
- | `qwen3-vl-8b-instruct` | [kerasformers/qwen3-vl-8b-instruct](https://huggingface.co/kerasformers/qwen3-vl-8b-instruct) |
90
- | `qwen3-vl-8b-thinking` | [kerasformers/qwen3-vl-8b-thinking](https://huggingface.co/kerasformers/qwen3-vl-8b-thinking) |
91
- | `qwen3-vl-32b-instruct` | [kerasformers/qwen3-vl-32b-instruct](https://huggingface.co/kerasformers/qwen3-vl-32b-instruct) |
92
- | `qwen3-vl-32b-thinking` | [kerasformers/qwen3-vl-32b-thinking](https://huggingface.co/kerasformers/qwen3-vl-32b-thinking) |
93
 
94
  ## Special Thanks
95
 
 
2
  pipeline_tag: image-text-to-text
3
  license: apache-2.0
4
  base_model: Qwen/Qwen3-VL-8B-Thinking
5
+ library_name: zeromodels
6
  language:
7
  - en
8
  tags:
9
  - keras
10
+ - zeromodels
11
  - qwen3_vl
12
  - qwen3-vl
13
  - multimodal
 
20
 
21
  # Run Qwen3-VL with Keras 3: JAX, PyTorch, or TensorFlow
22
 
23
+ [![GitHub](https://img.shields.io/badge/GitHub-ZeroModels-181717?logo=github)](https://github.com/IMvision12/ZeroModels) [![Docs](https://img.shields.io/badge/Docs-Qwen3--VL-1f6feb)](https://imvision12.github.io/ZeroModels/qwen3_vl/) [![HuggingFace](https://img.shields.io/badge/HuggingFace-Qwen3--VL-ffd21e?logo=huggingface&logoColor=black)](https://huggingface.co/collections/zeromodels/qwen3-vl-6a7d7677c2926ecbddb1ed0a)
24
 
25
+ # zeromodels/qwen3-vl-8b-thinking
26
 
27
+ Pure-**Keras 3** conversion of [`Qwen/Qwen3-VL-8B-Thinking`](https://huggingface.co/Qwen/Qwen3-VL-8B-Thinking) for [zeromodels](https://github.com/IMvision12/ZeroModels). One implementation runs unmodified on **TensorFlow / Torch / JAX**. This is the **8B** variant, served here as **image + text -> text** via `Qwen3VLProcessor`; weights are stored in **bfloat16**.
28
 
29
  For model details, license, and usage terms, see the upstream [model card](https://huggingface.co/Qwen/Qwen3-VL-8B-Thinking).
30
 
 
44
  import os
45
  os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
46
 
47
+ from zeromodels.models.qwen3_vl import Qwen3VLTextGenerate, Qwen3VLProcessor
48
 
49
+ model = Qwen3VLTextGenerate.from_weights("zeromodels/qwen3-vl-8b-thinking")
50
+ processor = Qwen3VLProcessor.from_weights("zeromodels/qwen3-vl-8b-thinking")
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.qwen3_vl import Qwen3VLConditionalGenerate, Qwen3VLProcessor
67
 
68
+ model = Qwen3VLConditionalGenerate.from_weights("zeromodels/qwen3-vl-8b-thinking")
69
+ processor = Qwen3VLProcessor.from_weights("zeromodels/qwen3-vl-8b-thinking")
70
 
71
  inputs = processor(conversation=[
72
  {"role": "user", "content": [
 
78
  print(processor.decode(outputs[0]))
79
  ```
80
 
81
+ Load any Qwen3-VL variant the same way with `from_weights("zeromodels/<variant>")`:
82
 
83
  | Variant | Hub |
84
  | --- | --- |
85
+ | `qwen3-vl-2b-instruct` | [zeromodels/qwen3-vl-2b-instruct](https://huggingface.co/zeromodels/qwen3-vl-2b-instruct) |
86
+ | `qwen3-vl-2b-thinking` | [zeromodels/qwen3-vl-2b-thinking](https://huggingface.co/zeromodels/qwen3-vl-2b-thinking) |
87
+ | `qwen3-vl-4b-instruct` | [zeromodels/qwen3-vl-4b-instruct](https://huggingface.co/zeromodels/qwen3-vl-4b-instruct) |
88
+ | `qwen3-vl-4b-thinking` | [zeromodels/qwen3-vl-4b-thinking](https://huggingface.co/zeromodels/qwen3-vl-4b-thinking) |
89
+ | `qwen3-vl-8b-instruct` | [zeromodels/qwen3-vl-8b-instruct](https://huggingface.co/zeromodels/qwen3-vl-8b-instruct) |
90
+ | `qwen3-vl-8b-thinking` | [zeromodels/qwen3-vl-8b-thinking](https://huggingface.co/zeromodels/qwen3-vl-8b-thinking) |
91
+ | `qwen3-vl-32b-instruct` | [zeromodels/qwen3-vl-32b-instruct](https://huggingface.co/zeromodels/qwen3-vl-32b-instruct) |
92
+ | `qwen3-vl-32b-thinking` | [zeromodels/qwen3-vl-32b-thinking](https://huggingface.co/zeromodels/qwen3-vl-32b-thinking) |
93
 
94
  ## Special Thanks
95
 
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.qwen3_vl",
5
  "model_class": "Qwen3VLConditionalGenerate",
6
  "variant": "qwen3-vl-8b-thinking",
7
  "weights": "model.weights.json",
 
1
  {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.2",
4
+ "model_module": "zeromodels.models.qwen3_vl",
5
  "model_class": "Qwen3VLConditionalGenerate",
6
  "variant": "qwen3-vl-8b-thinking",
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": "qwen3-vl-8b-thinking",
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.5,
14
- 0.5,
15
- 0.5
16
- ],
17
- "image_std": [
18
- 0.5,
19
- 0.5,
20
- 0.5
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": "qwen3-vl-8b-thinking",
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.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "image_std": [
18
+ 0.5,
19
+ 0.5,
20
+ 0.5
21
+ ]
22
  }