@@ -155,6 +155,7 @@ endif
155
155
ALL_GRPC_BACKENDS =backend-assets/grpc/langchain-huggingface
156
156
ALL_GRPC_BACKENDS+ =backend-assets/grpc/bert-embeddings
157
157
ALL_GRPC_BACKENDS+ =backend-assets/grpc/llama-cpp
158
+ ALL_GRPC_BACKENDS+ =backend-assets/grpc/llama-cpp-noavx
158
159
ALL_GRPC_BACKENDS+ =backend-assets/grpc/llama-ggml
159
160
ALL_GRPC_BACKENDS+ =backend-assets/grpc/gpt4all
160
161
ALL_GRPC_BACKENDS+ =backend-assets/grpc/rwkv
@@ -311,7 +312,7 @@ build: prepare backend-assets grpcs ## Build the project
311
312
CGO_LDFLAGS=" $( CGO_LDFLAGS) " $(GOCMD ) build -ldflags " $( LD_FLAGS) " -tags " $( GO_TAGS) " -o $(BINARY_NAME ) ./
312
313
313
314
build-minimal :
314
- BUILD_GRPC_FOR_BACKEND_LLAMA=true GRPC_BACKENDS=backend-assets/grpc/llama-cpp GO_TAGS=none $(MAKE ) build
315
+ BUILD_GRPC_FOR_BACKEND_LLAMA=true GRPC_BACKENDS=" backend-assets/grpc/llama-cpp backend-assets/grpc/llama-cpp-noavx " GO_TAGS=none $(MAKE ) build
315
316
316
317
build-api :
317
318
BUILD_GRPC_FOR_BACKEND_LLAMA=true BUILD_API_ONLY=true GO_TAGS=none $(MAKE ) build
@@ -644,13 +645,22 @@ else
644
645
LLAMA_VERSION=$(CPPLLAMA_VERSION) $(MAKE) -C backend/cpp/llama grpc-server
645
646
endif
646
647
647
- backend-assets/grpc/llama-cpp : backend-assets/grpc backend/cpp/llama/grpc-server
648
+ backend-assets/grpc/llama-cpp : backend-assets/grpc
649
+ $(info ${GREEN}I llama-cpp build info:standard${RESET})
650
+ $(MAKE ) -C backend/cpp/llama purge
651
+ $(MAKE ) backend/cpp/llama/grpc-server
648
652
cp -rfv backend/cpp/llama/grpc-server backend-assets/grpc/llama-cpp
649
653
# TODO: every binary should have its own folder instead, so can have different metal implementations
650
654
ifeq ($(BUILD_TYPE ) ,metal)
651
655
cp backend/cpp/llama/llama.cpp/build/bin/default.metallib backend-assets/grpc/
652
656
endif
653
657
658
+ backend-assets/grpc/llama-cpp-noavx : backend-assets/grpc
659
+ $(info ${GREEN}I llama-cpp build info:noavx${RESET})
660
+ $(MAKE ) -C backend/cpp/llama purge
661
+ CMAKE_ARGS=" -DLLAMA_AVX2=OFF" $(MAKE ) backend/cpp/llama/grpc-server
662
+ cp -rfv backend/cpp/llama/grpc-server backend-assets/grpc/llama-cpp-noavx
663
+
654
664
backend-assets/grpc/llama-ggml : sources/go-llama.cpp sources/go-llama.cpp/libbinding.a backend-assets/grpc
655
665
CGO_LDFLAGS=" $( CGO_LDFLAGS) " C_INCLUDE_PATH=$(CURDIR ) /sources/go-llama.cpp LIBRARY_PATH=$(CURDIR ) /sources/go-llama.cpp \
656
666
$(GOCMD ) build -ldflags " $( LD_FLAGS) " -tags " $( GO_TAGS) " -o backend-assets/grpc/llama-ggml ./backend/go/llm/llama-ggml/
0 commit comments