Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jumprelu wdec norm folding #404

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Conversation

chanind
Copy link
Collaborator

@chanind chanind commented Jan 14, 2025

Description

This PR fixes a bug where fold_W_dec_norm() was not properly adjusting the jumprelu threshold. This PR also adds tests that should catch this sort of issue moving forward.

Thanks @adamkarvonen for finding this bug!

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

You have tested formatting, typing and unit tests (acceptance tests not currently in use)

  • I have run make check-ci to check format and linting. (you can run make format to format code if needed.)

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.99%. Comparing base (65e1986) to head (61cdc6b).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
sae_lens/training/training_sae.py 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
+ Coverage   71.85%   71.99%   +0.14%     
==========================================
  Files          22       22              
  Lines        3361     3371      +10     
  Branches      470      472       +2     
==========================================
+ Hits         2415     2427      +12     
+ Misses        790      788       -2     
  Partials      156      156              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chanind
Copy link
Collaborator Author

chanind commented Jan 17, 2025

reviewed by @adamkarvonen offline

@chanind chanind merged commit 06b6669 into main Jan 17, 2025
7 checks passed
@chanind chanind deleted the fix-jumprelu-wdec-norm-folding branch January 17, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant