]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
common/parser: handle reasoning budget (#20297)
authorPiotr Wilkin (ilintar) <redacted>
Wed, 11 Mar 2026 09:26:12 +0000 (10:26 +0100)
committerGitHub <redacted>
Wed, 11 Mar 2026 09:26:12 +0000 (10:26 +0100)
commitacb7c790698fa28a0fbfc0468804926815b94de3
tree9d09b6d0686cf93e9d20d190687c1af19a4448a0
parent5f91b1d5d578037ce677fa6769179c6a780a6494
common/parser: handle reasoning budget (#20297)

* v1

* Finished!

* Handlie cli

* Reasoning sampler

* Apply suggestions from code review

Co-authored-by: Sigbjørn Skjæret <redacted>
* Less explosive terminology :)

* Add utf-8 case and tests

* common : migrate reasoning budget sampler to common

* cont : clean up

* cont : expose state and allow passing as initial state

* cont : remove unused imports

* cont : update state machine doc string

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
Co-authored-by: Alde Rojas <redacted>
18 files changed:
common/CMakeLists.txt
common/arg.cpp
common/chat-auto-parser-generator.cpp
common/chat.cpp
common/chat.h
common/common.h
common/reasoning-budget.cpp [new file with mode: 0644]
common/reasoning-budget.h [new file with mode: 0644]
common/sampling.cpp
common/unicode.cpp
common/unicode.h
tests/CMakeLists.txt
tests/test-reasoning-budget.cpp [new file with mode: 0644]
tools/cli/cli.cpp
tools/server/server-common.cpp
tools/server/server-common.h
tools/server/server-context.cpp
tools/server/server-task.cpp