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

Save cached latents as caching progresses #38

Open
SrGonao opened this issue Nov 6, 2024 · 3 comments
Open

Save cached latents as caching progresses #38

SrGonao opened this issue Nov 6, 2024 · 3 comments
Labels

Comments

@SrGonao
Copy link
Collaborator

SrGonao commented Nov 6, 2024

This is a complicated change. At the moment, we are holding all feature activations in RAM while caching, which becomes problematic when dealing with millions of tokens.
I thing the way we want to do this is to use something like huggingface datasets.

@kernel-loophole
Copy link

@SrGonao would love to work on this ,can you provide more details about it .

@SrGonao
Copy link
Collaborator Author

SrGonao commented Nov 12, 2024

Currently, we do feature caching by keeping the activations in memory, before saving it (https://github.com/EleutherAI/sae-auto-interp/blob/v0.2/sae_auto_interp/features/cache.py#L208-L242). We could potentially keep saving it after X amount of tokens and then merge them at the end. This would allow for people to do longer runs where feature activations don't all fit in memory

@kernel-loophole
Copy link

kernel-loophole commented Nov 12, 2024

okay great .will look into that .how can i test this approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants