Abliteration HandbookField guide
Practical guides

Troubleshooting encyclopedia

Symptom → diagnosis → fix for abliteration, Heretic, Ollama, and agent deploy.

3 min read 2 examples Source-linked

In this chapter
On this page Interactive companion
Personal reading progress

0/11 sections reviewed

View original Markdown
Interactive companion

Explore the chapter map

Use the visual controls alongside the complete source chapter.

Symptom → diagnosis → fix for abliteration, Heretic, Ollama, and agent deploy.


Install & environment#

SymptomFix
heretic: command not foundActivate venv: .\.venv\Scripts\Activate.ps1
torch.cuda.is_available() FalseReinstall CUDA PyTorch — setup-environment.md
bitsandbytes fails on WindowsUse WSL2 Ubuntu + NVIDIA drivers
huggingface-cli 403 / gatedhuggingface-cli login; accept license on HF website
Playwright HF fetch resetnpm run fetch:hf-models:firefox

CUDA OOM#

VRAMAction
Anyquantization = "bnb_4bit"
8 GBconfig.low-vram.toml; model ≤ 1.5B–4B 4-bit
Still OOMmax_batch_size = 8; max_memory = { "0" = "7GB", "cpu" = "32GB" }
MoECloud GPU or sharded llm-abliteration
toml
offload_outputs_to_cpu = true
max_batch_size = 16

8 GB OOM symptoms (low-vram profile)#

SymptomFix
CUDA out of memory on model load (8 GB)cp sources/heretic-tools/config.low-vram.toml config.toml; start with Qwen 1.5B–3B; ensure no other GPU apps; see low-vram-abliteration.md
OOM during Optuna trials (mid-run, 8 GB)Lower max_batch_size = 8; add max_memory = { "0" = "6.5GB", "cpu" = "32GB" }; enable offload_outputs_to_cpu = true; reduce n_trials to 50–80
OOM only on thinking/CoT models (8 GB)Use config.thinking-model.toml + low-vram tweaks; set max_response_length = 128; prefer 1.5B–4B thinking variants
4-bit load succeeds but eval/forward OOMsbatch_size = 1; close browsers; try Path B (llm-abliteration sharded_ablate) for surgery then GGUF locally
Persistent 8 GB swap thrashingDo not rely on OS swap for >4B; use cloud for abliteration or llm-abliteration measure+sharded path; see beginner guide Track A limits

Cross-ref: low-vram-abliteration.md · thinking-models-guide.md · beginner-local-model-guide.md


Heretic run issues#

SymptomDiagnosisFix
Optuna flat / no improvementWrong refusal markers../techniques/refusal-marker-tuning.md
100% refusal after runThinking model CoT scoredthinking-models-guide.md
Optuna refusal never drops (thinking/CoT model)chain_of_thought_skips misconfigured or missing model-specific tagsCopy config.thinking-model.toml; set print_responses = true temporarily; extract exact <open>/<close> delimiters from output and append as ["<open>", "<close>"] pair (first match wins)
Refusal markers detected inside thinking block onlyCoT skip tags do not match chat templateVerify tags in chain_of_thought_skips (e.g. Qwen analysis/final channel, <think>/ </think>); re-run 1 trial with print; see thinking-models-guide.md Step 3
Degenerate / gibberish outputOver-ablationrow_normalization = full; ↓ kernel strength; restore ORIGINAL
KL very highToo aggressiveRe-run fewer trials; kl_divergence_target = 0.005
Trials hang / slowLarge model + long responses↓ max_response_length; 4-bit
Checkpoint resume failsCorrupt study dirDelete checkpoints/ subfolder; restart

No behavior change after abliteration#

CauseFix
Loading original in Ollamaollama create from abliterated GGUF path
Wrong Modelfile templateMatch model family chat template
Quant too aggressive (Q2)Use Q4_K_M or Q5_K_M
Evaluated wrong model pathheretic ./models/X-abliterated explicitly

Factory / agent still refuses#

CauseFix
Generic harmful_behaviors onlyconfig.factory-qa.toml + factory .txt
Over-ablation on benign../data/eval/xstest-overrefusal-sample.jsonl
Needs tool schema not weightsOpenHands function-calling + Jarvis QLoRA
Runtime policyNot abliteration — fix system prompt

→ eval-driven-workflow.md · agentic-security-stack.md


Quality / capability loss#

SymptomFix
MMLU / coding droporthogonalize_direction = true; winsorization 0.95
Repetition loopsLower ablation; check max_response_length
Wrong facts (hallucination)Abliteration does not fix knowledge — not a regression from surgery
Gemma-specific blow-upMust use winsorization_quantile = 0.95

MoE-specific#

SymptomFix
Some topics brokenPer-expert ablation — ../methods/moe-expert-abliteration.md
OOM on 30B-A3Bbnb_4bit + CPU offload; cloud

GGUF / Ollama#

SymptomFix
ollama create failsCheck config.json architecture in HF folder
Slower than HFNormal for Q4 — try Q5 or GPU layers
Vision model no imageInclude mmproj in convert
Chat template wrongCopy tokenizer_config.json chat_template to Modelfile

→ run-locally-ollama-lmstudio.md


Multi-pass / iterative#

SymptomFix
Worse after pass 2Pass 2 α too high — use 0.5 strength
KL compoundedStop at pass 1; use Jarvis adapter instead

→ ../techniques/iterative-abliteration.md


When to restore ORIGINAL#

  • Gibberish on >10% eval prompts
  • KL > 1.0 with no refusal improvement
  • Harmful compliance too high for your policy

Always keep *-ORIGINAL folder untouched.


Escalation path#

Example
beginner guide → low-vram → heretic-workflow
     ↓ still stuck
troubleshooting-encyclopedia (this page)
     ↓ quality tuning
advanced-abliteration-workflow
     ↓ research
research-landscape + beyond-single-direction

Trace this chapter to its source.

The complete Markdown remains the editable source. This page adds navigation, typography, and a visual companion.

instructions/troubleshooting-encyclopedia.md
Inspect the source fingerprintSHA-256 20402845f5116d162658a98410edf1808dddfbcd90d6e384b732d55344d1edadSource commit 6fba7436a5914cad7c8f0835a14b480a29dac263