jbloomAus / SAELens

Training Sparse Autoencoders on Language Models
https://jbloomaus.github.io/SAELens/
MIT License
481 stars 127 forks source link

chore: adding 'Load this SAE' popup to docs table #362

Closed chanind closed 2 weeks ago

chanind commented 2 weeks ago

Description

I've noticed users sometimes get confused on the pretrained SAE table docs page about how to load a specific SAE in their code. This PR adds a "Load this SAE" link to each SAE in the pretrained SAEs table in docs. Clicking this link will pop up the code to load the specific SAE in SAELens, with a "Copy code" button to make it easy to copy into your own work.

Screenshot 2024-11-07 at 10 53 21 Screenshot 2024-11-07 at 10 53 37

The JS/CSS is a bit hacky but should do the job.

Type of change

Please delete options that are not relevant.

Checklist:

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.14%. Comparing base (8e09458) to head (3e9fb62). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #362 +/- ## ======================================= Coverage 66.14% 66.14% ======================================= Files 25 25 Lines 3373 3373 Branches 432 432 ======================================= Hits 2231 2231 Misses 1021 1021 Partials 121 121 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

chanind commented 2 weeks ago

discussed / approved offline