feat(atp-star): add tested component-localization building blocks - #705
janmenjayap wants to merge 6 commits into
Conversation
|
Thanks for this, and for keeping it scoped and honest about what is deferred. Two things. Please retarget it to You may also want a PR against https://github.com/ndif-team/skills, branch No need to close #704 with this. Happy to keep it open for the benchmark half. |
On 0.8's transformers, GPT2Attention.forward and GPTNeoXAttention.forward resolve attention_interface through an extra default-then-override step before invoking it, shifting the real call from .source.attention_interface_0 to .source.attention_interface_2 for both families. Try attention_interface_2 first, falling back to the old name.
f1666d9 to
cfbb356
Compare
|
Retargeted to One regression surfaced by the rebase: on 0.8's Transformers the actual attention-interface call moved from Test status against One blocker I cannot clear myself: the fork PR's Actions run is sitting at |
|
Also opened the companion skills PR you suggested: ndif-team/skills#8 — ports the Q/K correction, GradDrop, and exact-verification workflow into a new atp-star skill next to attribution-patching, cross-linked both directions. Left out the subset/confidence diagnostic and benchmark protocol, since those read as benchmark artifacts rather than agent-facing failure-mode fixes. No dependency between the two — this one doesn't block on #705. |
Summary
Draft PR (pending maintainer confirmation of the approach proposed in #704)
Adds dependency-free, individually tested AtP* building blocks using existing public nnsight APIs.
This is the first part of #704. It adds no public package API, runtime dependency, model download, or empirical benchmark claim.
Included
Validation
tests/test_atp_star.pyagainst the 0.8 branch (Transformers 4.57.6)..source.attention_interface_0to.source.attention_interface_2for both GPT-2 and GPT-NeoX/Pythia(0.8's transformers adds a default-then-override lookup step before the call). Fixed in
tests/test_atp_star.pyanddocs/patterns/atp-star.mdby tryingattention_interface_2first..save()-outside-trace behavior wereunaffected by the 0.8 rebase.
to files this PR does not touch (test_vlm.py, test_vision.py, test_encoder.py, test_chunked_tasks.py,
tests/tp/, tests/vllm/) — pre-existing baseline breakage on 0.8, not introduced here.
The unfiltered repository command currently encounters unrelated baseline environment failures involving optional Ray, dill, peft, and torchvision dependencies, plus a missing
SERVERsymbol intest_whitelist_serialization.py. None of those files or dependencies are changed by this PR.Deferred to PR 2
src/nnsight/.This PR intentionally does not close #704.
Review focus
Related work
The external nnsight replication has no declared software license; no code was copied or adapted from it.