# Prerequisites Please answer the following questions for yourself before submitting an issue. - [X] I am running the latest code. Development is very rapid so there are no tagged versions as of now. - [X] I carefully followed the [README.md](https://github.com/abetlen/llama-cpp-python/blob/main/README.md). - [x] I [searched using keywords relevant to my issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests) to make sure that I am creating a new issue that is not already open (or closed). - [X] I reviewed the [Discussions](https://github.com/abetlen/llama-cpp-python/discussions), and have a new bug or useful enhancement to share. # Expected Behavior and Current Behavior The latest version of llama-cpp-python kills python kernel with LlamaGrammar. I ran the following code: ```python from llama_cpp import Llama, LlamaGrammar model = Llama(model_path="ggufs/Meta-Llama-3-8B-Instruct.Q5_K_M.gguf", verbose=False) # Model doesn't matter. grammar = LlamaGrammar.from_string('root ::= "a"+') model("hello", max_tokens=10, grammar=grammar) ``` When it ran, the python kernel died immediately for unknown reason. Dying kernel doesn't happen without use of `LlamaGrammar`. Because this behavior has not been observed recently (actually few days ago), I suspect my recent update of llama-cpp-python module made this problem. What I tried is: 1. Build the latest code by myself -> kernel died 2. Build [the code in the latest release](https://github.com/abetlen/llama-cpp-python/releases/tag/v0.2.83-metal) by myself -> kernel died 3. Re-install [wheel of the latest release](https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.83-metal/llama_cpp_python-0.2.83-cp311-cp311-macosx_11_0_arm64.whl) -> No problem My experiment might suggest this problem comes from backend Llama.cpp and is not llama-cpp-python's fault. But anyway, I wanna know whether people is experiencing this bug. # Environment **OS**: macOS Sonoma **Processor**: M2Max 64GB. **Python version**: 11