Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions config.default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ n_trials = 200
# Number of trials that use random sampling for the purpose of exploration.
n_startup_trials = 60

# Random seed for reproducible optimization. Set to an integer to enable.
# Applies to Python's random module, NumPy, PyTorch, and Optuna.
# seed = 75

# Directory to save and load study progress to/from.
study_checkpoint_dir = "checkpoints"

Expand Down
26 changes: 19 additions & 7 deletions src/heretic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ class RowNormalization(str, Enum):
FULL = "full"


class ExportStrategy(str, Enum):
MERGE = "merge"
ADAPTER = "adapter"


class DatasetSpecification(BaseModel):
dataset: str = Field(
description="Hugging Face dataset ID, or path to dataset on disk."
Expand Down Expand Up @@ -113,6 +118,15 @@ class Settings(BaseSettings):
exclude=True,
)

reproduce: str | None = Field(
Comment thread
p-e-w marked this conversation as resolved.
default=None,
description=(
"If this path or URL to a reproduce.json file is set, load reproduction information "
"from that file, and attempt to reproduce the abliterated model it originated from."
),
exclude=True,
)

dtypes: list[str] = Field(
default=[
# In practice, "auto" almost always means bfloat16.
Expand Down Expand Up @@ -161,13 +175,6 @@ class Settings(BaseSettings):
),
)

trust_remote_code: bool | None = Field(
default=None,
description="Whether to trust remote code when loading the model.",
# For security reasons, we don't store this setting.
exclude=True,
)

batch_size: int = Field(
default=0, # auto
description="Number of input sequences to process in parallel (0 = auto).",
Expand Down Expand Up @@ -410,6 +417,11 @@ class Settings(BaseSettings):
description="Maximum size for individual safetensors files generated when exporting a model.",
)

export_strategy: ExportStrategy | None = Field(
default=None,
description='How to export the model: "merge", "adapter", or unset to prompt the user.',
)

refusal_markers: list[str] = Field(
default=[
"sorry",
Expand Down
Loading