Skip to content

Commit

Permalink
no default cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Jan 22, 2024
1 parent 6d0b582 commit 340c36f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cpp-rllm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ name = "cpp-rllm"
path = "src/cpp-rllm.rs"

[features]
default = ["cuda"]
default = []
cuda = ["llama_cpp_low/cuda"]
24 changes: 17 additions & 7 deletions cpp-rllm/cpp-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,27 @@ if [ "X$P" != "X" ] ; then
kill $P
fi

if [ "$1" = bench ] ; then
VER="--no-default-features"

if [ "$1" = gpu ] ; then
REL=--release
VER="$VER --features cuda"
shift
fi

if [ "$1" = cpu ] ; then
REL="--release --no-default-features"
elif [ "$1" = cpu ] ; then
REL=--release
shift
elif [ "$1" = debug ] ; then
REL=
shift
else
echo "usage: $0 [gpu|cpu|debug] [phi2|orca|build]"
exit 1
fi

case "$1" in
phi2 )
ARGS="-m https://huggingface.co/TheBloke/phi-2-GGUF/blob/main/phi-2.Q8_0.gguf -t phi"
;;
orca )
ARGS="-m https://huggingface.co/TheBloke/Orca-2-13B-GGUF/blob/main/orca-2-13b.Q8_0.gguf -t orca"
;;
Expand All @@ -34,7 +44,7 @@ case "$1" in
REL=--release
;;
* )
echo "try one of models: phi, phi2, 7b, code, code34"
echo "try one of models: phi2, orca"
exit 1
;;
esac
Expand All @@ -44,7 +54,7 @@ ARGS="--verbose --port 8080 --aicirt $BIN/release/aicirt $ARGS $ADD_ARGS"

(cd ../aicirt; cargo build --release)

cargo build $REL
cargo build $REL $VER

if [ "$BUILD" = "1" ] ; then
exit
Expand Down

0 comments on commit 340c36f

Please sign in to comment.