IMvision12 commited on
Commit
0dd6beb
·
verified ·
1 Parent(s): 78947fd

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

Browse files
README.md CHANGED
@@ -1,65 +1,65 @@
1
- ---
2
- pipeline_tag: image-text-to-text
3
- license: other
4
- license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE
5
- base_model: OpenGVLab/InternVL3-78B-hf
6
- library_name: kerasformers
7
- language:
8
- - en
9
- tags:
10
- - keras
11
- - kerasformers
12
- - internvl
13
- - internvl3
14
- - multimodal
15
- - vision
16
- - image-text-to-text
17
- - pytorch
18
- - jax
19
- - tf
20
- license_name: qwen
21
- ---
22
-
23
- # Run InternVL3 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-InternVL-1f6feb)](https://imvision12.github.io/KerasFormers/internvl/) [![HuggingFace](https://img.shields.io/badge/HuggingFace-InternVL-ffd21e?logo=huggingface&logoColor=black)](https://huggingface.co/collections/kerasformers/internvl-6a8277076dbb163f53241dbd)
26
-
27
- # kerasformers/internvl3-78b
28
-
29
- Pure-**Keras 3** conversion of [`OpenGVLab/InternVL3-78B-hf`](https://huggingface.co/OpenGVLab/InternVL3-78B-hf) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**. This is a **InternVL3** checkpoint, served as **image + text -> text** via `InternVLProcessor`; weights are stored in **bfloat16**.
30
-
31
- For model details, license, and usage terms, see the upstream [model card](https://huggingface.co/OpenGVLab/InternVL3-78B-hf).
32
-
33
- Paper: [InternVL3: Exploring Advanced Training and Test-Time Recipes for Open-Source Multimodal Models (arXiv:2504.10479)](https://arxiv.org/abs/2504.10479) · [HF Papers](https://huggingface.co/papers/2504.10479)
34
-
35
- Paper: [Qwen2.5 Technical Report (arXiv:2412.15115)](https://arxiv.org/abs/2412.15115) · [HF Papers](https://huggingface.co/papers/2412.15115)
36
-
37
- ## ✨ Quick start
38
-
39
- ```python
40
- import os
41
- os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
42
-
43
- from PIL import Image
44
- from kerasformers.models.internvl import InternVLConditionalGenerate, InternVLProcessor
45
-
46
- model = InternVLConditionalGenerate.from_weights("kerasformers/internvl3-78b")
47
- processor = InternVLProcessor.from_weights("kerasformers/internvl3-78b")
48
-
49
- inputs = processor(conversation=[
50
- {"role": "user", "content": [
51
- {"type": "image", "image": Image.open("photo.jpg")},
52
- {"type": "text", "text": "Describe this image in one sentence."},
53
- ]}
54
- ])
55
- outputs = model.generate(**inputs, max_new_tokens=64)
56
- print(processor.decode(outputs[0]))
57
- ```
58
-
59
- Load any InternVL variant the same way with `from_weights("kerasformers/<variant>")`. Browse them all in the [InternVL collection](https://huggingface.co/collections/kerasformers/internvl-6a8277076dbb163f53241dbd).
60
-
61
- ## Special Thanks
62
-
63
- A huge thank you to the OpenGVLab team for creating and releasing the InternVL models.
64
-
65
- License: see the [upstream license](https://huggingface.co/OpenGVLab/InternVL3-78B-hf/blob/main/LICENSE).
 
1
+ ---
2
+ pipeline_tag: image-text-to-text
3
+ license: other
4
+ license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE
5
+ base_model: OpenGVLab/InternVL3-78B-hf
6
+ library_name: zeromodels
7
+ language:
8
+ - en
9
+ tags:
10
+ - keras
11
+ - zeromodels
12
+ - internvl
13
+ - internvl3
14
+ - multimodal
15
+ - vision
16
+ - image-text-to-text
17
+ - pytorch
18
+ - jax
19
+ - tf
20
+ license_name: qwen
21
+ ---
22
+
23
+ # Run InternVL3 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-InternVL-1f6feb)](https://imvision12.github.io/ZeroModels/internvl/) [![HuggingFace](https://img.shields.io/badge/HuggingFace-InternVL-ffd21e?logo=huggingface&logoColor=black)](https://huggingface.co/collections/zeromodels/internvl-6a8277076dbb163f53241dbd)
26
+
27
+ # zeromodels/internvl3-78b
28
+
29
+ Pure-**Keras 3** conversion of [`OpenGVLab/InternVL3-78B-hf`](https://huggingface.co/OpenGVLab/InternVL3-78B-hf) for [zeromodels](https://github.com/IMvision12/ZeroModels). One implementation runs unmodified on **TensorFlow / Torch / JAX**. This is a **InternVL3** checkpoint, served as **image + text -> text** via `InternVLProcessor`; weights are stored in **bfloat16**.
30
+
31
+ For model details, license, and usage terms, see the upstream [model card](https://huggingface.co/OpenGVLab/InternVL3-78B-hf).
32
+
33
+ Paper: [InternVL3: Exploring Advanced Training and Test-Time Recipes for Open-Source Multimodal Models (arXiv:2504.10479)](https://arxiv.org/abs/2504.10479) · [HF Papers](https://huggingface.co/papers/2504.10479)
34
+
35
+ Paper: [Qwen2.5 Technical Report (arXiv:2412.15115)](https://arxiv.org/abs/2412.15115) · [HF Papers](https://huggingface.co/papers/2412.15115)
36
+
37
+ ## ✨ Quick start
38
+
39
+ ```python
40
+ import os
41
+ os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
42
+
43
+ from PIL import Image
44
+ from zeromodels.models.internvl import InternVLConditionalGenerate, InternVLProcessor
45
+
46
+ model = InternVLConditionalGenerate.from_weights("zeromodels/internvl3-78b")
47
+ processor = InternVLProcessor.from_weights("zeromodels/internvl3-78b")
48
+
49
+ inputs = processor(conversation=[
50
+ {"role": "user", "content": [
51
+ {"type": "image", "image": Image.open("photo.jpg")},
52
+ {"type": "text", "text": "Describe this image in one sentence."},
53
+ ]}
54
+ ])
55
+ outputs = model.generate(**inputs, max_new_tokens=64)
56
+ print(processor.decode(outputs[0]))
57
+ ```
58
+
59
+ Load any InternVL variant the same way with `from_weights("zeromodels/<variant>")`. Browse them all in the [InternVL collection](https://huggingface.co/collections/zeromodels/internvl-6a8277076dbb163f53241dbd).
60
+
61
+ ## Special Thanks
62
+
63
+ A huge thank you to the OpenGVLab team for creating and releasing the InternVL models.
64
+
65
+ License: see the [upstream license](https://huggingface.co/OpenGVLab/InternVL3-78B-hf/blob/main/LICENSE).
kf_config.json → zm_config.json RENAMED
@@ -1,7 +1,7 @@
1
  {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.2.4",
4
- "model_module": "kerasformers.models.internvl",
5
  "model_class": "InternVLConditionalGenerate",
6
  "variant": "internvl3-78b",
7
  "weights": "model.weights.json",
 
1
  {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.4",
4
+ "model_module": "zeromodels.models.internvl",
5
  "model_class": "InternVLConditionalGenerate",
6
  "variant": "internvl3-78b",
7
  "weights": "model.weights.json",
kf_preprocessor.json → zm_preprocessor.json RENAMED
@@ -1,7 +1,7 @@
1
  {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.2.4",
4
- "preprocessor_module": "kerasformers.models.internvl",
5
  "preprocessor_class": "InternVLImageProcessor",
6
  "variant": "internvl3-78b",
7
  "size": 448,
 
1
  {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.4",
4
+ "preprocessor_module": "zeromodels.models.internvl",
5
  "preprocessor_class": "InternVLImageProcessor",
6
  "variant": "internvl3-78b",
7
  "size": 448,