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

How we train saes replication #123

Merged
merged 39 commits into from
May 7, 2024
Merged

Conversation

jbloomAus
Copy link
Owner

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

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.)

Performance Check.

If you have implemented a training change, please indicate precisely how performance changes with respect to the following metrics:

  • L0
  • CE Loss
  • MSE Loss

Please links to wandb dashboards with a control and test group: https://api.wandb.ai/links/jbloom/syh38mi2

Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 84.39306% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 64.40%. Comparing base (4d12e7a) to head (eb35e67).
Report is 1 commits behind head on main.

Files Patch % Lines
sae_lens/training/cache_activations_runner.py 80.76% 7 Missing and 3 partials ⚠️
sae_lens/training/activations_store.py 71.87% 8 Missing and 1 partial ⚠️
sae_lens/training/train_sae_on_language_model.py 75.00% 1 Missing and 2 partials ⚠️
sae_lens/training/config.py 88.23% 1 Missing and 1 partial ⚠️
sae_lens/training/evals.py 0.00% 2 Missing ⚠️
sae_lens/training/optim.py 95.65% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
+ Coverage   59.91%   64.40%   +4.48%     
==========================================
  Files          17       17              
  Lines        1654     1753      +99     
  Branches      277      289      +12     
==========================================
+ Hits          991     1129     +138     
+ Misses        602      560      -42     
- Partials       61       64       +3     

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

@jbloomAus jbloomAus merged commit 5f46329 into main May 7, 2024
7 checks passed
@jbloomAus jbloomAus deleted the how-we-train-saes-replication branch May 20, 2024 13:36
tom-pollak pushed a commit to tom-pollak/SAELens that referenced this pull request Oct 22, 2024
* l1 scheduler, clip grad norm

* add provisional ability to normalize activations

* notebook

* change heuristic norm init to constant, report b_e and W_dec norms (fix tests later)

* fix mse calculation

* add benchmark test

* update heuristic init to 0.1

* make tests pass device issue

* continue rebase

* use better args in benchmark

* remove stack in get activations

* broken! improve CA runner

* get cache activation runner working and add some tests

* add training steps to path

* avoid ghost grad tensor casting

* enable download of full dataset if desired

* add benchmark for cache activation runner

* add updated tutorial

* format

---------

Co-authored-by: Johnny Lin <[email protected]>
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.

2 participants