-
Notifications
You must be signed in to change notification settings - Fork 637
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
Multi-Tiered HF Cache #2816
Comments
Hi @XenonMolecule, thanks for explaining in details your feature request. At the moment the codebase doesn't support having a read-only shared cache + a read-write personal one. I understand the pros of having such a feature but adding this would be a major change in the download logic -and might be error-prone-. For now I'd like to gauge interest from the community before starting any plans. I'll keep this issue open, anyone is welcome to comment and react if interested :) As a workaround, here are the few things you might be interested in:
|
Thanks, @Wauplin! Even after I suggested it, I thought this might be tricky to coordinate between huggingface_hub and the various libraries built on it, such as datasets and transformers, which seem to assume a single cache dir. Still, I'm keeping my hopes up that this can make it into the roadmap for a longer horizon update in the future! I appreciate your suggestions; I'll use them for now! Excited to see how much community interest there is in this idea. |
Is your feature request related to a problem? Please describe.
When working on a shared compute cluster, allocating a shared hugging face cache for popular models can be helpful. However, if everyone uses only one cache, as people use one-off models and datasets, the cache directory will quickly fill up with unnecessary files.
Describe the solution you'd like
Ideally, there could be a two-tiered cache structure. One read-only cache which first checks whether or not the server has already downloaded the model. Such a cache could be filled by some admin users based on the agreed models to include. Then the users personal read-write cache would be the second level of cache hit. With this cache they could download their personal use models and datasets that won't be useful as a shared server resource.
Describe alternatives you've considered
Additional context
Others are using shared huggingface caches: https://benjijang.com/posts/2024/01/shared-hf-cache/ it would be great to add this multitiered cache support! Apologies if such a feature exists and I'm unaware!
The text was updated successfully, but these errors were encountered: