From f62080adfa590e916c029c4e75c925dfda6e68a5 Mon Sep 17 00:00:00 2001 From: teleprint-me <77757836+teleprint-me@users.noreply.github.com> Date: Thu, 23 May 2024 20:50:58 -0400 Subject: [PATCH] refactor: Simplify huggingface hub vocab request --- gguf-py/scripts/hub-vocab.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gguf-py/scripts/hub-vocab.py b/gguf-py/scripts/hub-vocab.py index db588618d..b8de64cdb 100644 --- a/gguf-py/scripts/hub-vocab.py +++ b/gguf-py/scripts/hub-vocab.py @@ -40,9 +40,8 @@ def main(): args = parser.parse_args() vocab_request = HFVocabRequest(args.auth_token, args.model_path, logger) - vocab_list = vocab_request.get_vocab_filenames(args.vocab_type) - for vocab_file in vocab_list: - vocab_request.get_vocab_file(args.model_repo, vocab_file, args.model_path) + vocab_type = vocab_request.get_vocab_enum(args.vocab_type) + vocab_request.get_all_vocab_files(args.model_repo, vocab_type) if __name__ == '__main__':