llama.cpp
005780d2 - grammar: add @"..." token-aware literal syntax

Commit
143 days ago
grammar: add @"..." token-aware literal syntax Add LLAMA_GRETYPE_TOKEN_LITERAL for token-aware grammar matching: - Matches by token ID when literal resolves to single token - Falls back to character-by-character matching otherwise Also adds until_token() to PEG parser and updates to_gbnf() to emit @"..." syntax for token() primitives, enabling token-aware constrained decoding in generated grammars. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
Parents
Loading