Skip to content

Compiled grammar masks for constrained generation (XGrammar) #89

Open

Description

@zeekay

References: XGrammar, https://github.com/mlc-ai/xgrammar ; XGrammar-2, https://doi.org/10.1145/3786335.3813124

Prototype compiled JSON-schema and tool-call grammars with cached masks. Acceptance: invalid-output rate and tokens per second against current constrained decoding. This improves structured text generation in Zen; Kai already returns structured decisions without generating text and is not replaced.

Class: research bounty. A reproducible experiment with raw results, methodology, limitations and an integration recommendation; a valid negative result completes it. If the result earns a place in the core, maintainers open an implementation bounty on this issue (accepted code, tests, benchmarks, license clearance, merged PR); reproducing a paper alone is not enough.

Every submission carries: (1) the primary paper or code link, a summary and a license audit; (2) a reproducible upstream baseline and the identical baseline on Hanzo hardware; (3) one falsifiable hypothesis with metrics and expected failure modes; (4) a bounded implementation PR, or a documented negative result; (5) correctness, concurrency, security and regression evidence appropriate to the change; (6) before/after measurements, raw results and a HIP update.

Published numbers are the papers' own and are not Hanzo claims until reproduced here. Paper access is not permission to import code: the source license, dependencies, datasets, model licenses and patent notices are checked before any code is accepted; prefer Apache-2.0 or MIT. Canonical architecture stays fixed: vfs -> Hanzo S3 -> Visor, Cloud owns lifecycle and billing, Enso routes models, Zen generates, Kai decides. Research improves these components; it does not create parallel versions of them.

Tracked by HIP-1346 (draft). Open for community research: comment to claim, publish method and raw numbers. Reward terms are set by the maintainers on the issue.

Activity

  1. added
    help wanted
    hip-1346
    on Nov 16, 2026
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

    bountyhelp wantedhip-1346p1perfresearch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions