license: other
license_name: openmdw-1.1
license_link: https://openmdw.ai/license/1-1/
base_model: nvidia/NVIDIA-Nemotron-3.5-Bolt-E4B-4GB
tags:
- gguf
- lora
- llama.cpp
- abliteration
- nemotron
- gemma4
Nemotron 3.5 Bolt-E4B: refusal-direction abliteration as a rank-1 LoRA
We built this for our internal security tooling. You are welcome to use it to protect things that are
yours, or to learn more about security. The world already has a surplus of trouble, please do not use this
to get into other people's stuff.
A 3.5 MB llama.cpp LoRA adapter (abl-L28.gguf) that removes the refusal direction from NVIDIA's
Nemotron 3.5 Bolt-E4B. It was computed on
nvidia/NVIDIA-Nemotron-3.5-Bolt-E4B-4GB
(Nemotron-3.5-Bolt-E4B-Q4_K_M.gguf), which is used unchanged. Load the adapter on top of it at
strength 1.0:
llama-server -m Nemotron-3.5-Bolt-E4B-Q4_K_M.gguf --lora abl-L28.gguf -ngl 99 -fa on --jinja
Why a LoRA
Abliteration (Arditi et al., 2024) projects one direction r out of every matrix that writes to the
residual stream: W' = W - r rᵀW. That is a rank-1 update, so it fits a LoRA exactly. The base GGUF stays as
published, the strength is a runtime knob, and dropping --lora restores stock behaviour.
What Gemma 4 needed
Bolt-E4B is post-trained from Gemma 4 E4B-it, and three things about that architecture changed the recipe
we used for the larger Nemotron models.
- Post-norms. Gemma applies RMSNorm with a learned weight g to the output of
attn_output,ffn_downand the per-layer-embeddingprojbefore adding it to the residual. Removing r from W x is
not enough there, because the elementwise g mixes it back in. Each of these writers is edited along
u = unit(g ⊙ r) instead, which makes the r-component reaching the residual zero. All 126 edited tensors
(attn_output,ffn_down,proj× 42 layers) sit behind a post-norm. - Tied embeddings. There is no
output.weight: llama.cpp reusestoken_embdas the LM head, and an
embedding-shaped LoRA there breaks the matmul and crashes the server. The embedding is left unedited. - The direction has to be collected with thinking on. A direction collected with thinking off (prompt
ending in an empty thought block) was removed exactly (measured r-component 0.00 at every layer) and
changed nothing: the model decides to refuse inside its reasoning. Collected with thinking on, at the
start of the model turn, the same method works.
How the direction was found
- 400 harmful prompts: 300 CyberSecEval MITRE attack prompts and 100 AdvBench. 400 harmless prompts: 300
CyberSecEval MITRE false-refusal (benign security) prompts and 100 Alpaca. Matching benign security
prompts keeps "this is about security" out of the direction. - Each prompt was rendered with the model's chat template, thinking on, and run once through llama.cpp
(scripts/abl_collect.cpp). The output of every block (l_out-N) was captured at the last token, and
the mean harmless activation was subtracted from the mean harmful one per layer.refusal_dirs_bolte4b.npyholds these differences: 42 layers × 2560, float32, not normalized. - Candidates were screened on 20 held-out harmful and 10 benign prompts, thinking on. Stock refused 14/20.
Layer 20 refused 11, layer 24 refused 7, layer 28 refused 0 with no benign refusals. A rank-5 adapter
removing layers 20–28 together also refused 0/20 but produced an empty answer in the final run, so
layer 28 alone was chosen. Directions in this model are nearly orthogonal from layer to layer.
Results
All runs used llama.cpp (Metal) on an Apple M1 Max. The red-team and benign sets ran with thinking on and a
3,000-token cap; the answer (not the reasoning) was graded with a keyword refusal check and read by hand.
The agent tasks ran once with thinking off and once with thinking on.
| Stock | L28 × 1.0 | |
|---|---|---|
| Red-team prompts refused | 34/40 | 0/40 |
| Benign security and general prompts refused (false refusals) | 3/50 | 0/50 |
| 20 single tool calls, thinking off / on | 18/20 / 19/20 | 18/20 / 18/20 |
| RAG answering with citations (20 questions), thinking off / on | 16/20 / 20/20 | 19/20 / 20/20 |
| Multi-turn ops-agent task (tool calls, mocked infra), 5 runs, thinking off | 1/5 pass | 2/5 pass |
| Same, thinking on | 2/5 pass | 1/5 pass, 2 runs restarted a VM |
With thinking off, the RAG gain is entirely in unanswerable questions (adapter 4/5 declined, stock 1/5);
with thinking on both get 20/20.
The ops-agent task is the cost. Both versions mostly fail it by not reading both logs, but with thinking on
the adapter twice took a VM action the evidence did not call for, which stock never did. Lowering the
strength to 0.8 did not help (0/5, again 2 VM actions). Keep human approval on destructive tools.
On the M1 Max the model decodes at about 45 tok/s.
Note: llama-server serves every loaded adapter by default
If several adapters are loaded, a request with no "lora" field gets all of them at their global
scale. Load only this adapter in production, or name it in every request.
Files
abl-L28.gguf: the LoRA (rank 1, alpha 1, float32), archgemma4.refusal_dirs_bolte4b.npy: per-layer harmful−harmless mean differences, thinking on (42 × 2560).scripts/:abl_collect.cpp(activation means, links against libllama;ABL_TENSORpicks the
captured tensor,ABL_LORAcollects with an adapter applied),render.py(chat template, thinking on
or off),abl_lora.py(builds LoRAs, post-norm aware,--combinefor rank-k; setGGUF_PYto a
llama.cpp tree's gguf-py),test_lora.py(self-check, including the post-norm case),gen.py
(response collection),probe.py(refusal probe with per-request LoRA),gguf_diff.py(tensor-level
diff of two GGUFs).
The same method on the larger Nemotron 3.5 models:
Lightning 30B-A3B
and Bolt 74B-A9B.
License
Our work (the scripts, the method and this card) is under the MIT License (LICENSE).
The adapter (abl-L28.gguf) and the direction vectors (refusal_dirs_bolte4b.npy) are computed from
NVIDIA's Nemotron 3.5 Bolt-E4B weights, which are under the
OpenMDW License Agreement 1.1. It permits use without restriction but
requires that a copy of the agreement and NVIDIA's notices of origin travel with any portion you
redistribute; that copy, with the notice, is in LICENSE-OpenMDW-1.1. NVIDIA post-trained the model from
Google's Gemma 4 E4B-it, which is under the Apache License 2.0 (LICENSE-Apache-2.0). Keep these files
with the adapter if you redistribute it.