diff --git a/Makefile b/Makefile index 14b998a11..d878735c6 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,11 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686)) FULLCFLAGS += -mavx2 -msse3 -mfma -mf16c -mavx else # if not on windows, they are clearly building it themselves, so lets just use whatever is supported + ifdef LLAMA_COLAB + CFLAGS += -mavx2 -msse3 -mfma -mf16c -mavx + else CFLAGS += -march=native -mtune=native + endif endif endif ifneq ($(filter ppc64%,$(UNAME_M)),) diff --git a/colab.ipynb b/colab.ipynb index 653227ce9..e00eaaba2 100644 --- a/colab.ipynb +++ b/colab.ipynb @@ -64,7 +64,7 @@ "!echo Finding prebuilt binary for {kvers}\r\n", "!wget -O dlfile.tmp https://kcppcolab.concedo.workers.dev/?{kvers} && mv dlfile.tmp koboldcpp_cublas.so\r\n", "!test -f koboldcpp_cublas.so && echo Prebuilt Binary Exists || echo Prebuilt Binary Does Not Exist\r\n", - "!test -f koboldcpp_cublas.so && echo Build Skipped || make koboldcpp_cublas LLAMA_CUBLAS=1\r\n", + "!test -f koboldcpp_cublas.so && echo Build Skipped || make koboldcpp_cublas LLAMA_CUBLAS=1 LLAMA_COLAB=1\r\n", "!cp koboldcpp_cublas.so koboldcpp_cublas.dat\r\n", "!apt install aria2 -y\r\n", "!aria2c -x 10 -o model.ggml --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $Model\r\n",