Refactor documentation and remove commented-out code in training adapter

This commit is contained in:
wassname
2026-01-13 06:47:50 +08:00
parent 520dfc0c6a
commit fa1f6c61db
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ Adapter steering for contrastive training with proper gradient flow.
For AntiPaSTO: Sets `antipasto_alpha` directly on each layer. The Cayley rotation
transform satisfies R(-α) = R(α)^(-1), so a single adapter handles both steering directions.
Key insight: PyTorch's autograd tracks tensor references in the computation graph,
PyTorch's autograd tracks tensor references in the computation graph,
not module attributes. So we can:
1. Replace `module.weight` with `weight * coeff` (graph stores ref to original param)
2. Run forward pass
-1
View File
@@ -1968,7 +1968,6 @@ def train_model(config: TrainingConfig):
f"Results for method: {method} [logratio * label -> nat's toward label]\n{df_res_pv[method].head(5).round(4)}\n"
)
# Generate comprehensive metrics (both text and markdown)
md_table, tables_dict, main_score = format_main_results_table(
df_res_wlabels, config=config
)