Views
No views yet
Qwen/Qwen3-VL-8B-Instruct for kerasformers. One implementation runs unmodified on TensorFlow / Torch / JAX. This is the 8B variant, served here as image + text -> text via Qwen3VLProcessor; weights are stored in bfloat16.1import os
2os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
3
4from kerasformers.models.qwen3_vl import Qwen3VLTextGenerate, Qwen3VLProcessor
5
6model = Qwen3VLTextGenerate.from_weights("kerasformers/qwen3-vl-8b-instruct")
7processor = Qwen3VLProcessor.from_weights("kerasformers/qwen3-vl-8b-instruct")
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 kerasformers.models.qwen3_vl import Qwen3VLConditionalGenerate, Qwen3VLProcessor
6
7model = Qwen3VLConditionalGenerate.from_weights("kerasformers/qwen3-vl-8b-instruct")
8processor = Qwen3VLProcessor.from_weights("kerasformers/qwen3-vl-8b-instruct")
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("kerasformers/<variant>"):| Variant | Hub |
|---|---|
qwen3-vl-2b-instruct | kerasformers/qwen3-vl-2b-instruct |
qwen3-vl-2b-thinking | kerasformers/qwen3-vl-2b-thinking |
qwen3-vl-4b-instruct | kerasformers/qwen3-vl-4b-instruct |
qwen3-vl-4b-thinking | kerasformers/qwen3-vl-4b-thinking |
qwen3-vl-8b-instruct | kerasformers/qwen3-vl-8b-instruct |
qwen3-vl-8b-thinking | kerasformers/qwen3-vl-8b-thinking |
qwen3-vl-32b-instruct | kerasformers/qwen3-vl-32b-instruct |
qwen3-vl-32b-thinking | kerasformers/qwen3-vl-32b-thinking |