]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Missing tokenizer.model error during gguf conversion (#6443)
authorAbhishek Gopinath K <redacted>
Wed, 3 Apr 2024 15:42:52 +0000 (21:12 +0530)
committerGitHub <redacted>
Wed, 3 Apr 2024 15:42:52 +0000 (11:42 -0400)
Co-authored-by: Jared Van Bortel <redacted>
convert-hf-to-gguf.py

index afa034a86900496fe566a219aecf75dd8e9426b5..bca1c2d7942176b139f8f95f263c202e78aa4189 100755 (executable)
@@ -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())