From db214fa578e00b01e0884fc2725c9349608bdab5 Mon Sep 17 00:00:00 2001 From: Abhishek Gopinath K <31348521+overtunned@users.noreply.github.com> Date: Wed, 3 Apr 2024 21:12:52 +0530 Subject: [PATCH] Missing tokenizer.model error during gguf conversion (#6443) Co-authored-by: Jared Van Bortel --- convert-hf-to-gguf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/convert-hf-to-gguf.py b/convert-hf-to-gguf.py index afa034a86..bca1c2d79 100755 --- a/convert-hf-to-gguf.py +++ b/convert-hf-to-gguf.py @@ -323,8 +323,7 @@ class Model(ABC): toktypes: list[int] = [] if not tokenizer_path.is_file(): - print(f'Error: Missing {tokenizer_path}', file=sys.stderr) - sys.exit(1) + raise FileNotFoundError(f"File not found: {tokenizer_path}") tokenizer = SentencePieceProcessor(str(tokenizer_path)) vocab_size = self.hparams.get('vocab_size', tokenizer.vocab_size())