Skip to content

Eval bug: trivial grammar crashes (DeepSeek R1 Distill Llama 8B) #11591

Closed
@ochafik

Description

@ochafik

Name and Version

latest

Operating systems

No response

Which llama.cpp modules do you know to be affected?

libllama (core library)

Command line

llama-cli -hf bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M --grammar 'root ::= "{"' -p hey -no-cnv

Problem description & steps to reproduce

With the following extremely simple grammar somehow at the time we reach the grammar sampler, there's only 1 candidate (@) and it hard crashes.

First Bad Commit

cc/ @ggerganov could this be related to any recent refactoring? (#10803 maybe? I'll try and bissect)

Relevant log output

hey/tmp/llama.cpp-20250131-5280-k2rjfn/src/llama-grammar.cpp:1216: GGML_ASSERT(!grammar.stacks.empty()) failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions