From 57ce61a30713885531c2d13b65143d17cd9f3b25 Mon Sep 17 00:00:00 2001 From: Abhishek Gopinath Kovath Date: Wed, 3 Apr 2024 03:31:17 +0530 Subject: [PATCH] Missing tokenizer.model error during gguf conversion --- convert-hf-to-gguf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert-hf-to-gguf.py b/convert-hf-to-gguf.py index 18337839a..6689491d3 100755 --- a/convert-hf-to-gguf.py +++ b/convert-hf-to-gguf.py @@ -324,7 +324,7 @@ class Model(ABC): 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())