Skip to content

Improve error message when model file is missing #2041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NITHIN0710
Copy link

Summary

This PR improves the user experience when the specified ".gguf" model file is missing or the path is incorrect.

What Changed

  • Wrapped the "internals.LlamaModel" call in a try-except block.
  • Raised a Python "FileNotFoundError" with a clear, helpful message instead of a raw C++ runtime error.

Why It Matters

The previous behavior showed a confusing stack trace when the model file was not found. This update makes it clear that the issue is a missing or incorrect model path — saving users time and frustration.

Related Issue

Fixes #1381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

llama-cpp-python trigger OpenCL failure, has difference with triggering original c++ code directly
1 participant