IMvision12 commited on
Commit
8ddf0f7
·
verified ·
1 Parent(s): 29c0bfe

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

Browse files
README.md CHANGED
@@ -3,12 +3,12 @@ pipeline_tag: image-text-to-text
3
  license: apache-2.0
4
  license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE
5
  base_model: OpenGVLab/InternVL3-2B-hf
6
- library_name: kerasformers
7
  language:
8
  - en
9
  tags:
10
  - keras
11
- - kerasformers
12
  - internvl
13
  - internvl3
14
  - multimodal
@@ -22,11 +22,11 @@ license_name: qwen
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-2b
28
 
29
- Pure-**Keras 3** conversion of [`OpenGVLab/InternVL3-2B-hf`](https://huggingface.co/OpenGVLab/InternVL3-2B-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-2B-hf).
32
 
@@ -44,11 +44,11 @@ os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
44
 
45
  from PIL import Image
46
 
47
- from kerasformers.models.internvl import InternVLConditionalGenerate, InternVLProcessor
48
 
49
- model = InternVLConditionalGenerate.from_weights("kerasformers/internvl3-2b")
50
 
51
- processor = InternVLProcessor.from_weights("kerasformers/internvl3-2b")
52
 
53
  inputs = processor(conversation=[
54
 
@@ -68,7 +68,7 @@ print(processor.decode(outputs[0]))
68
 
69
  ```
70
 
71
- 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).
72
 
73
  ## Special Thanks
74
 
 
3
  license: apache-2.0
4
  license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE
5
  base_model: OpenGVLab/InternVL3-2B-hf
6
+ library_name: zeromodels
7
  language:
8
  - en
9
  tags:
10
  - keras
11
+ - zeromodels
12
  - internvl
13
  - internvl3
14
  - multimodal
 
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-2b
28
 
29
+ Pure-**Keras 3** conversion of [`OpenGVLab/InternVL3-2B-hf`](https://huggingface.co/OpenGVLab/InternVL3-2B-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-2B-hf).
32
 
 
44
 
45
  from PIL import Image
46
 
47
+ from zeromodels.models.internvl import InternVLConditionalGenerate, InternVLProcessor
48
 
49
+ model = InternVLConditionalGenerate.from_weights("zeromodels/internvl3-2b")
50
 
51
+ processor = InternVLProcessor.from_weights("zeromodels/internvl3-2b")
52
 
53
  inputs = processor(conversation=[
54
 
 
68
 
69
  ```
70
 
71
+ 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).
72
 
73
  ## Special Thanks
74
 
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-2b",
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-2b",
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-2b",
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-2b",
7
  "size": 448,