Folded results from norm restoration, LoRA merges, repair candidates and the
other audited write sites are checked for finiteness in the storage dtype
before any in-place update; repair candidates that would overflow are
rejected as failed steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Folded pipeline projections preserve the legacy zero-direction behaviour
(including projection counts), and folded LoRA adapters are checked for
finite deltas and merged weights in the writer dtype before mutation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Concept orthogonalize/lora now remove the direction from what Gemma 2/3 and
OLMo 2 sandwich-norm layers write to the residual by folding the post-norm
scale into the projection, and fail closed on unrecognized post-norm layouts.
project_embeddings adds the input embedding edit, with an explicit
tied_embeddings choice (edit_both or untie) for tied models.
Fixes#318
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LoRA ablation merged adapters into live weights while docstrings promised
reversibility. No unmerge existed, and the pipeline never wrote a PEFT
artifact.
Add unmerge_lora_adapters. Restoration is bit-exact from opt-in CPU
snapshots (apply_lora_adapters(keep_originals=True)), or a documented
rounding bound when the delta is subtracted. Unsupported meta/offloaded,
quantized or mismatched weights are skipped with a logged count on both
apply and unmerge, keeping the previous no-op behaviour for those weights.
When use_lora_ablation is on and the base is a Hub model with a pinned
40-hex revision, REBIRTH also writes an unmerged PEFT adapter to
<output>/lora_adapters through a separate exporter that marks the base
identity as unverified. Otherwise the existing explicitly unsupported
adapter artifact is kept. The exact-identity save_lora_adapters contract is
unchanged. Metadata records the format actually written, and the UI status
names the adapter directory when present. Docstrings no longer overstate
reversibility.
Fixes#222
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>