Instructions to use kerasformers/qwen2.5-vl-72b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasFormers
How to use kerasformers/qwen2.5-vl-72b-instruct with KerasFormers:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Keras
How to use kerasformers/qwen2.5-vl-72b-instruct with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://kerasformers/qwen2.5-vl-72b-instruct") - Notebooks
- Google Colab
- Kaggle
See our collection for all Qwen2.5-VL sizes.
Run Qwen2.5-VL with Keras 3: JAX, PyTorch, or TensorFlow
kerasformers/qwen2.5-vl-72b-instruct
Pure-Keras 3 conversion of Qwen/Qwen2.5-VL-72B-Instruct for kerasformers. One implementation runs unmodified on TensorFlow / Torch / JAX. This is the 72B variant, the largest Qwen2.5-VL, served here as image + text -> text via Qwen2_5VLProcessor; weights are sharded and stored in bfloat16.
For model details, license, and usage terms, see the upstream model card.
Paper: Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution (arXiv:2409.12191) · HF Papers
Paper: YaRN: Efficient Context Window Extension of Large Language Models (arXiv:2309.00071) · HF Papers
Paper: Qwen-VL: A Frontier Large Vision-Language Model with Versatile Abilities (arXiv:2308.12966) · HF Papers
✨ Quick start
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from PIL import Image
from kerasformers.models.qwen2_5_vl import Qwen2_5VLConditionalGenerate, Qwen2_5VLProcessor
model = Qwen2_5VLConditionalGenerate.from_weights("kerasformers/qwen2.5-vl-72b-instruct")
processor = Qwen2_5VLProcessor.from_weights("kerasformers/qwen2.5-vl-72b-instruct")
inputs = processor(conversation=[
{"role": "user", "content": [
{"type": "image", "image": Image.open("photo.jpg")},
{"type": "text", "text": "Describe this image in one sentence."},
]}
])
outputs = model.generate(**inputs, max_new_tokens=64)
print(processor.decode(outputs[0]))
Loading a 72B checkpoint
At 72B the checkpoint is sharded and does not fit comfortably on a single consumer GPU. These flags compose, and each trades a different resource:
model = Qwen2_5VLConditionalGenerate.from_weights(
"kerasformers/qwen2.5-vl-72b-instruct",
quantization="int8", # weight-only int8 on Dense / Embedding (~4x smaller)
)
Load any Qwen2.5-VL variant the same way with from_weights("kerasformers/<variant>"):
| Variant | Hub |
|---|---|
qwen2.5-vl-3b-instruct |
kerasformers/qwen2.5-vl-3b-instruct |
qwen2.5-vl-7b-instruct |
kerasformers/qwen2.5-vl-7b-instruct |
qwen2.5-vl-32b-instruct |
kerasformers/qwen2.5-vl-32b-instruct |
qwen2.5-vl-72b-instruct |
kerasformers/qwen2.5-vl-72b-instruct |
Special Thanks
A huge thank you to the Qwen team at Alibaba for creating and releasing these models.
License: Qwen license (see the upstream license).
- Downloads last month
- 12
Model tree for kerasformers/qwen2.5-vl-72b-instruct
Base model
Qwen/Qwen2.5-VL-72B-Instruct