From 7dd292cbb3a3f3e72dd127b46b6cbbe9f3889a7e Mon Sep 17 00:00:00 2001 From: mudler Date: Tue, 4 Jul 2023 18:56:45 +0200 Subject: [PATCH] feat: add a way to test grammar from forks --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a5a3c14..2df7040 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,10 @@ GOTEST=$(GOCMD) test GOVET=$(GOCMD) vet BINARY_NAME=local-ai -GOLLAMA_VERSION?=d1575806b8482a032b253594b371c428eaa7e9c3 +GOLLAMA_VERSION?=cb8d7cd4cb95725a04504a9e3a26dd72a12b69ac +# Temporary set a specific version of llama.cpp +LLAMA_CPP_REPO?=https://github.com/mudler/llama.cpp +LLAMA_CPP_VERSION?=48ce8722a05a018681634af801fd0fd45b3a87cc GPT4ALL_REPO?=https://github.com/nomic-ai/gpt4all GPT4ALL_VERSION?=70cbff70cc2a9ad26d492d44ab582d32e6219956 GOGGMLTRANSFORMERS_VERSION?=8e31841dcddca16468c11b2e7809f279fa76a832 @@ -201,6 +204,9 @@ whisper.cpp/libwhisper.a: whisper.cpp go-llama: git clone --recurse-submodules https://github.com/go-skynet/go-llama.cpp go-llama cd go-llama && git checkout -b build $(GOLLAMA_VERSION) && git submodule update --init --recursive --depth 1 +ifneq ($(LLAMA_CPP_REPO),) + cd go-llama && rm -rf llama.cpp && git clone $(LLAMA_CPP_REPO) llama.cpp && cd llama.cpp && git checkout -b build $(LLAMA_CPP_VERSION) && git submodule update --init --recursive --depth 1 +endif go-llama/libbinding.a: go-llama $(MAKE) -C go-llama BUILD_TYPE=$(BUILD_TYPE) libbinding.a