From: TrevorS Date: Wed, 17 Dec 2025 06:33:02 +0000 (-0800) Subject: arg: allow -kvu flag for llama-perplexity (#18117) X-Git-Tag: upstream/0.0.7446~1 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=4b2a4778f81f222c12271ce3b1997990b3071faf;p=pkg%2Fggml%2Fsources%2Fllama.cpp arg: allow -kvu flag for llama-perplexity (#18117) The -kvu (--kv-unified) flag is required for hellaswag and winogrande benchmarks which use coupled sequences. Without unified KV cache, these benchmarks fail with: split_equal: sequential split is not supported when there are coupled sequences in the input batch (you may need to use the -kvu flag) This change adds LLAMA_EXAMPLE_PERPLEXITY to the allowed examples for the -kvu argument, enabling its use with llama-perplexity. --- diff --git a/common/arg.cpp b/common/arg.cpp index f2aec895..a4ffd558 100644 --- a/common/arg.cpp +++ b/common/arg.cpp @@ -1140,7 +1140,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex [](common_params & params) { params.kv_unified = true; } - ).set_env("LLAMA_ARG_KV_UNIFIED").set_examples({LLAMA_EXAMPLE_SERVER})); + ).set_env("LLAMA_ARG_KV_UNIFIED").set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_PERPLEXITY})); add_opt(common_arg( {"--context-shift"}, {"--no-context-shift"},