-
Notifications
You must be signed in to change notification settings - Fork 133
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
Faster geometric median. #22
Faster geometric median. #22
Conversation
This is awesome! I wanted to use this in my work as well, so I packaged this as a pypi module as |
Cool, thanks! Go ahead and transfer it |
Just sent the transfer request to you |
@themachinefan let me know if you have any questions about how the repo is structured or how to do development work on it (my email is in my github profile) . It's set up to autodeploy using semantic-release, so if your commit message to |
Thanks @themachinefan and @chanind . I had to make some changes for the formatter but all good now. |
…edian Faster geometric median.
The 'torch' version of the geometric median code uses lists and numpy arrays a bunch, here's a true torch version
Test it by running sae_training/geometric_median.py
It's about a 5x speedup on cpu and 1000x speedup on gpu :D
(please double check my changes to train_sae_on_language_model.py, I'm running stuff on my own code base and haven't actually set up this environment to try the training! Also consider increasing max iter since it's faster.)