Qwen3.8
Collection
Pure-Keras 3 conversions of Qwen3.8 (kerasformers). • 1 item • Updated
How to use zeromodels/qwen3.8-27b with Keras:
# Available backend options are: "jax", "torch", "tensorflow".
import os
os.environ["KERAS_BACKEND"] = "jax"
import keras
model = keras.saving.load_model("hf://zeromodels/qwen3.8-27b")
Pure-Keras 3 conversion of Qwen/Qwen3.8-27B for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX. Qwen3.5 is a native vision-language model: a Qwen3-VL vision tower + a dense Gated-DeltaNet / gated-full-attention hybrid text decoder. Weights are stored in bfloat16.
This repo hosts the full VLM. Load it with Qwen3_5ConditionalGenerate for image + text, or with Qwen3_5TextGenerate for text-only (it reads just the language model and drops the vision tower).
For model details, license, and usage terms, see the upstream model card.
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from zeromodels.models.qwen3_5 import Qwen3_5TextGenerate, Qwen3_5Tokenizer
model = Qwen3_5TextGenerate.from_weights("zeromodels/qwen3.8-27b")
tokenizer = Qwen3_5Tokenizer.from_weights("zeromodels/qwen3.8-27b")
outputs = model.generate(**tokenizer("The capital of France is"), max_new_tokens=32)
print(tokenizer.decode(outputs[0]))
from PIL import Image
from zeromodels.models.qwen3_5 import Qwen3_5ConditionalGenerate, Qwen3_5Processor
model = Qwen3_5ConditionalGenerate.from_weights("zeromodels/qwen3.8-27b")
processor = Qwen3_5Processor.from_weights("zeromodels/qwen3.8-27b")
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]))
A huge thank you to the Qwen team at Alibaba for creating and releasing these models.
License: Apache 2.0.
Base model
Qwen/Qwen3.8-27B