Skip to content

server: Unicode tool properties collide in PEG grammar #30

Description

@am17an

Upstream: ggml-org#28429

Problem: Two Unicode tool-property names collapse to one PEG rule, so constrained sampling emits a duplicate wrong argument name.

Environment: upstream 6a1a922d2 (b10819), Linux, NVIDIA GB10/CUDA 13.0, Qwen3.6 27B NVFP4, --jinja.

Reproduction: Serve the model with:

./build/bin/llama-server -m qwen3.6-27b-nvfp4.gguf -ngl 99 -c 2048 --jinja --no-warmup -lv 5 --port 18083

Send a required app_control tool whose schema has:

{"properties":{"操作":{"type":"string","enum":["open","close"]},"应用名":{"type":"string"}},"required":["应用名"],"additionalProperties":false}

Observed: The response arguments were {"应用名":"我的电脑","应用名":"open"}. The dumped grammar contained only tool-app-control-arg--, matching 应用名; 操作 was absent.

Likely cause: rule_name() replaces all non-ASCII runs with -, and add_rule() silently overwrites the colliding key. The sanitizer was introduced in 0a8026e768 (ggml-org#17136).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserver

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions