Skip to content

Commit 868cb6a

Browse files
committed
Merge commit 'e121edc4324a640be11b7e567edd39b721b0f8e4' into concedo_experimental
# Conflicts: # .github/workflows/release.yml # common/CMakeLists.txt # docs/function-calling.md # ggml/src/ggml-sycl/binbcast.cpp # models/templates/README.md # scripts/tool_bench.py # src/llama-kv-cache.cpp # tests/CMakeLists.txt # tests/test-chat.cpp # tools/mtmd/clip.h # tools/rpc/rpc-server.cpp # tools/server/README.md
2 parents 85fd62c + e121edc commit 868cb6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3502
-1163
lines changed

common/arg.cpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2849,15 +2849,24 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
28492849
).set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_MAIN}).set_env("LLAMA_ARG_JINJA"));
28502850
add_opt(common_arg(
28512851
{"--reasoning-format"}, "FORMAT",
2852-
"reasoning format (default: deepseek; allowed values: deepseek, none)\n"
2853-
"controls whether thought tags are extracted from the response, and in which format they're returned. 'none' leaves thoughts unparsed in `message.content`, 'deepseek' puts them in `message.reasoning_content` (for DeepSeek R1 & Command R7B only).\n"
2854-
"only supported for non-streamed responses",
2852+
"controls whether thought tags are allowed and/or extracted from the response, and in which format they're returned; one of:\n"
2853+
"- none: leaves thoughts unparsed in `message.content`\n"
2854+
"- deepseek: puts thoughts in `message.reasoning_content` (except in streaming mode, which behaves as `none`)\n"
2855+
"(default: deepseek)",
28552856
[](common_params & params, const std::string & value) {
28562857
/**/ if (value == "deepseek") { params.reasoning_format = COMMON_REASONING_FORMAT_DEEPSEEK; }
28572858
else if (value == "none") { params.reasoning_format = COMMON_REASONING_FORMAT_NONE; }
2858-
else { std::invalid_argument("invalid value"); }
2859+
else { throw std::invalid_argument("invalid value"); }
28592860
}
28602861
).set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_MAIN}).set_env("LLAMA_ARG_THINK"));
2862+
add_opt(common_arg(
2863+
{"--reasoning-budget"}, "N",
2864+
"controls the amount of thinking allowed; currently only one of: -1 for unrestricted thinking budget, or 0 to disable thinking (default: -1)",
2865+
[](common_params & params, int value) {
2866+
if (value != 0 && value != -1) { throw std::invalid_argument("invalid value"); }
2867+
params.reasoning_budget = value;
2868+
}
2869+
).set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_MAIN}).set_env("LLAMA_ARG_THINK_BUDGET"));
28612870
add_opt(common_arg(
28622871
{"--chat-template"}, "JINJA_TEMPLATE",
28632872
string_format(
@@ -2956,7 +2965,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
29562965
[](common_params & params, const std::string & value) {
29572966
/**/ if (value == "jsonl") { params.batched_bench_output_jsonl = true; }
29582967
else if (value == "md") { params.batched_bench_output_jsonl = false; }
2959-
else { std::invalid_argument("invalid value"); }
2968+
else { throw std::invalid_argument("invalid value"); }
29602969
}
29612970
).set_examples({LLAMA_EXAMPLE_BENCH}));
29622971
add_opt(common_arg(

0 commit comments

Comments
 (0)