Views
No views yet
zai-org/GLM-4.5V for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX. GLM-4.5V is a mixture-of-experts vision-language model (GLM-4V vision tower + GLM-4.5 MoE decoder) served as image + text -> text via Glm4vMoeProcessor; weights are stored in bfloat16, with the MoE router correction bias kept in float32 (matching the upstream mixed-precision checkpoint). See zm_config.json (weight_dtype + weight_dtype_overrides) for the exact layout.1import os
2os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
3
4from PIL import Image
5from zeromodels.models.glm4v_moe import Glm4vMoeConditionalGenerate, Glm4vMoeProcessor
6
7model = Glm4vMoeConditionalGenerate.from_weights("zeromodels/glm-4.5v")
8processor = Glm4vMoeProcessor.from_weights("zeromodels/glm-4.5v")
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>"). Browse them all in the GLM collection.mit (per the upstream model card).