]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
`tool-call`: fix Qwen 2.5 Coder support, add micro benchmarks, support trigger patter...
authorOlivier Chafik <redacted>
Wed, 5 Mar 2025 13:05:13 +0000 (13:05 +0000)
committerGitHub <redacted>
Wed, 5 Mar 2025 13:05:13 +0000 (13:05 +0000)
commit669912d9a5bf927312c553332ff997f0a99da8fb
treebf6b6cf759e358d7f189e6d75c9aba5f3a5b63b7
parentfa31c438e0e709242ab7334d26fc3be3dcda07a0
`tool-call`: fix Qwen 2.5 Coder support, add micro benchmarks, support trigger patterns for lazy grammars (#12034)

* sampler: turn lazy grammar trigger words to regexes

* add scripts/tool_bench.sh & .py

* constrain llama json output regardless of function name if matches at beginning

* update relaxed newline space rule in grammar tests

* support add_generation_prompt query parameter (useful for /apply_template)

* Update src/llama-grammar.cpp

Co-authored-by: Georgi Gerganov <redacted>
---------

Co-authored-by: Georgi Gerganov <redacted>
26 files changed:
README.md
common/chat.cpp
common/common.cpp
common/common.h
common/json-schema-to-grammar.cpp
common/json-schema-to-grammar.h
common/sampling.cpp
examples/json_schema_to_grammar.py
examples/server/public_legacy/json-schema-to-grammar.mjs
examples/server/server.cpp
examples/server/tests/unit/test_tool_call.py [changed mode: 0644->0755]
examples/server/tests/utils.py
examples/server/utils.hpp
include/llama.h
models/templates/README.md
requirements.txt
requirements/requirements-all.txt
requirements/requirements-tool_bench.txt [new file with mode: 0644]
scripts/fetch_server_test_models.py
scripts/tool_bench.py [new file with mode: 0755]
scripts/tool_bench.sh [new file with mode: 0755]
src/llama-grammar.cpp
src/llama-grammar.h
src/llama-sampling.cpp
tests/test-chat.cpp
tests/test-json-schema-to-grammar.cpp