Skip to content

Invalid json produced with JSON Grammar #171

@HJJ256

Description

@HJJ256

When testing the JSON grammer with Gemma3-12B-IT, the model produces a json which ends like this "] \xa0}".
The entire json structure is

{
    "key": [
        {"inner_key":"value"},
        {"inner_key":"value"}
    ] \xa0}

Using logits processor in "grammar_strict" mode.

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