8000 GitHub ยท Where software is built
[go: up one dir, main page]

Skip to content
Emojis in grammar cause assertion failureย #2501
@ai-and-i

Description

@ai-and-i

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest code. Development is very rapid so there are no tagged versions as of now.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new bug or useful enhancement to share.

Expected Behavior

I'm trying to make a model respond only using emojis. I'm using the following grammar-file for it:

root ::= emoji+
emoji ::= [๐Ÿ˜€-๐Ÿ™]

EDIT: I also tried unicode escapes, and a simpler grammar (see bellow), but the result is the same:

root ::= "\U0001F600"

Current Behavior

llama.cpp crashes with assertion failure:

### Assistant:LLAMA_ASSERT: /Users/test/llama.cpp/llama.cpp:2873: !grammar->stacks.empty()
[1]    56512 abort      ./bin/main -m ../models/stablebeluga-7b.ggmlv3.q4_K_M.bin -f ./prompt.txt -c 102

Environment and Context

This is M1 macbook pro with macos 13.4.1.

Steps to Reproduce

  1. create grammar.gbnf with the content below
  2. launch llama.cpp with the above grammar file

Environment info:

llama.cpp$ git log | head -1
commit 8183159cf3def112f6d1fe94815fce70e1bffa12

llama.cpp$ make --version | head -1
GNU Make 3.81

llama.cpp$ g++ --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0