]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
Tool call support (generic + native for Llama, Functionary, Hermes, Mistral, Firefunc...
authorOlivier Chafik <redacted>
Thu, 30 Jan 2025 19:13:58 +0000 (19:13 +0000)
committerGitHub <redacted>
Thu, 30 Jan 2025 19:13:58 +0000 (19:13 +0000)
commit8b576b6c55bc4e6be898b47522f0ef402b93ef62
treef8afb2fa71ef1d388eab0b6db64b908e91148af5
parent27d135c970c00f655d486f870edacded792bef5c
Tool call support (generic + native for Llama, Functionary, Hermes, Mistral, Firefunction, DeepSeek) w/ lazy grammars (#9639)

---------

Co-authored-by: Xuan Son Nguyen <redacted>
Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Xuan Son Nguyen <redacted>
49 files changed:
.editorconfig
.github/workflows/server.yml
Makefile
README.md
common/CMakeLists.txt
common/chat.cpp [new file with mode: 0644]
common/chat.hpp [new file with mode: 0644]
common/common.cpp
common/common.h
common/json-schema-to-grammar.cpp
common/json-schema-to-grammar.h
common/sampling.cpp
examples/gbnf-validator/gbnf-validator.cpp
examples/main/main.cpp
examples/server/README.md
examples/server/server.cpp
examples/server/tests/README.md
examples/server/tests/pytest.ini [new file with mode: 0644]
examples/server/tests/tests.sh
examples/server/tests/unit/test_chat_completion.py
examples/server/tests/unit/test_tool_call.py [new file with mode: 0644]
examples/server/tests/utils.py
examples/server/utils.hpp
include/llama.h
models/templates/CohereForAI-c4ai-command-r-plus-tool_use.jinja [new file with mode: 0644]
models/templates/NousResearch-Hermes-2-Pro-Llama-3-8B-tool_use.jinja [new file with mode: 0644]
models/templates/NousResearch-Hermes-3-Llama-3.1-8B-tool_use.jinja [new file with mode: 0644]
models/templates/Qwen-Qwen2.5-7B-Instruct.jinja [new file with mode: 0644]
models/templates/deepseek-ai-DeepSeek-R1-Distill-Llama-8B.jinja [new file with mode: 0644]
models/templates/deepseek-ai-DeepSeek-R1-Distill-Qwen-32B.jinja [new file with mode: 0644]
models/templates/fireworks-ai-llama-3-firefunction-v2.jinja [new file with mode: 0644]
models/templates/google-gemma-2-2b-it.jinja [new file with mode: 0644]
models/templates/meetkai-functionary-medium-v3.1.jinja [new file with mode: 0644]
models/templates/meetkai-functionary-medium-v3.2.jinja [new file with mode: 0644]
models/templates/meta-llama-Llama-3.1-8B-Instruct.jinja [new file with mode: 0644]
models/templates/meta-llama-Llama-3.2-3B-Instruct.jinja [new file with mode: 0644]
models/templates/meta-llama-Llama-3.3-70B-Instruct.jinja [new file with mode: 0644]
models/templates/microsoft-Phi-3.5-mini-instruct.jinja [new file with mode: 0644]
models/templates/mistralai-Mistral-Nemo-Instruct-2407.jinja [new file with mode: 0644]
scripts/fetch_server_test_models.py [new file with mode: 0755]
scripts/get_chat_template.py [new file with mode: 0644]
scripts/get_hf_chat_template.py [deleted file]
src/llama-grammar.cpp
src/llama-grammar.h
src/llama-sampling.cpp
tests/CMakeLists.txt
tests/test-chat-template.cpp
tests/test-chat.cpp [new file with mode: 0644]
tests/test-grammar-integration.cpp