update readme

This commit is contained in:
OlivierDehaene 2023-01-31 18:38:31 +01:00
parent 7df81c34db
commit b4455b241b
2 changed files with 5 additions and 5 deletions

View File

@ -26,6 +26,7 @@ to power Bloom, BloomZ and MT0-XXL api-inference widgets.
- [MT0-XXL](https://huggingface.co/bigscience/mt0-xxl)
- ~~[Galactica](https://huggingface.co/facebook/galactica-120b)~~ (deactivated)
- [SantaCoder](https://huggingface.co/bigcode/santacoder)
- [GPT-Neox 20B](https://huggingface.co/EleutherAI/gpt-neox-20b): use `--revision refs/pr/13`
Other models are supported on a best effort basis using:

View File

@ -198,11 +198,10 @@ def try_to_load_from_cache(model_name, revision, filename):
# Resolve refs (for instance to convert main to the associated commit sha)
if refs_dir.is_dir():
for p in refs_dir.rglob("*"):
if str(p).endswith(revision):
with (refs_dir / revision).open() as f:
revision = f.read()
break
revision_file = refs_dir / revision
if revision_file.exists():
with revision_file.open() as f:
revision = f.read()
# Check if file is cached as "no_exist"
if (no_exist_dir / revision / filename).is_file():