Views
No views yet
| base Qwen3-32B | this model (ULRE) | |
|---|---|---|
| clean compliance | 0 / 100 | 68 / 100 |
| refuse | 86–97 | 18 |
| strong-steer (4-5) | — | 4 |
| gate | base | this model |
|---|---|---|
| tool-call validity | 0.95 | 0.97 |
| math (GSM8K-lite) | 0.88 | 0.94 |
| code (HumanEval-lite) | 0.325 | 0.50 |
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 28–43, alpha=16). This is baked statically into
each window layer's o_proj as a bias term o_proj.bias = -alpha * u_l. See the project's
docs/ULRE_DESIGN.md.o_proj bias. Add an optional flag to mlx_lm/models/qwen3.py (backwards-compatible — base models
default to False):1# in class ModelArgs:
2 o_proj_bias: bool = False
3# in class Attention.__init__:
4 self.o_proj = nn.Linear(n_heads * head_dim, dim, bias=getattr(args, "o_proj_bias", False))config.json sets "o_proj_bias": true. (A PR to upstream this optional flag is in
progress; once merged this patch is unnecessary.) Then load normally:1from mlx_lm import load, generate
2model, tok = load("gregfrank/Qwen3-32B-ULRE-abliterated")
3print(generate(model, tok, prompt=tok.apply_chat_template(
4 [{"role": "user", "content": "Hello"}], tokenize=False, add_generation_prompt=True),
5 max_tokens=256))