mirror of
https://github.com/wassname/weight-steering.git
synced 2026-08-02 13:10:20 +08:00
tidy
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
"""Weight-space diff: w = θ+ - θ-.
|
||||
|
||||
Functional replacement for the original TaskVector class.
|
||||
|
||||
Approach: load the +/- adapters, merge each into a delta state-dict over the
|
||||
base model (delta = merged - base), then subtract:
|
||||
w_layer = delta_pos[layer] - delta_neg[layer]
|
||||
|
||||
Merging into delta-W space (rather than diffing in adapter A/B space) makes
|
||||
all adapter families comparable downstream - LoRA, DoRA, PiSSA-init, DeLoRA
|
||||
all produce a delta in W's space.
|
||||
"""
|
||||
Reference in New Issue
Block a user