Qwen3.5-MoE
Collection
Pure-Keras 3 conversions of Qwen3.5-MoE (kerasformers). • 3 items • Updated
How to use zeromodels/qwen3.5-35b-a3b 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/qwen3.5-35b-a3b")
How to use zeromodels/qwen3.5-35b-a3b 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.5-35b-a3b")
Pure-Keras 3 conversion of Qwen/Qwen3.5-35B-A3B for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX. Qwen3.5-MoE is a multimodal MoE VLM (Qwen3-Next hybrid text + a vision tower); weights are stored in bfloat16.
For model details, license, and usage terms, see the upstream model card.
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from PIL import Image
from zeromodels.models.qwen3_5_moe import Qwen3_5MoeConditionalGenerate, Qwen3_5MoeProcessor
model = Qwen3_5MoeConditionalGenerate.from_weights("zeromodels/qwen3.5-35b-a3b")
processor = Qwen3_5MoeProcessor.from_weights("zeromodels/qwen3.5-35b-a3b")
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.