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

Add torch compile #129

Merged
merged 6 commits into from
May 8, 2024
Merged

Add torch compile #129

merged 6 commits into from
May 8, 2024

Conversation

tomMcGrath
Copy link
Contributor

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 (see W&B dash)
  • 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:

This change accelerates training by enabling torch.compile (and providing compilation options) for LM and SAE as config flags. This substantially increases throughput over uncompiled models.

W&B dashboard for performance comparison: https://wandb.ai/tmcgrath/compilation-checking/workspace

@tomMcGrath
Copy link
Contributor Author

tomMcGrath commented May 8, 2024

ah apologies I inherited a couple of commits from the earlier CL - will pull these out after that PR is resolved

Copy link

codecov bot commented May 8, 2024

Codecov Report

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

Project coverage is 64.43%. Comparing base (1a0619c) to head (8bf01f0).
Report is 1 commits behind head on main.

Files Patch % Lines
sae_lens/training/lm_runner.py 12.50% 7 Missing ⚠️
sae_lens/training/evals.py 0.00% 2 Missing ⚠️
sae_lens/training/activations_store.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
- Coverage   64.58%   64.43%   -0.16%     
==========================================
  Files          17       17              
  Lines        1762     1777      +15     
  Branches      291      295       +4     
==========================================
+ Hits         1138     1145       +7     
- Misses        560      567       +7     
- Partials       64       65       +1     

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

@jbloomAus jbloomAus merged commit 5c41336 into jbloomAus:main May 8, 2024
5 of 7 checks passed
tom-pollak pushed a commit to tom-pollak/SAELens that referenced this pull request Oct 22, 2024
* Surface # of eval batches and # of eval sequences

* fix formatting

* config changes

* add compilation to lm_runner.py

* remove accidental print statement

* formatting fix
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