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

incorrect cache folder name capitalization #2090

Open
poedator opened this issue Mar 6, 2024 · 1 comment
Open

incorrect cache folder name capitalization #2090

poedator opened this issue Mar 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@poedator
Copy link
Contributor

poedator commented Mar 6, 2024

Describe the bug

When loading model and making error in capitalization, like "facebook/OPT-125m" vs "facebook/opt-125m", the model gets downloaded anew and saved into a folder with wrongly capitalized name. This happens even when the model has already been saved with correct capitalization before.
This is a nuisance when working with large models which get downloaded and saved unnecessarily, taking bandwidth and disk space. Examples: "Llama" vs 'llama" etc.

Proposed solutions:
a) always use lowercase in model cache folder name
b) get proper model name capitalization from config.json before saving model, and then use it, even if different from the requested model name
c) validate model name before downloading using some additional request to HF.

@poedator poedator added the bug Something isn't working label Mar 6, 2024
@Wauplin
Copy link
Contributor

Wauplin commented Mar 6, 2024

Thanks for reporting this issue @poedator! This is indeed happening due to the fact repo ids are case insensitive across the Hub. Will try to see what we can do to mitigate this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants