From cc74fc93b4fddf17954a64bc718bfbffc9e9af4f Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Fri, 8 Sep 2023 18:38:22 +0200 Subject: [PATCH] feat(llama.cpp): update (#1024) **Description** This PR fixes # **Notes for Reviewers** **[Signed commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)** - [ ] Yes, I signed my commits. --------- Signed-off-by: Ettore Di Giacinto --- .env | 18 ++++++++++++++++++ Makefile | 8 ++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 4395e6c8ab1..ec53a8f43cf 100644 --- a/.env +++ b/.env @@ -23,6 +23,12 @@ MODELS_PATH=/models ## Enable debug mode # DEBUG=true +## Disables COMPEL (Diffusers) +# COMPEL=0 + +## Enable/Disable single backend (useful if only one GPU is available) +# SINGLE_ACTIVE_BACKEND=true + ## Specify a build type. Available: cublas, openblas, clblas. ## cuBLAS: This is a GPU-accelerated version of the complete standard BLAS (Basic Linear Algebra Subprograms) library. It's provided by Nvidia and is part of their CUDA toolkit. ## OpenBLAS: This is an open-source implementation of the BLAS library that aims to provide highly optimized code for various platforms. It includes support for multi-threading and can be compiled to use hardware-specific features for additional performance. OpenBLAS can run on many kinds of hardware, including CPUs from Intel, AMD, and ARM. @@ -44,3 +50,15 @@ MODELS_PATH=/models ## Specify a default upload limit in MB (whisper) # UPLOAD_LIMIT + +## List of external GRPC backends (note on the container image this variable is already set to use extra backends available in extra/) +# EXTERNAL_GRPC_BACKENDS=my-backend:127.0.0.1:9000,my-backend2:/usr/bin/backend.py + +### Advanced settings ### +### Those are not really used by LocalAI, but from components in the stack ### +## +### Preload libraries +# LD_PRELOAD= + +### Huggingface cache for models +# HUGGINGFACE_HUB_CACHE=/usr/local/huggingface \ No newline at end of file diff --git a/Makefile b/Makefile index 2b941166066..910855928b5 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ GOVET=$(GOCMD) vet BINARY_NAME=local-ai # llama.cpp versions -GOLLAMA_VERSION?=371ecd13c7fe00d281cb19c6588574134d7091b1 +GOLLAMA_VERSION?=05dc4b6210cde186ce47369fa0a8296390950851 GOLLAMA_STABLE_VERSION?=50cee7712066d9e38306eccadcfbb44ea87df4b7 @@ -38,6 +38,7 @@ STABLEDIFFUSION_VERSION?=d89260f598afb809279bc72aa0107b4292587632 GOGGLLM_VERSION?=862477d16eefb0805261c19c9b0d053e3b2b684b export BUILD_TYPE?= +export CMAKE_ARGS?= CGO_LDFLAGS?= CUDA_LIBPATH?=/usr/local/cuda/lib64/ GO_TAGS?= @@ -64,9 +65,12 @@ ifndef UNAME_S UNAME_S := $(shell uname -s) endif -# workaround for rwkv.cpp ifeq ($(UNAME_S),Darwin) CGO_LDFLAGS += -lcblas -framework Accelerate +ifneq ($(BUILD_TYPE),metal) + # explicit disable metal if on Darwin and metal is disabled + CMAKE_ARGS+=-DLLAMA_METAL=OFF +endif endif ifeq ($(BUILD_TYPE),openblas)