license: mit
base_model: unsloth/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-GGUF
tags:
- gguf
- lora
- llama.cpp
- abliteration
- nemotron
Nemotron 3.5 Lightning 30B-A3B: refusal-direction abliteration as a rank-1 LoRA
We built this to drive our internal instance of the ARTEX autonomous penetration testing platform.
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 55 MB llama.cpp LoRA adapter (abl-L24.gguf) that removes the refusal direction from NVIDIA's
Nemotron 3.5 Lightning 30B-A3B. It was computed on
unsloth/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-GGUF
(UD-Q4_K_XL), which is used unchanged. Load the adapter on top of it at strength 1.0:
llama-server -m NVIDIA-Nemotron-3.5-Lightning-30B-A3B-UD-Q4_K_XL.gguf \
--lora abl-L24.gguf -ngl 99 -fa on -ctk q8_0 -ctv q8_0 --jinja
Other quantizations of the same model should accept the adapter (the tensor shapes are the same), but we
only tested UD-Q4_K_XL.
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: lora_b = -r,lora_a = rᵀW. For the token embedding the delta is -(E_t·r) r. The base GGUF stays as published,
the strength is a runtime knob, and dropping --lora restores stock behaviour.
Lightning's 128 routed experts per MoE layer write straight into the 2688-wide residual stream, so
unlike the larger Bolt model, every expert needs the edit. llama.cpp applies LoRAs to 3-D expert tensors
(ffn_down_exps, through mul_mat_id), so each expert gets its own rank-1 pair:lora_a is (128, 1, n_ff) and lora_b is (128, 2688, 1) in numpy order.
Edited residual writers (76 tensors): attn_output ×6, ssm_out ×23, ffn_down_shexp ×23,ffn_down_exps ×23 (128 experts each), and token_embd. The MTP block (layer 52, used only for
speculative drafting) is skipped: mainline llama.cpp drops its tensors, and an adapter naming them fails
to load.
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 own chat template (thinking on) and run once through
llama.cpp (scripts/abl_collect.cpp). The output of every block was captured at the last token, and the
mean harmless activation was subtracted from the mean harmful one per layer.refusal_dirs_lightning30b.npyholds these differences: 52 layers × 2688, float32, not normalized. - Eight candidate layers (16–34) were screened on 40 held-out harmful and 20 benign prompts at strength
1.0. Stock refused 23/40. Layers 24 and 26 refused 0/40; layers 16 (2), 22 (6), 28 (6) and 30 (7) were
close; layers 20 (15) and 34 (17) barely helped. No candidate refused a benign prompt. Layer 24 was
chosen.
Results
All runs used llama.cpp (Metal) on an Apple M1 Max with q8_0 KV cache. The red-team and benign sets were
graded with a keyword refusal check, and outputs were read by hand. Sampling was greedy for the refusal
sets and the server default for the agent tasks.
| Stock | L24 × 1.0 | |
|---|---|---|
| Red-team prompts refused, thinking off (256-token cap) | 20/40 | 0/40 |
| Red-team prompts refused, thinking on (3,072-token cap)¹ | 25/40 | 0/40 |
| Benign security and general prompts refused (false refusals) | 1/100 | 0/100 |
| Multi-turn ops-agent task (tool calls, mocked infra), 5 runs | 4/5 pass | 4/5 pass |
| 20 single tool calls | 19/20 | 19/20 |
| RAG answering with citations | 20/20 | 20/20 |
¹ Answers still reasoning at the cap (stock 0, adapter 1) were graded on their reasoning text.
Unlike the Bolt 74B adapter, full strength did not cost agent-loop caution here. Stock's one ops-task
failure rebooted a VM the evidence did not call for; the adapter's one failure allowlistedmailgun.org instead of smtp.mailgun.org. Both models still make mistakes in agent loops, so keep
human approval on destructive tools.
On the M1 Max the model decodes at about 57 tok/s and processes prompts at 250–270 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-L24.gguf: the LoRA (rank 1, alpha 1, float32), archnemotron_h_moe.refusal_dirs_lightning30b.npy: per-layer harmful−harmless mean differences (52 × 2688).scripts/:abl_collect.cpp(activation means, links against libllama),render.py(chat template),abl_lora.py(builds LoRAs from the directions, including 3-D expert tensors; setGGUF_PYto a
llama.cpp tree's gguf-py),test_lora.py(self-check),probe.py(refusal probe with per-request
LoRA),gguf_diff.py(tensor-level diff of two GGUFs).
The same method on the larger model:
MachineElves/NVIDIA-Nemotron-3.5-Bolt-74B-A9B-24GB-abliteration-LoRA.
License
Our work (the scripts, the method and this card) is under the MIT License (LICENSE).
The adapter (abl-L24.gguf) and the direction vectors (refusal_dirs_lightning30b.npy) are computed from
NVIDIA's Nemotron 3.5 Lightning 30B-A3B weights. The base model is under the
OpenMDW License Agreement 1.1, which 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. Keep it with the files if you
redistribute them.