mirror of
https://github.com/wassname/AntiPaSTO.git
synced 2026-09-09 11:12:52 +08:00
Refactor documentation and remove commented-out code in training adapter
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user