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())