Views
No views yet
zai-org/GLM-4.7-Flash for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX. GLM-4.7-Flash is a mixture-of-experts model (MLA + DeepSeekMoE) served as text -> text; weights are stored in bfloat16, with the mixture-of-experts 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 zeromodels.models.glm4_moe_lite import Glm4MoeLiteTextGenerate, Glm4MoeLiteTokenizer
5
6model = Glm4MoeLiteTextGenerate.from_weights("zeromodels/glm-4.7-flash")
7tokenizer = Glm4MoeLiteTokenizer.from_weights("zeromodels/glm-4.7-flash")
8
9messages = [{"role": "user", "content": "Name three prime numbers."}]
10inputs = tokenizer(messages)
11outputs = model.generate(**inputs, max_new_tokens=128)
12print(tokenizer.decode(outputs[0]))from_weights("zeromodels/<variant>"). Browse them all in the GLM collection.mit (per the upstream model card).