hf_mirrors/GLM-5.3-mixed-4-8
Model Introduction
Files & versions
Analysis

mlx-community/GLM-5.3-mixed-4-8

This model mlx-community/GLM-5.3-mixed-4-8 was converted to MLX format from zai-org/GLM-5.3-BF16 using mlx-lm version 0.31.3 (with PR #1410).

Note that this quant is using the GLM-5.3-BF16 as base.

This is created for people using a single Apple Mac Studio M3 Ultra with 512 GB. The 4-bit version of GLM-5.3 fits comfortably. But we can do better. We aim to get better results from a slightly larger and smarter quantization. It should also not be so large that it leaves no memory for a useful context window.

You can find more similar MLX model quants for Apple Mac Studio with 512 GB at https://huggingface.co/bibproj

pip install mlx-lm

mlx_lm.generate --model mlx-community/GLM-5.3-mixed-4-8 --prompt "Hi"

What is this mixed-4-8?

This is "similar" to the recipe that antirez uses for his well-known DeepSeek-V4 / DwarfStar inference code.


Recipe

To make to the quant perform better under stress, only the expert tensors are quantized to 4-bit. All the other tensors are kept at 8-bit. You could say that this quant has an 8-bit "brain" and 4-bit experts.

In the convert.py file of mlx-lm on your system ( you can see the original code here ), replace the code inside def mixed_quant_predicate() with something like

        # Build a mixed quant like "mixed-4-8"
        q_bits = 8
        if "switch_mlp" in path:
           q_bits = 4
        print("path:", path, "index:", index, "q_bits:", q_bits)
        return {"group_size": group_size, "bits": q_bits, "mode": mode}

Then create your GLM-5.3-mixed-4-8 quant with

mlx_lm.convert --hf-path zai-org/GLM-5.3-BF16 --mlx-path GLM-5.3-mixed-4-8 -q --quant-predicate mixed_4_6

Enjoy!