Lucid is an abliteration and behavioral realignment toolkit for open-weights LLMs.
Most abliteration toolkits try to eliminate 100% of refusals, even if it makes the model noticeably dumber or traps it in infinite thinking loops. Lucid aims for the sweet spot between intelligence and permissiveness, removing nearly all refusals while keeping normal outputs as close to the original model as possible.
Classic abliteration pulls out a single "refusal direction" and applies it across the model. On modern reasoning models, that often falls short because think mode and chat mode refuse in different ways and at different layers. Lucid measures both modes separately and removes a small set of directions that covers both at once, so you don't end up with a model that complies in chat mode but still refuses (or loops) when thinking is turned on.
Instead of guessing one global strength, Lucid searches over different strengths across layers automatically, scoring every candidate on two things: how many refusals it removes, and how much its answers on normal prompts drift from the base model (measured by KL divergence). Each trial runs without rewriting the model weights, so searching stays fast and cheap even on 100B+ MoE models.
Saving the edit is where quantized models usually fight back. In FP8, FP4, or GGUF quants, a surgical edit is often smaller than half a rounding step, so plain rounding quietly undoes most of your work. Lucid uses error-diffusion rounding so the edit survives quantization, letting you bake straight back into BF16, FP8, NVFP4, or existing GGUF quants, or export a standalone LoRA GGUF to attach to any stock quant.
Model inspection, chat template and thinking-mode detection, downloading the default prompt set ( mrfakename/harm ), picking layers, searching, verifying, and saving all happen in one command:
--budget fast|balanced|thorough : how many trials to run ( 20 , 45 , or 80 ; default balanced ).
--task refusal|noslop|nosyco|concise : built-in behavioral presets (default refusal ).
--push-to-hub : upload the baked checkpoint and model card straight to Hugging Face Hub.
--interactive : inspect the Pareto frontier and chat live with candidate trials before baking.
--include-cn : adds a China-sensitive topic set and reframe detection.
--load-in-4bit : load Hugging Face / PyTorch models in 4-bit ( bitsandbytes ) to reduce VRAM usage.
--bad prompts.txt --good benign.txt : target any custom behavior instead of refusals.
Every stage can also be run individually for multi-GPU setups or custom architectures. See lucid --help , examples/ , or preview the docs locally with cd docs && npm install && npm run dev .
Lucid is licensed under the Apache License 2.0. See LICENSE for details.
We do request that you link back to this repository if you publish models abliterated with Lucid. This is not required by the license, but it would be greatly appreciated.
While Lucid is an independent toolkit, it builds on directional refusal ablation by Arditi et al. (2024). We would also like to acknowledge Heretic for pioneering Optuna + KL-divergence optimization for automated abliteration.
We thank Hugging Face for sponsoring the compute used to develop Lucid and release public models.
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
