From 1a349873106e6e162733c1c6a12da02ec2402a7f Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Tue, 6 Feb 2024 13:54:45 -0800 Subject: [PATCH] better help messages in server.sh --- rllm-cuda/server.sh | 71 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/rllm-cuda/server.sh b/rllm-cuda/server.sh index 69676551..b40b912c 100755 --- a/rllm-cuda/server.sh +++ b/rllm-cuda/server.sh @@ -18,16 +18,6 @@ else (cd $WS && git submodule update --init --recursive) fi -if [ "X$CUDA_VISIBLE_DEVICES" = "X" ] ; then - P=`ps -ax|grep 'aicir[t]\|rllm-serve[r]|rll[m]-cpp' | awk '{print $1}' | xargs echo` - if [ "X$P" != "X" ] ; then - echo "KILL $P" - kill $P - fi -else - echo "CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES" -fi - if [ "$CPP" = 1 ] ; then VER="--no-default-features" else @@ -50,7 +40,13 @@ if [ "$1" = "--loop" ] ; then fi if [ "$1" = "--cuda" ] ; then - VER="$VER --features cuda" + if [ "$CPP" = 1 ] ; then + VER="$VER --features cuda" + ADD_ARGS="--gpu-layers 1000" + else + echo "--cuda only valid for llama.cpp" + exit 1 + fi shift fi @@ -84,8 +80,25 @@ if [ "$CPP" = 1 ] ; then BUILD=1 ;; * ) - echo "usage: $0 [--loop] [--cuda] [--debug] [phi2|orca|build] [rllm_args...]" - echo "Try $0 phi2 --help to see available rllm_args" + SELF="cpp-server.sh" + cat <