Hy4-flash (abliterated)

Huge thanks to Hugging Face for generously sponsoring the compute used to abliterate these models! This was done on HF Jobs, which makes it incredibly easy to run tasks such as these :)

Join the Discord: https://discord.com/invite/foss

refusal rates before and after, the search trade-off, and the per-layer edit

This is tencent/Hy4-flash with its refusal behaviour removed by directional ablation. It has the same files and the same BF16 format as the original, so it loads anywhere the original loads.

GGUF quants: mrfakename/Hy4-flash-abliterated-GGUF.

What changed

  • Refusal directions were measured separately for chat (reasoning_effort: no_think) and think (reasoning_effort: high) prompts on Xylolabs' Q4_K_M GGUF, at the residual stream entering every layer's FFN. Refusal separates strongly from layer 18 on. Chat and think directions are much less aligned here than on other models (cosine 0.2–0.6), so the subspace candidates are the top singular vectors of both families' directions from layers 18–41.

  • Hy4-flash puts an RMS norm with a learned gain after each writer (sandwich norms), so the removed direction is gain-corrected per tensor: each writer gets the basis orth(g ⊙ Q), which removes Q from what actually reaches the residual stream after the norm.

  • A multi-objective search (minimise refusals, keep the first-token KL on harmless prompts low) chose the subspace rank and per-layer strengths over 100 trials. It settled on a single direction (rank 1):

    • attention outputs get strength 1.27–1.78 on all 42 layers, peaking at layer 18;
    • shared-expert down-projections get 0.95–0.98 on layers 31–37;
    • the routed-expert up-projection (the projection of the latent routed-expert sum back into the residual stream) gets 0.45–1.42 on layers 26–41, peaking at layer 34.
  • That direction was projected out of the residual-stream writes:

    • self_attn.o_proj on 42 layers;
    • mlp.shared_experts.down_proj on 7 layers;
    • mlp.routed_expert_up_proj on 16 layers.

    That is 65 tensors. None of the 192 routed experts per layer were touched.

  • Every tensor stays BF16. Plain re-rounding would snap part of the edit back. Instead, each weight goes to the BF16 value just below or above its target, chosen row by row so the rounding errors cancel along the removed direction. bake-stats.txt lists every tensor.

Nothing else was touched: the routed experts, router, Engram table, embeddings, lm_head, the vision tower and the DFly draft layers are bit-identical to the original.

Results (Q4_K_M GGUF, greedy)

refusals, chat (/100) think mode, reasoning or answer refuses (/100) KL, harmless first token
original 92 89 0
abliterated 4 6 0.233

The 100 prompts are held-out harmful requests. Chat replies were 384 tokens and think mode got 768. The numbers are from the patched Q4_K_M file itself, not the adapters used during the search.

Some notes:

  • The KL is higher than on the other models I've done (0.05 on Ling-3.2-air). This model's refusal is spread across more layers, and no setting in the search got refusals low at a smaller KL. Replies to ordinary prompts look the same as the original's, often almost word for word. Batched inference alone gives a KL noise floor of 0.02–0.03.
  • In think mode the abliterated model thinks longer: 44 of 100 replies hadn't finished reasoning at 768 tokens, against 2–4 for the original (which mostly decides to refuse early). The unfinished reasoning is not looping (repetition is about 1%, the same as the original). It is planning the answer, so give it a bigger token budget.

Files

  • model-*.safetensors: the patched BF16 checkpoint (same index as the original).
  • abliteration-lora.gguf: a LoRA that applies the same edit to any stock GGUF of the original, e.g. llama-server -m Hy4-flash-Q4_K_M-00001-of-00002.gguf --lora abliteration-lora.gguf. See the GGUF repo for which llama.cpp builds load Hy4-flash GGUFs.
  • abliteration-edit.npz: the direction Q, the per-layer strengths scales[layer, (attn, mlp, rup)] and the post-norm gains G used for the gain-corrected basis. The edit is W' = W - s·PPᵀW with P = orth(G[layer, component] ⊙ Q).
  • bake-stats.txt: per-tensor check of how much of the subspace is left after the edit.

This model will comply with harmful requests. You are responsible for how you use it.


Abliterated with Lucid (lucid-toolkit.org).

Downloads last month
177
Safetensors
Model size
220B params
Tensor type
BF16
·
F32
·
I32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mrfakename/Hy4-flash-abliterated

Quantized
(81)
this model
Quantizations
1 model

Collection including mrfakename/Hy4-flash-abliterated