Skip to content

Commit a906dee

Browse files
committed
fix: improve error message for invalid model path
- Add helpful guidance when model path does not exist - Suggest verifying path correctness and GGUF file accessibility - Addresses issue #2145 (Improve error messages)
1 parent e894f0d commit a906dee

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

llama_cpp/llama.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,10 @@ def __init__(
374374
self.spm_infill = spm_infill
375375

376376
if not os.path.exists(model_path):
377-
raise ValueError(f"Model path does not exist: {model_path}")
377+
raise ValueError(
378+
f"Model path does not exist: {model_path}. "
379+
f"Please verify the path is correct and the GGUF model file is accessible."
380+
)
378381

379382
self._model = self._stack.enter_context(
380383
contextlib.closing(

0 commit comments

Comments
 (0)