Closed chanind closed 1 week ago
Attention: Patch coverage is 84.09091%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 72.88%. Comparing base (
17506ac
) to head (b49fece
). Report is 12 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
sae_lens/training/training_sae.py | 85.18% | 2 Missing and 2 partials :warning: |
sae_lens/sae_training_runner.py | 0.00% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
Description
This PR implements topk SAE training by adding the topk auxiliary loss. This PR makes several design choices:
topk
is specified as anarchitecture
for training, so it's similar togated
andjumprelu
SAEs. This seems fit the idea of an SAE architecture since it has its own custom training routine and losses, and it seems strange to call "jumprelu" and "gated" architectures, but not topk.Our implementation of topk training is likely less efficient than Eleuther's as they use a custom sparse kernel for the SAE decoder (see https://github.com/EleutherAI/sae/blob/main/sae/kernels.py). We can try to support something like this in the future, but it will likely require a bit of refactoring before we can support a special decoder kernel just for topk.
I'm currently running some test training runs to make sure things look decent, and will upgrade this PR from draft when those are complete.
Fixes #202
training test run dashboard: https://api.wandb.ai/links/chanind/zju8dl70
Type of change
Please delete options that are not relevant.
Checklist:
You have tested formatting, typing and unit tests (acceptance tests not currently in use)
make check-ci
to check format and linting. (you can runmake format
to format code if needed.)