-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Process crash due to white spaces in grammar file. #4376
Comments
I'm also experiencing this issue on the latest commit (fe680e3). My Grammar
|
I tracked the source of the issue down to the commit 5f6e0c0. The issue originates from an optimization which replaced Lines 9997 to 10008 in 5f6e0c0
Reverting the changes in
@darxkies Can you check if reverting back to |
@AlienKevin, I can confirm that this fixes the issue. I experienced same problem with Emerhyst 20B and Llama 2 Chat 13B. |
@AlienKevin By restoring the two last changes from the patch above that were introduced in b1614, it works again. |
Is anyone interested in a pull request to revert the two lines? |
I think besides the PR, we might benefit from several regression tests for grammar sampling. The current test for grammar sampling seems to be manually written and quite hard to read. Maybe we can add some simpler tests based on larger grammars that just ensures that the sampling process never fails? I'll be happy to contribute my grammar as a test case. |
Submitted a PR with the two line fix: #4396 |
It would suffice if it was tested against the included grammar files I think. That is what I used to reproduce the bug. There is another bug I found recently that I have to submit and causes the OS to kill it. |
With the latest commit it works again as intended. |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Use grammar files containing white spaces.
Current Behavior
When using a grammar file and the rules contain ' ' or \n then main and server crash with the following error:
GGML_ASSERT: llama.cpp:7776: !grammar->stacks.empty()
ptrace: Operation not permitted.
No stack.
The program is not being run.
Environment and Context
CPU: i9-12900H
OS: Arch
Steps to Reproduce
b1613 was the latest tag that used to work properly. Afterwards it keeps crashing.
It is not related to the model. It failed with several 7b/13b models.
The text was updated successfully, but these errors were encountered: