Downloads · 30 days
153
9% of all-time downloads
josefprusa/GLM-5.2-Vision-MLX-adapter
GLM-5.2-Vision-MLX-adapter is a image-text-to-text model from josefprusa. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for mlx. The card lists the license as mit.
Experimental, AI-built — not production software. This adapter and its serving stack were built largely by AI agents under human direction and validated by measurement, not review. Enjoy it, hack on it, review it befo…
Downloads · 30 days
153
9% of all-time downloads
All-time downloads
1.8K
Public
Repo size
953 MB
Likes
0
Public
Click a slice to open those files.
.safetensors933 MB · 98%
From the Hugging Face model README
Experimental, AI-built — not production software. This adapter and its serving stack were built largely by AI agents under human direction and validated by measurement, not review. Enjoy it, hack on it, review it before you depend on it — and if you'd like to adopt and polish it properly, please do; the author would be delighted and simply doesn't have the time.
The vision half of baseten/GLM-5.2-Vision-NVFP4, converted to MLX-native safetensors so a locally served GLM-5.2 on Apple Silicon can see images — no Blackwell GPUs, no SGLang.
GLM-5.2-Vision bolts the frozen MoonViT-3d encoder from Kimi-K2.6 onto a frozen GLM-5.2 through a trained 49.5M-parameter PatchMerger projector (1152→4608→6144). This repository packages exactly that vision side:
| file | contents |
|---|---|
vision_tower.safetensors | MoonViT-3d, 27 layers, 1152-dim (834 MB, frozen upstream weights) |
mm_projector.safetensors | trained PatchMerger MLP (99 MB) |
| processor / config files | image preprocessing + chat template glue |
Because the GLM text backbone is untouched by the vision training, this adapter composes with any GLM-5.2 text quantization — the tower runs on the image, the projector maps patch embeddings into GLM's token space, and the embeddings are spliced into the prompt.
Serving is implemented in the omlx fork:
point the model's vision_adapter_dir at this repository's contents in
model_settings.json, restart, and send standard OpenAI-style image_url (base64) chat
requests to /v1/chat/completions. Verified against 3.5–4.5 bpw GLM-5.2 quants on an
M3 Ultra: image understanding works over the plain /v1 API with prefix caching intact.
Known limitation: multi-image prompts can bleed attention between images — single-image prompts are the reliable path today.
License: MIT, following the source release.