Views
No views yet
Qwen/Qwen2-VL-72B for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX. This is the 72B variant, served here as image + text -> text via Qwen2VLProcessor; weights are stored in bfloat16.1import os
2os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
3
4from zeromodels.models.qwen2_vl import Qwen2VLTextGenerate, Qwen2VLProcessor
5
6model = Qwen2VLTextGenerate.from_weights("zeromodels/qwen2-vl-72b")
7processor = Qwen2VLProcessor.from_weights("zeromodels/qwen2-vl-72b")
8
9inputs = processor(conversation=[
10 {"role": "user", "content": [{"type": "text", "text": "Hello, who are you?"}]}
11])
12outputs = model.generate(**inputs, max_new_tokens=64)
13print(processor.decode(outputs[0]))1import os
2os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
3
4from PIL import Image
5from zeromodels.models.qwen2_vl import Qwen2VLConditionalGenerate, Qwen2VLProcessor
6
7model = Qwen2VLConditionalGenerate.from_weights("zeromodels/qwen2-vl-72b")
8processor = Qwen2VLProcessor.from_weights("zeromodels/qwen2-vl-72b")
9
10inputs = processor(conversation=[
11 {"role": "user", "content": [
12 {"type": "image", "image": Image.open("photo.jpg")},
13 {"type": "text", "text": "Describe this image in one sentence."},
14 ]}
15])
16outputs = model.generate(**inputs, max_new_tokens=64)
17print(processor.decode(outputs[0]))from_weights("zeromodels/<variant>"):| Variant | Hub |
|---|---|
qwen2-vl-72b | zeromodels/qwen2-vl-72b |
qwen2-vl-72b-instruct | zeromodels/qwen2-vl-72b-instruct |