Skip to content

XGrammar Invalid Token-ID #766

@Whadup

Description

@Whadup

I am using the following grammar for guided generation:

      root ::= [wWuUaAfFqQ] [kKhHvViIsS] completion terminator
      completion ::= "" | [a-zA-Z] completion
      terminator ::= " " | ""

with the model Llama-3.2-1B-Instruct-q4f16_1-MLC

and quite frequently I get the following error when I prompt my model. I'm running on v0.2.80.

Users/cfruan/Documents/xgrammar/cpp/matcher.cc:273: Check failed: (token_id >= 0 && token_id < tokenizer_info_.GetVocabSize()) is false: Invalid token id -1789744523 for GrammarMatcher

How can I debug this further?

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