llama.cpp
chat : implement token aware parsing
#29307
Merged

chat : implement token aware parsing #29307

aldehir
aldehir aldehir force pushed to 27c2bb46 60 days ago
github-actions github-actions added server
aldehir aldehir force pushed from 27c2bb46 55 days ago
github-actions github-actions added documentation
github-actions github-actions added testing
aldehir aldehir force pushed 55 days ago
aldehir aldehir force pushed to 2f910999 55 days ago
aldehir aldehir force pushed from 2f910999 to f3d24537 20 days ago
aldehir aldehir force pushed from f3d24537 to f762d791 13 days ago
aldehir
ggml-gh-bot
aldehir
ggml-gh-bot
aldehir
aldehir aldehir marked this pull request as ready for review 13 days ago
aldehir aldehir requested a review from pwilkin pwilkin 13 days ago
aldehir aldehir requested a review from ggerganov ggerganov 13 days ago
aldehir aldehir requested a review 13 days ago
aldehir aldehir requested a review 13 days ago
ngxson
aldehir
ggml-gh-bot
aldehir
ngxson
aldehir
aldehir grammar : allow byte-split characters under token rules
1bfc224f
aldehir tests : check the grammar mask against accept for every token
5367943e
aldehir grammar : add token range and alt support
3c6563e2
aldehir grammar : keep tokens named by token rules out of char rules
031308b7
aldehir grammar : reject invalid UTF-8 continuations when accepting a token
c940782c
aldehir tests : clean up
6b252e58
aldehir grammar : clean up comments
a1c39189
aldehir tests : keep the mask check out of the catch handler in match_string
626a4fcf
aldehir tests : initialize the new llama_grammar_candidate fields
2d118569
aldehir grammar : update documentation
ca5c0285
aldehir common : align tokens with bytes when tokenizing chat input
a31fbb57
aldehir chat : store special tokens for chat parsing
e36797b8
aldehir chat/peg : implement token parser
693326ac
aldehir chat : make trie token aware
a89c26dd
aldehir chat : update gbnf builders to use token rules
04f44d39
aldehir cont : clean up
5ef0e1b2
aldehir chat : migrate gpt-oss and qwen3-coder to token aware parsers
08aeb1b1
aldehir chat : gate tool call grammars on their triggers
94b4c765
aldehir chat : refactor ac to support branching
071c5572
aldehir chat : simplify delimiter expansion
35b90d09
aldehir cont : clean up
46343a51
aldehir cont : clean up
8e7a8144
aldehir chat : rename token_table
bbe8fbe0
aldehir cont : remove using keyword here
5648ae20
aldehir cont : clean up old commented line
1571690e
aldehir cont : refactor trigger rules
0490effa
aldehir cont : allow parsers as delimiters
0b06a8e7
aldehir cont : spacing
c884c902
aldehir cont : merge until and ac parsers
566a2dda
aldehir cont : implement token negation parser
d97be4d5
aldehir cont : simplify trigger rules
aff5efea
aldehir cont : rename second until() variant to through()
7fa9c352
aldehir cont : convert gemma4 to a token parser
a8afd975
aldehir cont : fix gemma4 empty reasoning block and unused tool_call rule
b6cb7079
aldehir cont : fix gcc parentheses warning and trailing whitespace
479d2ae2
aldehir cont : fix gcc parentheses warning in gbnf generation test
192cbf08
aldehir cont : pin the until rule id in trigger rule gbnf tests
c75d346c
aldehir cont : port the K2 Horizon parser to through()
e8518996
aldehir cont : port the Harmony XML and Muse Spark parsers to through()
304839bd
aldehir cont : port the Muse Glimmer parser to a scanning grammar
dedd6416
aldehir cont : use master impl instead
45bd2bce
aldehir cont : clean up
4e7b6c4a
aldehir gpt-oss: keep tool headers atomic so prefix names are not reported early
9ce54ee3
aldehir common/peg-parser : refactor building of tries
d383efec
aldehir cont : simplify some comments
5185e5d0
aldehir doc : rephrase trigger_rule documentation
11ed6249
aldehir chat : remove trigger rule for muse glimmer
ce69f81e
aldehir tests : add infra for testing token parsing
96a27b78
aldehir tests : add special tokens for supporting parsers
4a9f5ae7
aldehir tests : only run one set of tests
42ce9e2f
aldehir docs : update parsing documentation
291cbda7
aldehir common/autoparser : guard against an empty value suffix
2fe57a92
aldehir cont : cleanup double blank lines
e4082135
aldehir grammar : use uint64 to avoid overflow
5881458f
aldehir aldehir force pushed from 87320cae to 5881458f 12 days ago
aldehir cont : fix gemma4 tool call optional
18b48fab
pwilkin
ggml-gh-bot
aldehir Merge remote-tracking branch 'upstream/master' into token-aware-parsi…
2e2656c3
aldehir cont : address a few more review
ce69a23f
aldehir cont : restore the Harmony XML missing closing tag tolerance
a2c8846f
aldehir cont : remove eot from parser/grammar in muse glimmer
f7e28e5e
aldehir
ggml-gh-bot
aldehir
aldehir cont : comments
8d2450bd
aldehir Merge remote-tracking branch 'upstream/master' into token-aware-parsi…
d64ad085
ngxson
ngxson approved these changes on 2026-11-14
aldehir Merge remote-tracking branch 'upstream/master' into token-aware-parsi…
09fc5d83
CISC
CISC approved these changes on 2026-11-15
aldehir
aldehir
ggml-org ggml-org deleted a comment from samyelzoghby01-lang on 2026-11-21
samyelzoghby01-lang
samyelzoghby01-lang
samyelzoghby01-lang
pwilkin
pwilkin approved these changes on 2026-11-22
pwilkin
pwilkin approved these changes on 2026-11-22
ggerganov
ggerganov approved these changes on 2026-11-22
aldehir aldehir merged 1014775c into master 8 hours ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone