Skip to content

Fully automatic censorship removal for language models

Revert "fix: disable LoRA export for now" (#308)

anrpda92f745ded1
diff --git a/src/heretic/main.py b/src/heretic/main.py
index e25dd81..17ca370 100644
--- a/src/heretic/main.py
+++ b/src/heretic/main.py
@@ -127,31 +127,26 @@ def obtain_merge_strategy(settings: Settings, model: Model) -> str | None:
)
print()
- strategy = prompt_select(
- "How do you want to proceed?",
- choices=[
- Choice(
- title="Merge LoRA into full model"
- + (
- ""
- if settings.quantization == QuantizationMethod.NONE
- else " (requires sufficient RAM)"
- ),
- value="merge",
- ),
- Choice(
- title="Cancel",
- value="cancel",
+ strategy = prompt_select(
+ "How do you want to proceed?",
+ choices=[
+ Choice(
+ title="Merge LoRA into full model"
+ + (
+ ""
+ if settings.quantization == QuantizationMethod.NONE
+ else " (requires sufficient RAM)"
),
- ],
- )
-
- if strategy == "cancel":
- return None
+ value="merge",
+ ),
+ Choice(
+ title="Save LoRA adapter only (can be merged later)",
+ value="adapter",
+ ),
+ ],
+ )
- return strategy
- else:
- return "merge"
+ return strategy
def run():