Skip to content

Commit fb6a5bc

Browse files
authored
update(llama.cpp): update server, correctly propagate LLAMA_VERSION (#1440)
* fix(Makefile): correctly propagate LLAMA_VERSION Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com> * update grpc-server.cpp --------- Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
1 parent 7641f92 commit fb6a5bc

File tree

3 files changed

+463
-72
lines changed

3 files changed

+463
-72
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ STABLEDIFFUSION_VERSION?=902db5f066fd137697e3b69d0fa10d4782bd2c2f
3636
export BUILD_TYPE?=
3737
export STABLE_BUILD_TYPE?=$(BUILD_TYPE)
3838
export CMAKE_ARGS?=
39+
3940
CGO_LDFLAGS?=
4041
CUDA_LIBPATH?=/usr/local/cuda/lib64/
4142
GO_TAGS?=
@@ -229,7 +230,7 @@ sources/go-piper/libpiper_binding.a: sources/go-piper
229230
$(MAKE) -C sources/go-piper libpiper_binding.a example/main
230231

231232
backend/cpp/llama/llama.cpp:
232-
$(MAKE) -C backend/cpp/llama llama.cpp
233+
LLAMA_VERSION=$(CPPLLAMA_VERSION) $(MAKE) -C backend/cpp/llama llama.cpp
233234

234235
get-sources: backend/cpp/llama/llama.cpp sources/go-llama sources/go-llama-ggml sources/go-ggml-transformers sources/gpt4all sources/go-piper sources/go-rwkv sources/whisper.cpp sources/go-bert sources/go-stable-diffusion
235236
touch $@

backend/cpp/llama/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
LLAMA_VERSION?=d9b33fe95bd257b36c84ee5769cc048230067d6f
2+
LLAMA_VERSION?=
33

44
CMAKE_ARGS?=
55
BUILD_TYPE?=
@@ -21,6 +21,9 @@ endif
2121

2222
llama.cpp:
2323
git clone --recurse-submodules https://github.com/ggerganov/llama.cpp llama.cpp
24+
if [ -z "$(LLAMA_VERSION)" ]; then \
25+
exit 1; \
26+
fi
2427
cd llama.cpp && git checkout -b build $(LLAMA_VERSION) && git submodule update --init --recursive --depth 1
2528

2629
llama.cpp/examples/grpc-server:

0 commit comments

Comments
 (0)