Skip to content

Enable recursive search of HFFS.ls#1656

Merged
abetlen merged 2 commits intoabetlen:mainfrom
benHeid:patch-2
Aug 7, 2024
Merged

Enable recursive search of HFFS.ls#1656
abetlen merged 2 commits intoabetlen:mainfrom
benHeid:patch-2

Conversation

@benHeid
Copy link
Contributor

@benHeid benHeid commented Aug 5, 2024

Models that are not located at the top-level of hugging face repos are not found. Thus, this PR enables recursive ls of offs.

Enables now:

Llama.from_pretrained(
             "LiteLLMs/OpenELM-270M-GGUF", filename="*/Q2_K-00001-of-00001.gguf",
             subfolder="Q2_K"
         )   

which would otherwise fail with:

ValueError: No file found in LiteLLMs/OpenELM-270M-GGUF that match */Q2_K-00001-of-00001.gguf

Available Files:
["Q2_K", "Q3_K", "Q3_K_L", "Q3_K_M", "Q3_K_S", "Q4_0", "Q4_1", "Q4_K", "Q4_K_M", "Q4_K_S", "Q5_0", "Q5_1", "Q5_K", "Q5_K_M", "Q5_K_S", "Q6_K", "Q8_0", ".gitattributes"]

Enable rercursive ls for hffs. Otherwise models in subfolder wouldn't be found.
@benHeid benHeid changed the title Update llama.py Enable recursive search of HFFS.ls Aug 5, 2024
@benHeid benHeid changed the title Enable recursive search of HFFS.ls Enable recursive search of HFFS.ls Aug 5, 2024
@abetlen abetlen merged commit 5e39a85 into abetlen:main Aug 7, 2024
benniekiss pushed a commit to benniekiss/llama-cpp-python that referenced this pull request Aug 23, 2024
…abetlen#1656)

Enable rercursive ls for hffs. Otherwise models in subfolder wouldn't be found.

Co-authored-by: Andrei <abetlen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants