@ -137,7 +137,7 @@ gpt4all/gpt4all-bindings/golang/libgpt4all.a: gpt4all
$( MAKE) -C gpt4all/gpt4all-bindings/golang/ libgpt4all.a
$( MAKE) -C gpt4all/gpt4all-bindings/golang/ libgpt4all.a
## CEREBRAS GPT
## CEREBRAS GPT
go-ggml-transformers :
go-ggml-transformers :
git clone --recurse-submodules https://github.com/go-skynet/go-ggml-transformers.cpp go-ggml-transformers
git clone --recurse-submodules https://github.com/go-skynet/go-ggml-transformers.cpp go-ggml-transformers
cd go-ggml-transformers && git checkout -b build $( GOGPT2_VERSION) && git submodule update --init --recursive --depth 1
cd go-ggml-transformers && git checkout -b build $( GOGPT2_VERSION) && git submodule update --init --recursive --depth 1
# This is hackish, but needed as both go-llama and go-gpt4allj have their own version of ggml..
# This is hackish, but needed as both go-llama and go-gpt4allj have their own version of ggml..
@ -169,9 +169,12 @@ go-llama:
git clone --recurse-submodules https://github.com/go-skynet/go-llama.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
cd go-llama && git checkout -b build $( GOLLAMA_VERSION) && git submodule update --init --recursive --depth 1
go-llama/libbinding.a : go -llama
go-llama/libbinding.a : go -llama
$( MAKE) -C go-llama BUILD_TYPE = $( BUILD_TYPE) libbinding.a
$( MAKE) -C go-llama BUILD_TYPE = $( BUILD_TYPE) libbinding.a
get-sources : go -llama go -ggml -transformers gpt 4all go -rwkv whisper .cpp go -bert bloomz go -stable -diffusion
touch $@
replace :
replace :
$( GOCMD) mod edit -replace github.com/go-skynet/go-llama.cpp= $( shell pwd ) /go-llama
$( GOCMD) mod edit -replace github.com/go-skynet/go-llama.cpp= $( shell pwd ) /go-llama
$( GOCMD) mod edit -replace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang= $( shell pwd ) /gpt4all/gpt4all-bindings/golang
$( GOCMD) mod edit -replace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang= $( shell pwd ) /gpt4all/gpt4all-bindings/golang
@ -182,7 +185,7 @@ replace:
$( GOCMD) mod edit -replace github.com/go-skynet/bloomz.cpp= $( shell pwd ) /bloomz
$( GOCMD) mod edit -replace github.com/go-skynet/bloomz.cpp= $( shell pwd ) /bloomz
$( GOCMD) mod edit -replace github.com/mudler/go-stable-diffusion= $( shell pwd ) /go-stable-diffusion
$( GOCMD) mod edit -replace github.com/mudler/go-stable-diffusion= $( shell pwd ) /go-stable-diffusion
prepare-sources : go -llama go -ggml -transformers gpt 4all go -rwkv whisper .cpp go -bert bloomz go -stable -diffusion replace
prepare-sources : get -sources replace
$( GOCMD) mod download
$( GOCMD) mod download
## GENERIC
## GENERIC
@ -198,6 +201,7 @@ rebuild: ## Rebuilds the project
$( MAKE) build
$( MAKE) build
prepare : prepare -sources backend -assets /gpt 4all $( OPTIONAL_TARGETS ) go -llama /libbinding .a go -bert /libgobert .a go -ggml -transformers /libtransformers .a go -rwkv /librwkv .a whisper .cpp /libwhisper .a bloomz /libbloomz .a ## Prepares for building
prepare : prepare -sources backend -assets /gpt 4all $( OPTIONAL_TARGETS ) go -llama /libbinding .a go -bert /libgobert .a go -ggml -transformers /libtransformers .a go -rwkv /librwkv .a whisper .cpp /libwhisper .a bloomz /libbloomz .a ## Prepares for building
touch $@
clean : ## Remove build related file
clean : ## Remove build related file
rm -fr ./go-llama
rm -fr ./go-llama