]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
chat : implement minicpm5 parser (#24889)
authorAldehir Rojas <redacted>
Sun, 28 Jun 2026 14:53:32 +0000 (09:53 -0500)
committerGitHub <redacted>
Sun, 28 Jun 2026 14:53:32 +0000 (16:53 +0200)
commitc818263f2a5ddab028dea5f169ea2b2266421125
treedc15c2be1824c7bd30aa8a77cbec011b54c9bdee
parentf68a788b0bf41d88cb90fd93c7027471a2ebe30a
chat : implement minicpm5 parser (#24889)

* Add minicpm5 tool call parser

* Refactor MiniCPM5 PEG parser per review feedback

* Fix jinja min/max API to match Jinja2

* modify by review

* MiniCPM5: use autoparser for XML tool calls and fix grammar preserved-token triggers

* MiniCPM5: fix streaming tool-arg placeholder and remove alt XML markers

* skip min/max attribute tests in -py mode

* test-jinja: use real expected output for min/max attribute tests

* MiniCPM5: revert shared mapper and history fallbacks per review

Drop streaming tool-arg placeholder workarounds from the generic PEG
mapper and restore strict tool-call argument JSON parsing so MiniCPM5
support stays limited to autoparser/diff-analyzer changes.

* chat : refactor minicpm5 back to dedicated parser

* cont : simplify grammar

* cont : refactor

* cont : fixes

* cont : rename template to openbmb-MiniCPM5-1B.jinja

* cont : add message delimiters

* cont : fix tests

---------

Co-authored-by: zhangtao <redacted>
Co-authored-by: 张涛 <>
common/chat.cpp
common/jinja/value.cpp
models/templates/openbmb-MiniCPM5-1B.jinja [new file with mode: 0644]
tests/test-chat.cpp
tests/test-jinja.cpp