Views
No views yet
zai-org/GLM-4.6V-Flash for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX. GLM-4.6V-Flash is a vision-language model (GLM-4V vision tower + GLM-4 dense decoder) served as image + text -> text via Glm4vProcessor; weights are stored in bfloat16.1import os
2os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
3
4from PIL import Image
5from zeromodels.models.glm4v import Glm4vConditionalGenerate, Glm4vProcessor
6
7model = Glm4vConditionalGenerate.from_weights("zeromodels/glm-4.6v-flash")
8processor = Glm4vProcessor.from_weights("zeromodels/glm-4.6v-flash")
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).