Image-Text-to-Text
ZeroModels
Keras
PyTorch
JAX
TensorFlow
English
internvl
internvl3
multimodal
vision
Instructions to use zeromodels/internvl3-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/internvl3-2b with ZeroModels:
# pip install -U zeromodels # ZeroModels is pure Keras 3, so pick a backend: "jax", "torch" or "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" from zeromodels import AutoZModel # AutoZModel reads the repo's model_type and loads the matching class. # For a task head use the matching loader, e.g. AutoZMImageClassify / AutoZMDetect / # AutoZMSemanticSegment / AutoZMTextGenerate (see zeromodels.auto). model = AutoZModel.from_weights("zeromodels/internvl3-2b") - Keras
How to use zeromodels/internvl3-2b with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://zeromodels/internvl3-2b") - Notebooks
- Google Colab
- Kaggle
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:
|
| 7 |
language:
|
| 8 |
- en
|
| 9 |
tags:
|
| 10 |
- keras
|
| 11 |
-
-
|
| 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 |
-
[ for [
|
| 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
|
| 48 |
|
| 49 |
-
model = InternVLConditionalGenerate.from_weights("
|
| 50 |
|
| 51 |
-
processor = InternVLProcessor.from_weights("
|
| 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("
|
| 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 |
+
[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/internvl/) [](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": "
|
| 3 |
-
"
|
| 4 |
-
"model_module": "
|
| 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": "
|
| 3 |
-
"
|
| 4 |
-
"preprocessor_module": "
|
| 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,
|