Skip to content

Commit 1c6414e

Browse files
committed
run.remoting: update to run llama-server
1 parent 2fe1114 commit 1c6414e

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

build.remoting.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# force isatty-->true, so that $0 |& head -50 has colors ...
2+
rm -f READY FAILED
3+
4+
echo "int isatty(int fd) { return 1; }" | gcc -O2 -fpic -shared -ldl -o /tmp/isatty.so -xc -
5+
export LD_PRELOAD=/tmp/isatty.so
6+
7+
TARGETS="ggml-remotingfrontend"
8+
9+
TARGETS="$BUILD_TARGET llama-run"
10+
set -x
11+
if [[ "${BENCH_MODE:-}" == "bench" ]]; then
12+
TARGETS="$TARGETS llama-bench"
13+
elif [[ "${BENCH_MODE:-}" == "server" ]]; then
14+
TARGETS="$TARGETS llama-server"
15+
elif [[ "${BENCH_MODE:-}" == "perf" ]]; then
16+
TARGETS="$TARGETS test-backend-ops"
17+
fi
18+
19+
cmake --build ../build.remoting-frontend$FLAVOR --parallel 8 --target $TARGETS "$@"
20+
21+
if [[ $? == 0 ]]; then
22+
touch READY
23+
else
24+
touch FAILED
25+
fi

run.remoting.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ set -x
1818
if [[ "${BENCH_MODE:-}" == "bench" ]]; then
1919
cat <<EOF
2020
###
21+
### Running llama-server
22+
###
23+
24+
EOF
25+
$prefix \
26+
$LLAMA_BUILD_DIR/bin/llama-server \
27+
--host 0.0.0.0 \
28+
--port 8080 \
29+
--model "$MODEL_HOME/$MODEL" \
30+
--n-gpu-layers 99 \
31+
--threads 1
32+
elif [[ "${BENCH_MODE:-}" == "bench" ]]; then
33+
cat <<EOF
34+
###
2135
### Running llama-bench
2236
###
2337

0 commit comments

Comments
 (0)