A full pre-release code audit (2026-07) found and fixed a set of defects
where several methods silently did less than documented: wrong-quantity math,
gradient-accumulation breakage, and wiring/default no-ops. All fixes ship in
v0.1.0.
Two changes affect how you call the fixed methods:
Some methods now require an input they previously ignored. SafeDecoding
and Contrastive Decoding raise on the HF path unless you pass a distinct
expert / weak model (passing the target as its own guide was an identity
no-op); AsFT warns when base_model_path is unset (the reference is mandatory —
without it it reduces to plain SFT); LoX-Harden takes the pre-alignment
base_model_path (required, raises if missing) and trains the aligned model;
Surgery warns and is inactive unless the model is loaded with
attn_implementation="eager"; SPPFT sppft_mode="scale" now falls back to
the paper-faithful "freeze".
The training-loop fixes were GPU-validated for execution. Every fixed
method runs one real train()/apply() step on GPU (Qwen2.5-0.5B) without
crash and with its mechanism active, across the Python / CLI / YAML surfaces.
What this does not yet cover is reproducing the safety-drift / utility
numbers behind the "Faithful" badges — those need the real drifted 8B
checkpoints (SAFETUNE_DRIFT_MODEL) run through tests/integration.
ASRTCallback is a SafeTune-original heuristic with no paper of its own; it is not an implementation of MART.
MARTTrainer has no official repository; the audit rests on the paper (arXiv:2311.07689).
DeepRefusalTrainer is a Variant: the ablation is per layer for the whole sequence at the layer output
(the paper and official code gate every layer and token, at the layer input, attention and MLP), and the
default harmful set is BeaverTails safe responses rather than the paper's harmful-prefix + refusal data.
The paper's p = 0.5 (Sec. 5.1) and alpha = 0.2 are the defaults used.
LisaTrainer: lisa_warmup_steps defaults to 100 micro-steps in LisaConfig (the authors skip the first 10%
of steps), so a direct LisaConfig run shorter than 100 steps gets no proximal term; the runner passes 10.
The runner schedule (10 / 20 / 20) is a scaled-down version of the paper's 500 / 500.