GLM-4.5-Air-ULRE (abliterated, MLX 4-bit)
An
abliterated (refusal-reduced) build of
GLM-4.5-Air (Zhipu/Z.ai; 106B-A12B MoE), 4-bit MLX,
produced with
ULRE — a per-layer residual-stream steering edit baked into the attention output
projection. Quantized base from
lmstudio-community/GLM-4.5-Air-MLX-4bit.
GLM-4.5-Air is a strong agentic / tool-calling model. ULRE de-refuses it very cleanly while
preserving and even improving capability.
Results
De-refusal judged by an independent local LLM judge (gpt-oss-120b-heretic) on 100 held adversarial
prompts; 0=refuse … 1=clean compliance … 4-5=strong-steer. Validated in both modes:
| mode | clean compliance | refuse | strong-steer | mean |
|---|
| non-thinking (@512) | 96 / 100 | 0 | 1 | 1.09 |
| thinking (@1536) | 95 / 100 | 1 | 3 | 1.10 |
(base GLM-4.5-Air refuses ~23/24 on the same screen.) The edit de-refuses cleanly whether or not the
model is reasoning.
Capability gates (thinking mode, same harness, base vs this model):
| gate | base | this model | Δ |
|---|
| math (GSM8K) | 0.83 | 0.83 | 0pp |
| code (HumanEval) | 0.65 | 0.825 | +17.5pp (over-refusal recovery) |
Best de-refusal in the ULRE series (vs Mistral-Large 78, Qwen3-32B 68), with capability intact/up.
Method (ULRE)
ULRE subtracts alpha * u_l (the layer-l harmful−harmless activation mean-difference direction)
from the output of a band of decoder layers (here o_proj on layers 16–26, alpha = 6), baked
statically as an o_proj bias. The alpha is tuned to the lowest value that saturates de-refusal.
⚠️ Loading — needs a one-line glm4_moe loader patch (or run via mlx_lm.server)
mlx-lm's glm4_moe.py hardcodes o_proj to have no bias, so it must be told to build one
(backwards-compatible; base models default to False):
1# class ModelArgs: add field
2 o_proj_bias: bool = False
3# class Attention.__init__: replace the o_proj line
4 self.o_proj = nn.Linear(n_heads * head_dim, dim, bias=getattr(args, "o_proj_bias", False))
The model's config.json sets "o_proj_bias": true. Then load via the patched mlx_lm:
1# serve on an OpenAI-compatible endpoint (works with patched mlx-lm)
2mlx_lm.server --model gregfrank/GLM-4.5-Air-ULRE-abliterated --port 8080
Point any MCP-capable client (Open WebUI, LibreChat, or LM Studio as an MCP host pointing at the
endpoint) at http://127.0.0.1:8080/v1. (LM Studio's bundled MLX engine does not carry this patch,
so it won't load the file directly — use mlx_lm.server.)
Notes & caveats
- De-refusal validated in both thinking and non-thinking modes (95–96/100 clean), and capability
gates were run in thinking mode (math/code preserved or improved). Verified serving via
mlx_lm.server.
- Research artifact for studying refusal mechanisms / safety-tuning robustness. Use responsibly under
the base model's MIT license and applicable law.