From e14c06123883bf9c5f9f70bde60419f8b72fc77a Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Sun, 14 Dec 2025 06:01:28 +0300 Subject: [PATCH] spec: Switch from llama-cli to llama-completion and llama-server llama-cli as a different show off program now. So, switch to older llama-completion for testing and to llama-server for versioning and man-page generation. Signed-off-by: Vitaly Chikunov --- .gear/llama.cpp.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gear/llama.cpp.spec b/.gear/llama.cpp.spec index 77c337fea..65c086d59 100644 --- a/.gear/llama.cpp.spec +++ b/.gear/llama.cpp.spec @@ -176,7 +176,7 @@ export NVCC_PREPEND_FLAGS=-ccbin=g++-12 grep -E 'LLAMA|GGML' %_cmake__builddir/CMakeCache.txt | sort | tee build-options.txt %cmake_build find -name '*.py' | xargs sed -i '1s|#!/usr/bin/env python3|#!%__python3|' -LD_LIBRARY_PATH=%_cmake__builddir/bin %_cmake__builddir/bin/llama-cli --completion-bash > llama.bash +LD_LIBRARY_PATH=%_cmake__builddir/bin %_cmake__builddir/bin/llama-server --completion-bash > llama.bash LD_LIBRARY_PATH=%_cmake__builddir/bin .gear/gen-manpage %_cmake__builddir/bin/llama-server > llama-server.1 %install @@ -192,9 +192,9 @@ install -Dp examples/*.py -t %buildroot%_datadir/%name/examples # We need to run the tests, not install them. rm %buildroot%_bindir/test-* # Completions. -install -Dpm644 llama.bash %buildroot%_datadir/bash-completion/completions/llama-cli -printf '%%s\n' llama-server llama-simple llama-run llama-mtmd-cli | - xargs -ti ln -s llama-cli %buildroot%_datadir/bash-completion/completions/{} +install -Dpm644 llama.bash %buildroot%_datadir/bash-completion/completions/llama-server +printf '%%s\n' llama-cli llama-simple llama-run llama-mtmd-cli | + xargs -ti ln -s llama-server %buildroot%_datadir/bash-completion/completions/{} mv %buildroot%_bindir/rpc-server %buildroot%_bindir/llama-rpc-server install -Dpm644 llama-server.1 -t %buildroot%_man1dir @@ -204,12 +204,12 @@ install -Dpm644 llama-server.1 -t %buildroot%_man1dir # Local path are more useful for debugging becasue they are not stripped by default. %dnl export LD_LIBRARY_PATH=%buildroot%_libdir:%buildroot%_libexecdir/llama PATH+=:%buildroot%_bindir export LD_LIBRARY_PATH=$PWD/%_cmake__builddir/bin PATH+=:$PWD/%_cmake__builddir/bin -llama-cli --version -llama-cli --version |& grep -Ex 'version: %version \(\S+ \[%release\]\)' +llama-server --version +llama-server --version |& grep -Ex 'version: %version \(\S+ \[%release\]\)' # test-eval-callback wants network. %ctest -j1 -E test-eval-callback -llama-cli -m %_datadir/tinyllamas/stories260K.gguf -p "Hello" -s 42 -n 500 -llama-cli -m %_datadir/tinyllamas/stories260K.gguf -p "Once upon a time" -s 55 -n 33 | +llama-completion -m /usr/share/tinyllamas/stories260K.gguf -p "Hello" -s 42 -n 500 2>/dev/null +llama-completion -m /usr/share/tinyllamas/stories260K.gguf -p "Once upon a time" -s 55 -n 33 2>/dev/null | grep 'Once upon a time, there was a boy named Tom. Tom had a big box of colors.' # We do not provide convert tools. mv %buildroot%_bindir/convert*.py -t %buildroot%_datadir/%name/examples