From b4455b241b71af11acf0403cfd1e88f7c0848ce8 Mon Sep 17 00:00:00 2001 From: OlivierDehaene <23298448+OlivierDehaene@users.noreply.github.com> Date: Tue, 31 Jan 2023 18:38:31 +0100 Subject: [PATCH] update readme --- README.md | 1 + server/text_generation/utils.py | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2635f641..67940ae8 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/server/text_generation/utils.py b/server/text_generation/utils.py index 241973bf..62d60635 100644 --- a/server/text_generation/utils.py +++ b/server/text_generation/utils.py @@ -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():