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 <vt@altlinux.org>
This commit is contained in:
parent
3ac9824627
commit
e14c061238
1 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue