The published refusal-ablation recipe takes one direction from a single layer and removes it from every edited writer. obliterate could only extract a separate direction per layer for refusal; --extraction-layer rejected refusal runs. On Llama-3.1-8B-Instruct per-layer edits barely moved refusal, and the raw-text basic preset made benign prompts refuse. - --extraction-layer / extraction_layer now selects a global scope for refusal: after DISTILL, every strong layer's direction and subspace are replaced by the unit direction extracted at that layer (rank 1), so EXCISE and the embedding projection remove one shared direction. The scope and layer are recorded in method_config (direction_scope, refusal_extraction_layer). Non-refusal concepts behave as before. - --chat-template / --no-chat-template override the preset's prompt formatting for extraction (default: preset). Remote runs reject the override before connecting, as their builder cannot forward it.
3.6 KiB
Method execution contracts
Extraction chat templates
For local obliterate runs, --chat-template enables the tokenizer's chat
template for extraction prompts and --no-chat-template disables it. Omitting
both keeps the method preset (basic uses raw text). The effective value is
recorded as method_config.use_chat_template. Remote runs reject these overrides
until remote command forwarding supports them.
Bayesian search
Scoring and final replay use the same BayesianTrialPlan: selected directions,
per-layer attention/MLP regularization, writer scope, and projection policy.
Every trial starts from the captured parent. Search rejects missing KL evidence
and trials above the configured KL budget. Final replay checks the selected plan
hash and records its evidence in checkpoint metadata.
The default executor supports resident generic writers and the output head.
Additional mutation modes require an executor that covers their complete write
scope. Unsupported combinations fail before capture. A pipeline can supply
_bayesian_executor_factory(pipeline) implementing BayesianExecution; resource
estimates and a stable identity are required before capture.
Set _bayesian_study_path to a directory for durable studies. Completed trials
have atomic JSON receipts and consistent SQLite backups. Resume requires the
same model/executor, prompts, options, seed, dependencies, and execution source.
_on_bayesian_trial(path) can publish the completed receipt and its named backup.
BayesianKernelOptimizer is a separate activation-only search. Its class
separation and reconstruction objectives are proxies, not measured refusal,
KL, or benchmark scores.
Refinement
Iterative passes refresh directions and expert state before selecting targets. Informed compensation snapshots that new target scope and preserves the parent recipe. A rejected or failed pass restores weights, metrics, and recipe together. Missing or nonfinite candidate measurements cannot accept a pass.
Architecture integrations can provide bounded snapshots and observe candidate transitions through the protected refinement hooks. Ordinary single-pass runs with the default observer do no additional snapshotting or tensor hashing. Informed-only analysis and sparse surgery require explicit workspace estimates; native export must use the bounded writer before claiming its admission bound.
Tournament execution
TourneyRunner accepts a paired arm_executor and winner_publisher, a stable
executor_identity, and a positive artifact_budget_bytes. The existing round
schedule remains unchanged. Selection prompts are disjoint from intervention
prompts. Required metrics must be finite and within the configured KL budget.
An arm returns metrics, a candidate hash, replay identity, and bounded artifact receipts. Checkpoints bind the experiment and artifact hashes. The publisher must replay the selected candidate and return a matching completion receipt. Publication failure retains the scored result and checkpoint for retry.
Executor failures raise TournamentExecutionError and save interrupted-round
progress before stopping. TournamentArmRejected excludes a completed,
unacceptable method without inventing a candidate. Missing measurements and
execution errors are failures, not quality rejections. Finite quality-limit
violations use PipelineQualityRejectedError. Informed compensation restores
and retains the accepted parent when a candidate raises this rejection.
These contracts do not establish full-model hardware capacity, throughput, or capability retention. Those require measurements on the target runtime.