CLI Reference
Every stage of the lucid command.
Every stage is available under the lucid command. Run lucid <command> --help for full flag details.
Automated pipeline
lucid run
Runs the full workflow automatically: model inspection, prompt rendering, activation capture, direction analysis, auto-basis selection, preflight check, search, verification, and baking/patching.
lucid run <model> -o <output> [options]Key flags:
| Flag | Default | Description |
|---|---|---|
-o, --out | None | Output path for the baked checkpoint directory or patched GGUF |
--gguf | None | Optional GGUF used for fast capture/search while baking into <model> |
--backend | auto | auto, llama_cpp, vllm, or hf_torch (auto uses llama_cpp for GGUF, vllm on CUDA when installed, else hf_torch) |
--budget | balanced | fast (20 trials), balanced (45), or thorough (80) |
--task | refusal | Built-in behavior preset: refusal, noslop, nosyco, or concise |
--dataset | mrfakename/harm | Hugging Face dataset ID for default prompts |
--include-cn | false | Add the China-sensitive topic arm and enable reframe detection |
--prompts | None | Local directory with capture.jsonl and eval JSONLs |
--bad / --good | None | Plain-text files (one prompt per line) for custom behaviors |
--interactive | false | Pause after search to inspect Pareto trials, live-chat, and pick a trial |
--load-in-4bit | false | Load PyTorch models in 4-bit NF4 via bitsandbytes during capture/search |
--batch-size | 0 | Batch size for hf_torch (0 = auto-probe max VRAM batch size) |
--tp | 0 | Tensor parallel size for vllm (0 = all visible CUDA GPUs) |
--gpu-memory-utilization | 0.90 | GPU memory utilization fraction for vllm |
--winsorize | 0.001 | Activation winsorization quantile before computing directions (0 disables) |
--config | None | Optional TOML/JSON/YAML config override |
--no-manage-server | false | Connect to an already-running llama-server at --server-url |
--tensor-split | None | Multi-GPU layer split string (-ts) for llama.cpp |
--llama-args | None | Extra flags forwarded to llama-ablate-capture and llama-server |
--skip-preflight | false | Bypass pre-search LoRA routing check |
--no-bake | false | Stop after producing edit.npz |
--push-to-hub | None | Upload the baked checkpoint and model card to a Hugging Face repo ID |
--private | false | Create the destination Hub repo as private |
--revision | None | Optional source Hugging Face Hub branch/tag/commit |
Hugging Face Jobs (lucid hf-job)
Run full abliteration remotely on Hugging Face Jobs from a source Hub model to a destination Hub repo:
lucid hf-job <source_model> <dest_repo> [options]Subcommands:
lucid hf-job run <source_model> <dest_repo>(also works without typingrun) - Submit a remote GPU job that downloads<source_model>, runs Lucid end-to-end, bakes the weights, and pushes to<dest_repo>.- Key flags:
--flavor(defaulta100-large),--timeout(default4h),--budget,--task,--include-cn,--load-in-4bit,--batch-size,--winsorize,--private,--namespace,--lucid-source,--follow,--dry-run,--emit-script <path.py>.
- Key flags:
lucid hf-job flavors- List recommended HF Jobs GPU flavors and VRAM tiers.lucid hf-job status <job_id>- Inspect job status and stage.lucid hf-job logs <job_id> [--follow]- Fetch or stream job logs.lucid hf-job cancel <job_id>- Cancel an active or queued job.
Discovery and setup
lucid presets- List built-in model architecture presets.lucid tasks- List built-in behavior task presets (refusal,noslop,nosyco,concise).lucid inspect <path> [--write-config lucid.toml]- Inspect a GGUF or safetensors checkpoint and optionally emit a starter config.lucid prompts <config> --src <dir> --out <dir> [--model-source <path>]- Render capture and eval JSONLs with the model's chat template.lucid chat <work_dir> [--trial base|N] [--mode chat|think] [--server-url ...]- Interactive terminal chat against the base model or a chosen 0-indexed search trial.
llama.cpp build and graph helpers
lucid audit-lcpp <src/models/arch.cpp>- Static check for pre-FFN capture hooks and rawggml_mul_matwriters that would bypass LoRA adapters.lucid patch-lcpp <llama.cpp_root> --arch <arch> [--dry-run]- Apply built-in declarative capture/LoRA graph patches idempotently.lucid export-cpp <dest_dir>- Copy the bundledablate-capture.cppandCMakeLists.txtsource files.lucid plan-split <gguf_dir> <n_gpu> [--cap-gib 79.2]- Compute an even per-GPU-tslayer split from GGUF header sizes.
Capture, directions, and search
lucid capture <config> --model <path> --prompts <capture.jsonl> --out <acts.f32> [--backend llama_cpp|hf_torch] [--load-in-4bit] [--batch-size 0]lucid directions <acts.f32> <capture.jsonl> <dirs.npz> [--n-embd N] [--method diff_means|trimmed_mean|whitened|pca] [--winsorize 0.001]lucid basis <dirs.npz> <spec>- Inspect singular spectrum energy for a basis spec (orauto).lucid adapters <config> --gguf <dir> --dirs <dirs.npz> --out <adapters_dir> [--spec ...]lucid preflight <config> --adapters <dir> --data <dir>- Verify each component's LoRA adapters shift logits onllama-server.lucid search <config> --adapters <dir> --data <dir> --out <search_dir> [--warm-start prev_trials.jsonl]lucid pareto <trials.jsonl> [--kl-budget 0.15]- Print the Pareto frontier and recommended knee trial.lucid verify <config> --data <dir> --out <verify.json> [--trial base|N] [--artifact](--trialis 0-indexed, matchingtrials.jsonl)lucid audit-judge <verify.json> [--config <config>]- Breakdown of which markers fired where plus unflagged openings.
Editing, baking, and reporting
lucid make-edit <config> --dirs <dirs.npz> --trials <trials.jsonl> --trial <N> --adapters <dir> --out <edit.npz>(--trialis 0-indexed, matching thetrialfield intrials.jsonlandlucid pareto)lucid bake [--config <config>] --model-dir <dir> --edit <edit.npz> [--shards-only] [--only-shards s1,s2]lucid patch-gguf <shard.gguf> <edit.npz> [-o <out.gguf>] [--config <config>] [--libggml <dir>]lucid merge-lora <gguf_dir> <edit.npz> <out.gguf> [--config <config>] [--arch <arch>]lucid report <config> --edit <edit.npz> --trials <trials.jsonl> --base <v_base.json> --edited <v_edited.json> --out-dir <dir>
Remote GPU control
lucid agent [--host 127.0.0.1] [--port 7777] [--work-dir /work] [--token ...]lucid remote <profile> <exec|bg|jobs|kill|get|put|log> ...