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

fix: additional_files support glob patterns #1800

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xianml
Copy link

@xianml xianml commented Oct 16, 2024

make parameter additional_files of from_pretrained support glob patterns as it declared in the function anotation as below

additional_files: A list of filenames or glob patterns to match additional model files in the repo.

with this change, now we do not need to list all the shards of weight files

before

    additional_files:
      - qwen2.5-72b-instruct-q4_k_m-00001-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00002-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00003-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00004-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00005-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00006-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00007-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00008-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00009-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00010-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00011-of-00012.gguf
      - qwen2.5-72b-instruct-q4_k_m-00012-of-00012.gguf
    filename: qwen2.5-72b-instruct-q4_k_m-00001-of-00012.gguf
    repo_id: Qwen/Qwen2.5-72B-Instruct-GGUF

after

   additional_files:
     - qwen2.5-72b-instruct-q4_k_m-*.gguf
   filename: qwen2.5-72b-instruct-q4_k_m-00001-of-00012.gguf
   repo_id: Qwen/Qwen2.5-72B-Instruct-GGUF

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.

1 participant