Fix CLT normalization and distributed attribution#9
Open
JitUikey28 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task Writeup
This PR addresses two CLT-Forge engineering tasks:
Fix activation normalization so
estimated_norm_scaling_factor_in/outare computed and applied on the correct device, ideally on GPU, avoiding CPU/GPU mismatch and unnecessary transfers.Extend attribution graph computation beyond single-GPU execution by making the attribution runner distributed-aware for DDP/FSDP/feature-sharding style setups and batched prompt computation.
Summary
Tests
Ran locally:
python -m pytest tests/test_norm_fix.py -vResult: 10 passed
python -m pytest tests/test_attribution_ddp.py -v -k "TestShardingMath or TestModelUnwrapping or TestInterventionPerFeatureDistributed"Result: 28 passed
Notes
I also attempted a broader test-suite run. Some unrelated/stale/GPU-specific tests fail locally, including a missing
pipeline_newimport, tests with literalassert False, and distributed/GPU tests that require proper CUDA/torchrun setup.Full end-to-end multi-GPU validation should be run on the lab environment with real CLT checkpoints.