Recipe · about 30 minutes, most of it downloading
GLM 5.3 Flash-sauhard is published as ready-to-run MLX weights. Download them, start the server, and point Claude Code or any OpenAI-compatible app at localhost. Nothing leaves your machine.
uv manages Python and pins every package to the versions this build was tested with (MLX 0.32.4, mlx-vlm 0.7.9). The repo holds the server, the memory cap and the dashboard.
curl -LsSf https://astral.sh/uv/install.sh | sh git clone https://github.com/Sauhard74/glm-5.3-flash-sauhard.git cd glm-5.3-flash-sauhard uv sync
71 GB from Hugging Face. The download resumes if it is interrupted; run the same command again.
uv run hf download Sauhard74/GLM-5.3-Flash-sauhard-MLX --local-dir models/glm-5.3-flash-sauhard
Serves the OpenAI API (/v1/chat/completions) and the Anthropic API (/v1/messages) on port 8080, capped at 84 GB. Loading takes a minute or two; the vision warning in the log is expected, since this build is text-only.
# a key so only your apps can use the server
openssl rand -hex 24 > control/api_key
CAP_GB=84 MTP=0 scripts/quickserve.sh models/glm-5.3-flash-sauhardIn a second terminal. The model field must be the same path the server was started with.
curl -s http://127.0.0.1:8080/v1/chat/completions \
-H "Authorization: Bearer $(cat control/api_key)" -H "Content-Type: application/json" \
-d '{"model":"models/glm-5.3-flash-sauhard","messages":[{"role":"user","content":"Write a haiku about unified memory."}],"max_tokens":800}'Runs Claude Code against the local model, with a 128K context window. Subagents use it too.
MODEL_ID=models/glm-5.3-flash-sauhard scripts/claude-local.sh
Use these settings in Open WebUI, Cline, Continue, Zed, Jan, LM Studio's client mode or your own code.
http://127.0.0.1:8080/v1
models/glm-5.3-flash-sauhard
contents of control/api_key
Recommended sampling: temperature 1.0, top-p 0.95. The model thinks before it answers, so allow at least 2,000 output tokens.
Installs a small launchd service with the control panel at http://127.0.0.1:8090: start, stop and restart with one click, live memory and speed, and it comes back after a reboot. It creates the API key for you.
scripts/install-control.sh # open http://127.0.0.1:8090, pick GLM 5.3 Flash-sauhard, Start scripts/install-control.sh --uninstall # remove it
The dashboard's second profile, Qwen3.8-Flash-Next, needs its own download; see control/profiles.json.
model field in requests must match the path passed to quickserve.sh exactly.Authorization: Bearer … (OpenAI style) or x-api-key (Anthropic style).Every step that made these weights is in the repo, so you can calibrate on your own workload or pick a different size. You need the full GLM-5.3-Flash checkpoint (about 600 GB of temporary disk) and an evening: calibration took 5.5 hours on the M5 Max and the build about 10 minutes.
# 1. the original checkpoint uv run hf download zai-org/GLM-5.3-Flash --local-dir models/src-glm-5.3-flash # 2. calibration set: public code, agent, math and long-document data uv run python -m calib_data.build --model glm --out artifacts/glm/data # 3. stream the model layer by layer, recording routing and sensitivity (~5.5 h) uv run python -m calib.run --model glm --src models/src-glm-5.3-flash --data artifacts/glm/data --out artifacts/glm/calib # 4. prune to 153 experts, allocate bits to a 76 GB budget, LSQ rounding (~10 min) uv run python -m build.make --model glm --src models/src-glm-5.3-flash --calib artifacts/glm/calib \ --prune 153 --score reap --budget-gb 76 --drop-vision --rounding lsq --out models/glm-5.3-flash-sauhard # 5. check it against the original uv run python -m evals.kl --model models/glm-5.3-flash-sauhard
Change --budget-gb for a smaller or larger build, or edit calib_data/recipes.py to calibrate on a different mix of work.