Repository: mudler/LocalAI

Issue #411: Make build failing on Apple silicon - macbook m2 pro 
Created: 2023-05-29T12:27:14Z
LocalAI version:

728f297
Environment, CPU architecture, OS, and Version:

arm64(mac m2 pro) Ventura 13.3.1
Describe the bug

make build failing for mac m2 pro,
Error 
LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:471:19: error: variable has incomplete type 'struct stat64'

To Reproduce

git clone the repo
make build on mac m2 pro
Expected behavior

build should not fail
Logs

make build

go mod edit -replace github.com/go-skynet/go-llama.cpp=/Users/ankur/dev/generative-ai/LocalAI/go-llama
go mod edit -replace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang=/Users/ankur/dev/generative-ai/LocalAI/gpt4all/gpt4all-bindings/golang
go mod edit -replace github.com/go-skynet/go-ggml-transformers.cpp=/Users/ankur/dev/generative-ai/LocalAI/go-ggml-transformers
go mod edit -replace github.com/donomii/go-rwkv.cpp=/Users/ankur/dev/generative-ai/LocalAI/go-rwkv
go mod edit -replace github.com/ggerganov/whisper.cpp=/Users/ankur/dev/generative-ai/LocalAI/whisper.cpp
go mod edit -replace github.com/go-skynet/go-bert.cpp=/Users/ankur/dev/generative-ai/LocalAI/go-bert
go mod edit -replace github.com/go-skynet/bloomz.cpp=/Users/ankur/dev/generative-ai/LocalAI/bloomz
go mod edit -replace github.com/mudler/go-stable-diffusion=/Users/ankur/dev/generative-ai/LocalAI/go-stable-diffusion
go mod download
cd go-rwkv && cd rwkv.cpp &&	cmake . -DRWKV_BUILD_SHARED_LIBRARY=OFF &&	cmake --build . && 	cp librwkv.a .. && cp ggml/src/libggml.a ..
-- Accelerate framework found
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Accelerate framework found
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/ankur/dev/generative-ai/LocalAI/go-rwkv/rwkv.cpp
[ 25%] Built target ggml
[ 37%] Building CXX object CMakeFiles/rwkv.dir/rwkv.cpp.o
/Users/ankur/dev/generative-ai/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:209:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
    sprintf(full_key, "blocks.%d.%s", block_index, key.c_str());
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
/Users/ankur/dev/generative-ai/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:471:19: error: variable has incomplete type 'struct stat64'
    struct stat64 file_stat;
                  ^
/Users/ankur/dev/generative-ai/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:471:12: note: forward declaration of 'stat64'
    struct stat64 file_stat;
           ^
/Users/ankur/dev/generative-ai/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:638:30: warning: cast from 'const rwkv_context *' to 'rwkv_context *' drops const qualifier [-Wcast-qual]
    ((struct rwkv_context *) ctx)->last_error = RWKV_ERROR_NONE;
                             ^
/Users/ankur/dev/generative-ai/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:640:31: warning: cast from 'const rwkv_context *' to 'rwkv_context *' drops const qualifier [-Wcast-qual]
    RWKV_CTX_ASSERT_FALSE_MSG(ctx, RWKV_ERROR_ARGS, state_out != NULL, "state_out is NULL");
                              ^
/Users/ankur/dev/generative-ai/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:641:31: warning: cast from 'const rwkv_context *' to 'rwkv_context *' drops const qualifier [-Wcast-qual]
    RWKV_CTX_ASSERT_FALSE_MSG(ctx, RWKV_ERROR_ARGS, logits_out != NULL, "logits_out is NULL");
                              ^
/Users/ankur/dev/generative-ai/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:642:31: warning: cast from 'const rwkv_context *' to 'rwkv_context *' drops const qualifier [-Wcast-qual]
    RWKV_CTX_ASSERT_FALSE_MSG(ctx, RWKV_ERROR_ARGS, token < ctx->model->n_vocab, "Token is out of range 0..%d", ctx->model->n_vocab - 1);
                              ^
5 warnings and 1 error generated.
make[3]: *** [CMakeFiles/rwkv.dir/rwkv.cpp.o] Error 1
make[2]: *** [CMakeFiles/rwkv.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [go-rwkv/librwkv.a] Error 2

Additional context

Duplicate issue #431: Installation trouble on M1 Pro Macbook Pro with Apple Sillicon
Created: 2023-05-30T10:02:11Z
LocalAI version:
v1.17.0

Environment, CPU architecture, OS, and Version:
Both docker and standalone, M1 Pro Macbook Pro, MacOS Ventura 13.4

Describe the bug
It seems it is not installing correct, since it cannot execute:
Run LocalAI
./local-ai --models-path ./models/ --debuginstalling
-- it will show me:
james@mac LocalAI % ./local-ai --models-path ./models/ --debug
zsh: no such file or directory: ./local-ai

I also get: (7) Failed to connect to localhost port 8080: Connection refused
<!-- A clear and concise description of what the bug is. -->

**To Reproduce**
If mac/M1 related, try to install from scratch. terminal will give multiple errors and warnings and will not let you use the program.
<!-- Steps to reproduce the behavior, including the LocalAI command used, if any -->

**Expected behavior**
I expected LocalAI to install correctly on my M1 Pro macbook in line with the install documentation
<!-- A clear and concise description of what you expected to happen. -->

**Logs**
<!-- If applicable, add logs while running LocalAI in debug mode (`--debug` or `DEBUG=true`) to help explain your problem.  -->
james@mac aitest % # install build dependencies
brew install cmake
brew install go
zsh: command not found: #
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################### 100.0%
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: cmake 3.26.4 is already installed and up-to-date.
To reinstall 3.26.4, run:
  brew reinstall cmake
Warning: go 1.20.4 is already installed and up-to-date.
To reinstall 1.20.4, run:
  brew reinstall go
james@mac aitest % git clone https://github.com/go-skynet/LocalAI.git
fatal: destination path 'LocalAI' already exists and is not an empty directory.
james@mac aitest % git clone https://github.com/go-skynet/LocalAI.git
Cloning into 'LocalAI'...
remote: Enumerating objects: 2018, done.
remote: Counting objects: 100% (583/583), done.
remote: Compressing objects: 100% (117/117), done.
remote: Total 2018 (delta 497), reused 506 (delta 465), pack-reused 1435
Receiving objects: 100% (2018/2018), 607.67 KiB | 4.82 MiB/s, done.
Resolving deltas: 100% (1212/1212), done.
james@mac aitest % 
cd LocalAI
james@mac LocalAI % make build
git clone --recurse-submodules https://github.com/go-skynet/go-llama.cpp go-llama
Cloning into 'go-llama'...
remote: Enumerating objects: 321, done.
remote: Counting objects: 100% (122/122), done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 321 (delta 67), reused 52 (delta 38), pack-reused 199
Receiving objects: 100% (321/321), 96.85 KiB | 1.67 MiB/s, done.
Resolving deltas: 100% (163/163), done.
Submodule 'llama.cpp' (https://github.com/ggerganov/llama.cpp) registered for path 'llama.cpp'
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-llama/llama.cpp'...
remote: Enumerating objects: 3295, done.        
remote: Counting objects: 100% (934/934), done.        
remote: Compressing objects: 100% (161/161), done.        
remote: Total 3295 (delta 837), reused 830 (delta 773), pack-reused 2361        
Receiving objects: 100% (3295/3295), 2.91 MiB | 3.64 MiB/s, done.
Resolving deltas: 100% (2186/2186), done.
Submodule path 'llama.cpp': checked out '7552ac586380f202b75b18aa216ecfefbd438d94'
cd go-llama && git checkout -b build 4bd3910005a593a6db237bc82c506d6d9fb81b18 && git submodule update --init --recursive --depth 1
M	llama.cpp
Switched to a new branch 'build'
Submodule path 'llama.cpp': checked out '66874d4fbcc7866377246efbcee938e8cc9c7d76'
git clone --recurse-submodules https://github.com/go-skynet/go-ggml-transformers.cpp go-ggml-transformers
Cloning into 'go-ggml-transformers'...
remote: Enumerating objects: 169, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 169 (delta 17), reused 13 (delta 13), pack-reused 147
Receiving objects: 100% (169/169), 83.10 KiB | 2.37 MiB/s, done.
Resolving deltas: 100% (98/98), done.
Submodule 'ggml.cpp' (https://github.com/ggerganov/ggml) registered for path 'ggml.cpp'
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/ggml.cpp'...
remote: Enumerating objects: 1856, done.        
remote: Counting objects: 100% (948/948), done.        
remote: Compressing objects: 100% (212/212), done.        
remote: Total 1856 (delta 786), reused 832 (delta 716), pack-reused 908        
Receiving objects: 100% (1856/1856), 4.06 MiB | 3.50 MiB/s, done.
Resolving deltas: 100% (1244/1244), done.
Submodule path 'ggml.cpp': checked out '3eb0ac266649686e3086b2a8317576d152119964'
cd go-ggml-transformers && git checkout -b build  && git submodule update --init --recursive --depth 1
Switched to a new branch 'build'
# This is hackish, but needed as both go-llama and go-gpt4allj have their own version of ggml..
git clone --recurse-submodules https://github.com/nomic-ai/gpt4all gpt4all
Cloning into 'gpt4all'...
remote: Enumerating objects: 4727, done.
remote: Counting objects: 100% (4727/4727), done.
remote: Compressing objects: 100% (1659/1659), done.
remote: Total 4727 (delta 3055), reused 4578 (delta 3015), pack-reused 0
Receiving objects: 100% (4727/4727), 9.55 MiB | 2.53 MiB/s, done.
Resolving deltas: 100% (3055/3055), done.
Submodule 'llama.cpp' (https://github.com/manyoso/llama.cpp.git) registered for path 'gpt4all-backend/llama.cpp'
Cloning into '/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp'...
remote: Enumerating objects: 1977, done.        
remote: Counting objects: 100% (388/388), done.        
remote: Compressing objects: 100% (22/22), done.        
remote: Total 1977 (delta 368), reused 366 (delta 366), pack-reused 1589        
Receiving objects: 100% (1977/1977), 1.92 MiB | 3.82 MiB/s, done.
Resolving deltas: 100% (1278/1278), done.
Submodule path 'gpt4all-backend/llama.cpp': checked out '03ceb39c1e729bed4ad1dfa16638a72f1843bf0c'
cd gpt4all && git checkout -b build 73db20ba85fbbdc66a56e2619394c0eea40dc72b && git submodule update --init --recursive --depth 1
Switched to a new branch 'build'
# This is hackish, but needed as both go-llama and go-gpt4allj have their own version of ggml..
mv ./gpt4all/gpt4all-backend/llama.cpp/llama_util.h ./gpt4all/gpt4all-backend/llama.cpp/gptjllama_util.h
git clone --recurse-submodules https://github.com/mudler/go-rwkv.cpp go-rwkv
Cloning into 'go-rwkv'...
remote: Enumerating objects: 134, done.
remote: Counting objects: 100% (134/134), done.
remote: Compressing objects: 100% (80/80), done.
Receiving objects: 100% (134/134), 3.99 MiB | 5.32 MiB/s, done.
remote: Total 134 (delta 63), reused 116 (delta 49), pack-reused 0
Resolving deltas: 100% (63/63), done.
Submodule 'rwkv.cpp' (https://github.com/saharNooby/rwkv.cpp) registered for path 'rwkv.cpp'
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp'...
remote: Enumerating objects: 1679, done.        
remote: Counting objects: 100% (302/302), done.        
remote: Compressing objects: 100% (121/121), done.        
remote: Total 1679 (delta 220), reused 215 (delta 173), pack-reused 1377        
Receiving objects: 100% (1679/1679), 5.21 MiB | 1.25 MiB/s, done.
Resolving deltas: 100% (1020/1020), done.
Submodule path 'rwkv.cpp': checked out 'dea929f8cad90b7cf2f820c5a3d6653cfdd58c4e'
Submodule 'ggml' (https://github.com/ggerganov/ggml) registered for path 'rwkv.cpp/ggml'
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp/ggml'...
remote: Enumerating objects: 1856, done.        
remote: Counting objects: 100% (928/928), done.        
remote: Compressing objects: 100% (222/222), done.        
remote: Total 1856 (delta 768), reused 800 (delta 686), pack-reused 928        
Receiving objects: 100% (1856/1856), 4.05 MiB | 3.11 MiB/s, done.
Resolving deltas: 100% (1244/1244), done.
Submodule path 'rwkv.cpp/ggml': checked out '00b49ec707d73df0176e21630a6e23c2aa0e938c'
cd go-rwkv && git checkout -b build dcbd34aff983b3d04fa300c5da5ec4bfdf6db295 && git submodule update --init --recursive --depth 1
Switched to a new branch 'build'
git clone https://github.com/ggerganov/whisper.cpp.git
Cloning into 'whisper.cpp'...
remote: Enumerating objects: 3755, done.
remote: Counting objects: 100% (1641/1641), done.
remote: Compressing objects: 100% (461/461), done.
remote: Total 3755 (delta 1346), reused 1266 (delta 1156), pack-reused 2114
Receiving objects: 100% (3755/3755), 6.64 MiB | 2.99 MiB/s, done.
Resolving deltas: 100% (2355/2355), done.
cd whisper.cpp && git checkout -b build 9b926844e3ae0ca6a0d13573b2e0349be1a4b573 && git submodule update --init --recursive --depth 1
Switched to a new branch 'build'
Submodule 'bindings/ios' (https://github.com/ggerganov/whisper.spm) registered for path 'bindings/ios'
Cloning into '/Users/james/Downloads/aitest/LocalAI/whisper.cpp/bindings/ios'...
Submodule path 'bindings/ios': checked out 'de46d9e7817fe851c109d66080239d415812d32a'
git clone --recurse-submodules https://github.com/go-skynet/go-bert.cpp go-bert
Cloning into 'go-bert'...
remote: Enumerating objects: 83, done.
remote: Counting objects: 100% (83/83), done.
remote: Compressing objects: 100% (59/59), done.
Receiving objects: 100% (83/83), 20.78 KiB | 1.89 MiB/s, done.
remote: Total 83 (delta 32), reused 53 (delta 15), pack-reused 0
Resolving deltas: 100% (32/32), done.
Submodule 'bert.cpp' (https://github.com/skeskinen/bert.cpp) registered for path 'bert.cpp'
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp'...
remote: Enumerating objects: 219, done.        
remote: Counting objects: 100% (219/219), done.        
remote: Compressing objects: 100% (116/116), done.        
remote: Total 219 (delta 126), reused 192 (delta 101), pack-reused 0        
Receiving objects: 100% (219/219), 154.78 KiB | 2.58 MiB/s, done.
Resolving deltas: 100% (126/126), done.
Submodule path 'bert.cpp': checked out 'cd2170ded1f4d245080874836e75b09972737089'
Submodule 'ggml' (https://github.com/ggerganov/ggml.git) registered for path 'bert.cpp/ggml'
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/ggml'...
remote: Enumerating objects: 1856, done.        
remote: Counting objects: 100% (928/928), done.        
remote: Compressing objects: 100% (222/222), done.        
remote: Total 1856 (delta 768), reused 800 (delta 686), pack-reused 928        
Receiving objects: 100% (1856/1856), 4.05 MiB | 3.75 MiB/s, done.
Resolving deltas: 100% (1244/1244), done.
Submodule path 'bert.cpp/ggml': checked out '94a24c9de987fa7a551310a8ba4286e7715d8950'
cd go-bert && git checkout -b build cea1ed76a7f48ef386a8e369f6c82c48cdf2d551 && git submodule update --init --recursive --depth 1
Switched to a new branch 'build'
git clone --recurse-submodules https://github.com/go-skynet/bloomz.cpp bloomz
Cloning into 'bloomz'...
remote: Enumerating objects: 292, done.
remote: Counting objects: 100% (88/88), done.
remote: Compressing objects: 100% (57/57), done.
remote: Total 292 (delta 37), reused 66 (delta 29), pack-reused 204
Receiving objects: 100% (292/292), 2.18 MiB | 3.40 MiB/s, done.
Resolving deltas: 100% (139/139), done.
git clone --recurse-submodules https://github.com/mudler/go-stable-diffusion go-stable-diffusion
Cloning into 'go-stable-diffusion'...
remote: Enumerating objects: 60, done.
remote: Counting objects: 100% (60/60), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 60 (delta 31), reused 51 (delta 22), pack-reused 0
Receiving objects: 100% (60/60), 5.44 MiB | 2.96 MiB/s, done.
Resolving deltas: 100% (31/31), done.
Submodule 'ncnn' (https://github.com/Tencent/ncnn) registered for path 'ncnn'
Submodule 'stable-diffusion' (https://github.com/EdVince/Stable-Diffusion-NCNN) registered for path 'stable-diffusion'
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-stable-diffusion/ncnn'...
remote: Enumerating objects: 31308, done.        
remote: Counting objects: 100% (2999/2999), done.        
remote: Compressing objects: 100% (368/368), done.        
remote: Total 31308 (delta 2788), reused 2723 (delta 2631), pack-reused 28309        
Receiving objects: 100% (31308/31308), 22.25 MiB | 3.12 MiB/s, done.
Resolving deltas: 100% (26450/26450), done.
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-stable-diffusion/stable-diffusion'...
remote: Enumerating objects: 1307, done.        
remote: Counting objects: 100% (88/88), done.        
remote: Compressing objects: 100% (62/62), done.        
remote: Total 1307 (delta 37), reused 33 (delta 25), pack-reused 1219        
Receiving objects: 100% (1307/1307), 150.00 MiB | 3.11 MiB/s, done.
Resolving deltas: 100% (614/614), done.
Submodule path 'ncnn': checked out '2b87dc2cf7f07416c3781e71a478fd185d4fdfcb'
Submodule 'glslang' (https://github.com/KhronosGroup/glslang) registered for path 'ncnn/glslang'
Submodule 'python/pybind11' (https://github.com/pybind/pybind11.git) registered for path 'ncnn/python/pybind11'
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-stable-diffusion/ncnn/glslang'...
remote: Enumerating objects: 53640, done.        
remote: Counting objects: 100% (401/401), done.        
remote: Compressing objects: 100% (203/203), done.        
remote: Total 53640 (delta 227), reused 328 (delta 194), pack-reused 53239        
Receiving objects: 100% (53640/53640), 69.70 MiB | 3.25 MiB/s, done.
Resolving deltas: 100% (45029/45029), done.
Cloning into '/Users/james/Downloads/aitest/LocalAI/go-stable-diffusion/ncnn/python/pybind11'...
remote: Enumerating objects: 26490, done.        
remote: Counting objects: 100% (410/410), done.        
remote: Compressing objects: 100% (199/199), done.        
remote: Total 26490 (delta 238), reused 309 (delta 184), pack-reused 26080        
Receiving objects: 100% (26490/26490), 10.40 MiB | 3.35 MiB/s, done.
Resolving deltas: 100% (18560/18560), done.
Submodule path 'ncnn/glslang': checked out '88fd417b0bb7d91755961c70e846d274c182f2b0'
Submodule path 'ncnn/python/pybind11': checked out '80dc998efced8ceb2be59756668a7e90e8bef917'
Submodule path 'stable-diffusion': checked out 'bac5d4a71a442e9e9fab4a1e30ca203a7c7d3272'
cd go-stable-diffusion && git checkout -b build c0748eca3642d58bcf9521108bcee46959c647dc && git submodule update --init --recursive --depth 1
Switched to a new branch 'build'
go mod edit -replace github.com/go-skynet/go-llama.cpp=/Users/james/Downloads/aitest/LocalAI/go-llama
go mod edit -replace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang=/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang
go mod edit -replace github.com/go-skynet/go-ggml-transformers.cpp=/Users/james/Downloads/aitest/LocalAI/go-ggml-transformers
go mod edit -replace github.com/donomii/go-rwkv.cpp=/Users/james/Downloads/aitest/LocalAI/go-rwkv
go mod edit -replace github.com/ggerganov/whisper.cpp=/Users/james/Downloads/aitest/LocalAI/whisper.cpp
go mod edit -replace github.com/go-skynet/go-bert.cpp=/Users/james/Downloads/aitest/LocalAI/go-bert
go mod edit -replace github.com/go-skynet/bloomz.cpp=/Users/james/Downloads/aitest/LocalAI/bloomz
go mod edit -replace github.com/mudler/go-stable-diffusion=/Users/james/Downloads/aitest/LocalAI/go-stable-diffusion
go mod download
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C gpt4all/gpt4all-bindings/golang/ libgpt4all.a
I go-gpt4all build info: 
I UNAME_S:  Darwin
I UNAME_P:  arm
I UNAME_M:  arm64
I CFLAGS:   -I. -I../../gpt4all-backend/llama.cpp -I../../gpt4all-backend -I -O3 -DNDEBUG -std=c11 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wno-unused-function -pthread -DGGML_USE_ACCELERATE
I CXXFLAGS: -I. -I../../gpt4all-backend/llama.cpp -I../../gpt4all-backend -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread
I LDFLAGS:   -framework Accelerate
I CMAKEFLAGS:  
I CC:       Apple clang version 14.0.3 (clang-1403.0.22.14.1)
I CXX:      Apple clang version 14.0.3 (clang-1403.0.22.14.1)

c++ -I. -I../../gpt4all-backend/llama.cpp -I../../gpt4all-backend -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread binding.cpp -o binding.o -c  -framework Accelerate
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
In file included from binding.cpp:2:
./../../gpt4all-backend/llmodel.h:17:39: warning: unused parameter 'dest' [-Wunused-parameter]
    virtual size_t saveState(uint8_t *dest) const { return 0; }
                                      ^
./../../gpt4all-backend/llmodel.h:18:48: warning: unused parameter 'src' [-Wunused-parameter]
    virtual size_t restoreState(const uint8_t *src) { return 0; }
                                               ^
./../../gpt4all-backend/llmodel.h:39:41: warning: unused parameter 'n_threads' [-Wunused-parameter]
    virtual void setThreadCount(int32_t n_threads) {}
                                        ^
In file included from binding.cpp:4:
./../../gpt4all-backend/llmodel_c.cpp:63:14: warning: variable 'model' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    else if (magic == 0x67676d6d) { model = llmodel_mpt_create();   }
             ^~~~~~~~~~~~~~~~~~~
./../../gpt4all-backend/llmodel_c.cpp:66:12: note: uninitialized use occurs here
    return model;
           ^~~~~
./../../gpt4all-backend/llmodel_c.cpp:63:10: note: remove the 'if' if its condition is always true
    else if (magic == 0x67676d6d) { model = llmodel_mpt_create();   }
         ^~~~~~~~~~~~~~~~~~~~~~~~~
./../../gpt4all-backend/llmodel_c.cpp:57:24: note: initialize the variable 'model' to silence this warning
    llmodel_model model;
                       ^
                        = nullptr
In file included from binding.cpp:6:
./../../gpt4all-backend/mpt.cpp:296:19: warning: unused variable 'n_ctx' [-Wunused-variable]
        const int n_ctx   = hparams.n_ctx;
                  ^
./../../gpt4all-backend/mpt.cpp:340:19: warning: unused variable 'n_elements' [-Wunused-variable]
        const int n_elements = n_embd*n_mem;
                  ^
./../../gpt4all-backend/mpt.cpp:460:15: warning: unused variable 'expand' [-Wunused-variable]
    const int expand  = hparams.expand;
              ^
./../../gpt4all-backend/mpt.cpp:462:15: warning: unused variable 'd_key' [-Wunused-variable]
    const int d_key = n_embd/n_head;
              ^
./../../gpt4all-backend/mpt.cpp:698:18: warning: unused variable 'expected' [-Wunused-variable]
    const size_t expected = mpt_get_state_size(model);
                 ^
./../../gpt4all-backend/mpt.cpp:748:18: warning: unused variable 'expected' [-Wunused-variable]
    const size_t expected = mpt_get_state_size(*model);
                 ^
./../../gpt4all-backend/mpt.cpp:754:1: warning: 'MPTPrivate' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
struct MPTPrivate {
^
../../gpt4all-backend/mpt.h:9:1: note: did you mean struct here?
class MPTPrivate;
^~~~~
struct
In file included from binding.cpp:6:
./../../gpt4all-backend/mpt.cpp:836:19: warning: unused variable 't_main_start_us' [-Wunused-variable]
    const int64_t t_main_start_us = ggml_gptj_time_us();
                  ^
./../../gpt4all-backend/mpt.cpp:838:13: warning: variable 't_sample_us' set but not used [-Wunused-but-set-variable]
    int64_t t_sample_us  = 0;
            ^
./../../gpt4all-backend/mpt.cpp:839:13: warning: variable 't_predict_us' set but not used [-Wunused-but-set-variable]
    int64_t t_predict_us = 0;
            ^
./../../gpt4all-backend/mpt.cpp:840:13: warning: variable 't_prompt_us' set but not used [-Wunused-but-set-variable]
    int64_t t_prompt_us = 0;
            ^
./../../gpt4all-backend/mpt.cpp:905:9: warning: unused variable 'p_instructFound' [-Wunused-variable]
    int p_instructFound = 0;
        ^
./../../gpt4all-backend/mpt.cpp:906:9: warning: unused variable 'r_instructFound' [-Wunused-variable]
    int r_instructFound = 0;
        ^
./../../gpt4all-backend/mpt.cpp:914:13: warning: variable 'totalPredictions' set but not used [-Wunused-but-set-variable]
    int32_t totalPredictions = 0;
            ^
./../../gpt4all-backend/mpt.cpp:876:45: warning: comparison of integers of different signs: 'unsigned long' and 'int32_t' (aka 'int') [-Wsign-compare]
        if (promptCtx.n_past + batch.size() > promptCtx.n_ctx) {
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
./../../gpt4all-backend/mpt.cpp:894:41: warning: comparison of integers of different signs: 'std::vector<int>::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
            if (promptCtx.tokens.size() == promptCtx.n_ctx)
                ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~
./../../gpt4all-backend/mpt.cpp:991:41: warning: comparison of integers of different signs: 'std::vector<int>::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
            if (promptCtx.tokens.size() == promptCtx.n_ctx)
                ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~
binding.cpp:68:33: warning: unused parameter 'token_id' [-Wunused-parameter]
    auto lambda_prompt = [](int token_id)  {
                                ^
binding.cpp:76:27: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
        res.append((char*)responsechars);
                          ^
binding.cpp:77:46: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
        return !!getTokenCallback(mm, (char*)responsechars);
                                             ^
binding.cpp:75:35: warning: unused parameter 'token_id' [-Wunused-parameter]
    auto lambda_response = [](int token_id, const char *responsechars) {
                                  ^
25 warnings generated.
mkdir buildllm
cd buildllm && cmake ../../../gpt4all-backend/  && make VERBOSE=1 llmodel ggml common
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- The C compiler identification is AppleClang 14.0.3.14030022
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Accelerate framework found
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend -B/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm --check-build-system CMakeFiles/Makefile.cmake 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 llmodel
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend -B/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm --check-build-system CMakeFiles/Makefile.cmake 0
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/CMakeFiles 10
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 CMakeFiles/llmodel.dir/all
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/ggml.dir/build.make llama.cpp/CMakeFiles/ggml.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/CMakeFiles/ggml.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/ggml.dir/build.make llama.cpp/CMakeFiles/ggml.dir/build
[ 10%] Building C object llama.cpp/CMakeFiles/ggml.dir/ggml.c.o
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DGGML_USE_ACCELERATE -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu11 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -MD -MT llama.cpp/CMakeFiles/ggml.dir/ggml.c.o -MF CMakeFiles/ggml.dir/ggml.c.o.d -o CMakeFiles/ggml.dir/ggml.c.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:9357:15: warning: unused variable 'ne2_ne3' [-Wunused-variable]
    const int ne2_ne3 = n/ne1; // ne2*ne3
              ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:9419:15: warning: unused variable 'ne2' [-Wunused-variable]
    const int ne2 = src0->ne[2]; // n_head -> this is k
              ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:9468:13: warning: enumeration value 'GGML_TYPE_Q4_3' not handled in switch [-Wswitch]
    switch (src0->type) {
            ^~~~~~~~~~
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:9468:13: note: add missing switch cases
    switch (src0->type) {
            ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:3833:20: warning: unused function 'ggml_gptj_vec_silu_f16' [-Wunused-function]
inline static void ggml_gptj_vec_silu_f16(const int n, ggml_gptj_fp16_t * y, const ggml_gptj_fp16_t * x) {
                   ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:4304:19: warning: unused function 'ggml_gptj_up64' [-Wunused-function]
static inline int ggml_gptj_up64(int n) {
                  ^
5 warnings generated.
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:781:15: warning: unused variable 'nb' [-Wunused-variable]
    const int nb = k / QK4_0;
              ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:1127:15: warning: unused variable 'nb' [-Wunused-variable]
    const int nb = k / QK4_1;
              ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:1129:27: warning: unused variable 'y' [-Wunused-variable]
    block_q4_1 * restrict y = vy;
                          ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:1507:15: warning: unused variable 'nb' [-Wunused-variable]
    const int nb = k / QK8_1;
              ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:2699:5: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_gptj_float' (aka 'double') [-Wdouble-promotion]
    GGML_F16_VEC_REDUCE(sumf, sum);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:2608:38: note: expanded from macro 'GGML_F16_VEC_REDUCE'
#define GGML_F16_VEC_REDUCE          GGML_F32Cx4_REDUCE
                                     ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:2598:33: note: expanded from macro 'GGML_F32Cx4_REDUCE'
#define GGML_F32Cx4_REDUCE      GGML_F32x4_REDUCE
                                ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:2549:11: note: expanded from macro 'GGML_F32x4_REDUCE'
    res = _mm_cvtss_f32(_mm_hadd_ps(t0, t0));                     \
        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:3706:9: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_gptj_float' (aka 'double') [-Wdouble-promotion]
        GGML_F16_VEC_REDUCE(sumf[k], sum[k]);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:2608:38: note: expanded from macro 'GGML_F16_VEC_REDUCE'
#define GGML_F16_VEC_REDUCE          GGML_F32Cx4_REDUCE
                                     ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:2598:33: note: expanded from macro 'GGML_F32Cx4_REDUCE'
#define GGML_F32Cx4_REDUCE      GGML_F32x4_REDUCE
                                ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:2549:11: note: expanded from macro 'GGML_F32x4_REDUCE'
    res = _mm_cvtss_f32(_mm_hadd_ps(t0, t0));                     \
        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:9357:15: warning: unused variable 'ne2_ne3' [-Wunused-variable]
    const int ne2_ne3 = n/ne1; // ne2*ne3
              ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:9419:15: warning: unused variable 'ne2' [-Wunused-variable]
    const int ne2 = src0->ne[2]; // n_head -> this is k
              ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:9468:13: warning: enumeration value 'GGML_TYPE_Q4_3' not handled in switch [-Wswitch]
    switch (src0->type) {
            ^~~~~~~~~~
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:9468:13: note: add missing switch cases
    switch (src0->type) {
            ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:2579:20: warning: unused function '__sse_f16x4_store' [-Wunused-function]
static inline void __sse_f16x4_store(ggml_gptj_fp16_t *x, __m128 y) {
                   ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:3833:20: warning: unused function 'ggml_gptj_vec_silu_f16' [-Wunused-function]
inline static void ggml_gptj_vec_silu_f16(const int n, ggml_gptj_fp16_t * y, const ggml_gptj_fp16_t * x) {
                   ^
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/ggml.c:4304:19: warning: unused function 'ggml_gptj_up64' [-Wunused-function]
static inline int ggml_gptj_up64(int n) {
                  ^
12 warnings generated.
[ 10%] Built target ggml
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/llama.dir/build.make llama.cpp/CMakeFiles/llama.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/CMakeFiles/llama.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/llama.dir/build.make llama.cpp/CMakeFiles/llama.dir/build
[ 20%] Building CXX object llama.cpp/CMakeFiles/llama.dir/llama.cpp.o
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DGGML_USE_ACCELERATE -DLLAMA_BUILD -DLLAMA_SHARED -Dllama_EXPORTS -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu++11 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT llama.cpp/CMakeFiles/llama.dir/llama.cpp.o -MF CMakeFiles/llama.dir/llama.cpp.o.d -o CMakeFiles/llama.dir/llama.cpp.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/llama.cpp
[ 30%] Linking CXX shared library libllama.dylib
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_link_script CMakeFiles/llama.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -O3 -DNDEBUG -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -dynamiclib -Wl,-headerpad_max_install_names -o libllama.dylib -install_name @rpath/libllama.dylib CMakeFiles/llama.dir/llama.cpp.o CMakeFiles/ggml.dir/ggml.c.o  -Xlinker -framework -Xlinker Accelerate 
[ 30%] Built target llama
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/llmodel.dir/build.make CMakeFiles/llmodel.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/CMakeFiles/llmodel.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/llmodel.dir/build.make CMakeFiles/llmodel.dir/build
[ 40%] Building CXX object CMakeFiles/llmodel.dir/gptj.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Dllmodel_EXPORTS -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu++11 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -MD -MT CMakeFiles/llmodel.dir/gptj.cpp.o -MF CMakeFiles/llmodel.dir/gptj.cpp.o.d -o CMakeFiles/llmodel.dir/gptj.cpp.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/gptj.cpp
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/gptj.cpp:419:48: warning: format specifies type 'unsigned long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
                        __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
                                               ^~~~~~~~~~~~~
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/gptj.cpp:419:63: warning: format specifies type 'unsigned long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
                        __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
                                                              ^~~~~~~~~~~~~
2 warnings generated.
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/gptj.cpp:419:48: warning: format specifies type 'unsigned long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
                        __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
                                               ^~~~~~~~~~~~~
/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/gptj.cpp:419:63: warning: format specifies type 'unsigned long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
                        __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
                                                              ^~~~~~~~~~~~~
2 warnings generated.
[ 50%] Building CXX object CMakeFiles/llmodel.dir/llamamodel.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Dllmodel_EXPORTS -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu++11 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -MD -MT CMakeFiles/llmodel.dir/llamamodel.cpp.o -MF CMakeFiles/llmodel.dir/llamamodel.cpp.o.d -o CMakeFiles/llmodel.dir/llamamodel.cpp.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llamamodel.cpp
[ 60%] Building CXX object CMakeFiles/llmodel.dir/llama.cpp/examples/common.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Dllmodel_EXPORTS -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu++11 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -MD -MT CMakeFiles/llmodel.dir/llama.cpp/examples/common.cpp.o -MF CMakeFiles/llmodel.dir/llama.cpp/examples/common.cpp.o.d -o CMakeFiles/llmodel.dir/llama.cpp/examples/common.cpp.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/examples/common.cpp
[ 70%] Building CXX object CMakeFiles/llmodel.dir/llmodel_c.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Dllmodel_EXPORTS -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu++11 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -MD -MT CMakeFiles/llmodel.dir/llmodel_c.cpp.o -MF CMakeFiles/llmodel.dir/llmodel_c.cpp.o.d -o CMakeFiles/llmodel.dir/llmodel_c.cpp.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llmodel_c.cpp
[ 80%] Building CXX object CMakeFiles/llmodel.dir/mpt.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Dllmodel_EXPORTS -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu++11 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -MD -MT CMakeFiles/llmodel.dir/mpt.cpp.o -MF CMakeFiles/llmodel.dir/mpt.cpp.o.d -o CMakeFiles/llmodel.dir/mpt.cpp.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/mpt.cpp
[ 90%] Building CXX object CMakeFiles/llmodel.dir/utils.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Dllmodel_EXPORTS -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu++11 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -MD -MT CMakeFiles/llmodel.dir/utils.cpp.o -MF CMakeFiles/llmodel.dir/utils.cpp.o.d -o CMakeFiles/llmodel.dir/utils.cpp.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/utils.cpp
[100%] Linking CXX shared library libllmodel.dylib
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_link_script CMakeFiles/llmodel.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -O3 -DNDEBUG -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -dynamiclib -Wl,-headerpad_max_install_names -current_version 0.1.1 -o libllmodel.0.1.1.dylib -install_name @rpath/libllmodel.0.dylib CMakeFiles/llmodel.dir/gptj.cpp.o CMakeFiles/llmodel.dir/llamamodel.cpp.o CMakeFiles/llmodel.dir/llama.cpp/examples/common.cpp.o CMakeFiles/llmodel.dir/llmodel_c.cpp.o CMakeFiles/llmodel.dir/mpt.cpp.o CMakeFiles/llmodel.dir/utils.cpp.o  -Wl,-rpath,/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp llama.cpp/libllama.dylib 
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_symlink_library libllmodel.0.1.1.dylib libllmodel.0.dylib libllmodel.dylib
[100%] Built target llmodel
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/CMakeFiles 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 ggml
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend -B/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm --check-build-system CMakeFiles/Makefile.cmake 0
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/CMakeFiles 1
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 llama.cpp/CMakeFiles/ggml.dir/all
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/ggml.dir/build.make llama.cpp/CMakeFiles/ggml.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/CMakeFiles/ggml.dir/DependInfo.cmake --color=
Dependencies file "llama.cpp/CMakeFiles/ggml.dir/ggml.c.o.d" is newer than depends file "/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/CMakeFiles/ggml.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target ggml
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/ggml.dir/build.make llama.cpp/CMakeFiles/ggml.dir/build
make[5]: Nothing to be done for `llama.cpp/CMakeFiles/ggml.dir/build'.
[100%] Built target ggml
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/CMakeFiles 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 common
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend -B/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm --check-build-system CMakeFiles/Makefile.cmake 0
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/CMakeFiles 4
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 llama.cpp/examples/CMakeFiles/common.dir/all
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/ggml.dir/build.make llama.cpp/CMakeFiles/ggml.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/CMakeFiles/ggml.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/ggml.dir/build.make llama.cpp/CMakeFiles/ggml.dir/build
make[5]: Nothing to be done for `llama.cpp/CMakeFiles/ggml.dir/build'.
[ 25%] Built target ggml
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/llama.dir/build.make llama.cpp/CMakeFiles/llama.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/CMakeFiles/llama.dir/DependInfo.cmake --color=
Dependencies file "llama.cpp/CMakeFiles/llama.dir/llama.cpp.o.d" is newer than depends file "/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/CMakeFiles/llama.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target llama
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/CMakeFiles/llama.dir/build.make llama.cpp/CMakeFiles/llama.dir/build
make[5]: Nothing to be done for `llama.cpp/CMakeFiles/llama.dir/build'.
[ 75%] Built target llama
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/examples/CMakeFiles/common.dir/build.make llama.cpp/examples/CMakeFiles/common.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/examples /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/examples /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/examples/CMakeFiles/common.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f llama.cpp/examples/CMakeFiles/common.dir/build.make llama.cpp/examples/CMakeFiles/common.dir/build
[100%] Building CXX object llama.cpp/examples/CMakeFiles/common.dir/common.cpp.o
cd /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/llama.cpp/examples && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DGGML_USE_ACCELERATE -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/examples/. -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/examples -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu++11 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT llama.cpp/examples/CMakeFiles/common.dir/common.cpp.o -MF CMakeFiles/common.dir/common.cpp.o.d -o CMakeFiles/common.dir/common.cpp.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/examples/common.cpp
[100%] Built target common
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllm/CMakeFiles 0
cd buildllm && cp -rf CMakeFiles/llmodel.dir/llmodel_c.cpp.o ../llmodel.o
cd buildllm && cp -rfv CMakeFiles/llmodel.dir/llama.cpp/examples/common.cpp.o ../common.o
CMakeFiles/llmodel.dir/llama.cpp/examples/common.cpp.o -> ../common.o
cd buildllm && cp -rf CMakeFiles/llmodel.dir/gptj.cpp.o ../gptj.o
cd buildllm && cp -rf CMakeFiles/llmodel.dir/llamamodel.cpp.o ../llamamodel.o
cd buildllm && cp -rf CMakeFiles/llmodel.dir/utils.cpp.o ../utils.o
cd buildllm && cp -rf llama.cpp/CMakeFiles/ggml.dir/ggml.c.o ../ggml.o
mkdir buildllama
cd buildllama && cmake ../../../gpt4all-backend/llama.cpp  && make VERBOSE=1 llama.o && cp -rf CMakeFiles/llama.dir/llama.cpp.o ../llama.o
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Accelerate framework found
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Configuring done (0.5s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-bindings/golang/buildllama
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/llama.dir/build.make CMakeFiles/llama.dir/llama.cpp.o
Building CXX object CMakeFiles/llama.dir/llama.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DGGML_USE_ACCELERATE -I/Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/. -O3 -DNDEBUG -std=gnu++11 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT CMakeFiles/llama.dir/llama.cpp.o -MF CMakeFiles/llama.dir/llama.cpp.o.d -o CMakeFiles/llama.dir/llama.cpp.o -c /Users/james/Downloads/aitest/LocalAI/gpt4all/gpt4all-backend/llama.cpp/llama.cpp
ar src libgpt4all.a ggml.o common.o llama.o llamamodel.o utils.o llmodel.o gptj.o binding.o
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: libgpt4all.a will be fat and ar(1) will not be able to operate on it
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C go-llama BUILD_TYPE= libbinding.a
I llama.cpp build info: 
I UNAME_S:  Darwin
I UNAME_P:  arm
I UNAME_M:  arm64
I CFLAGS:   -I./llama.cpp -I. -O3 -DNDEBUG -std=c11 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wno-unused-function -pthread -DGGML_USE_ACCELERATE
I CXXFLAGS: -I./llama.cpp -I. -I./llama.cpp/examples -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -pthread
I LDFLAGS:   -framework Accelerate
I BUILD_TYPE:  
I CMAKE_ARGS:  
I EXTRA_TARGETS:  
I CC:       Apple clang version 14.0.3 (clang-1403.0.22.14.1)
I CXX:      Apple clang version 14.0.3 (clang-1403.0.22.14.1)

mkdir -p build
cd build && cmake ../llama.cpp  && make VERBOSE=1 ggml && cp -rf CMakeFiles/ggml.dir/ggml.c.o ../llama.cpp/ggml.o
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.39.2 (Apple Git-143)") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Accelerate framework found
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Configuring done (0.6s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/james/Downloads/aitest/LocalAI/go-llama/build
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/go-llama/llama.cpp -B/Users/james/Downloads/aitest/LocalAI/go-llama/build --check-build-system CMakeFiles/Makefile.cmake 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 ggml
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/go-llama/llama.cpp -B/Users/james/Downloads/aitest/LocalAI/go-llama/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/go-llama/build/CMakeFiles 1
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 CMakeFiles/ggml.dir/all
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/ggml.dir/build.make CMakeFiles/ggml.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/go-llama/build && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/go-llama/llama.cpp /Users/james/Downloads/aitest/LocalAI/go-llama/llama.cpp /Users/james/Downloads/aitest/LocalAI/go-llama/build /Users/james/Downloads/aitest/LocalAI/go-llama/build /Users/james/Downloads/aitest/LocalAI/go-llama/build/CMakeFiles/ggml.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/ggml.dir/build.make CMakeFiles/ggml.dir/build
[100%] Building C object CMakeFiles/ggml.dir/ggml.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DGGML_USE_ACCELERATE -I/Users/james/Downloads/aitest/LocalAI/go-llama/llama.cpp/. -O3 -DNDEBUG -std=gnu11 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -MD -MT CMakeFiles/ggml.dir/ggml.c.o -MF CMakeFiles/ggml.dir/ggml.c.o.d -o CMakeFiles/ggml.dir/ggml.c.o -c /Users/james/Downloads/aitest/LocalAI/go-llama/llama.cpp/ggml.c
[100%] Built target ggml
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/go-llama/build/CMakeFiles 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C llama.cpp llama.o
I llama.cpp build info: 
I UNAME_S:  Darwin
I UNAME_P:  arm
I UNAME_M:  arm64
I CFLAGS:   -I.              -O3 -std=c11   -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -pthread -DGGML_USE_ACCELERATE
I CXXFLAGS: -I. -I./examples -O3 -std=c++11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread
I LDFLAGS:   -framework Accelerate
I CC:       Apple clang version 14.0.3 (clang-1403.0.22.14.1)
I CXX:      Apple clang version 14.0.3 (clang-1403.0.22.14.1)

c++ -I. -I./examples -O3 -std=c++11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -c llama.cpp -o llama.o
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C llama.cpp common.o
I llama.cpp build info: 
I UNAME_S:  Darwin
I UNAME_P:  arm
I UNAME_M:  arm64
I CFLAGS:   -I.              -O3 -std=c11   -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -pthread -DGGML_USE_ACCELERATE
I CXXFLAGS: -I. -I./examples -O3 -std=c++11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread
I LDFLAGS:   -framework Accelerate
I CC:       Apple clang version 14.0.3 (clang-1403.0.22.14.1)
I CXX:      Apple clang version 14.0.3 (clang-1403.0.22.14.1)

c++ -I. -I./examples -O3 -std=c++11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -c examples/common.cpp -o common.o
c++ -I./llama.cpp -I. -I./llama.cpp/examples -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -pthread -I./llama.cpp -I./llama.cpp/examples binding.cpp -o binding.o -c  -framework Accelerate
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
binding.cpp:380:49: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
            if (!tokenCallback(state_pr, (char*)token_str)) {
                                                ^
1 warning generated.
ar src libbinding.a llama.cpp/ggml.o  llama.cpp/common.o llama.cpp/llama.o binding.o
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C go-bert libgobert.a
I go-gpt4all-j build info: 
I UNAME_S:  Darwin
I UNAME_P:  arm
I UNAME_M:  arm64
I CFLAGS:   -I. -I./bert.cpp/ggml/include/ggml/ -I./bert.cpp/ -I -O3 -DNDEBUG -std=c11 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wno-unused-function -pthread -DGGML_USE_ACCELERATE
I CXXFLAGS: -I. -I./bert.cpp/ggml/include/ggml/ -I./bert.cpp/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread
I LDFLAGS:   -framework Accelerate
I CMAKEFLAGS:  
I CC:       Apple clang version 14.0.3 (clang-1403.0.22.14.1)
I CXX:      Apple clang version 14.0.3 (clang-1403.0.22.14.1)

cd bert.cpp && mkdir build
sed "s/#include <regex>/#include <regex>\n#include <unordered_map>/" bert.cpp/bert.cpp > bert.cpp/bert.tmp && mv bert.cpp/bert.tmp bert.cpp/bert.cpp
cd bert.cpp/build && cmake .. -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release && make
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Accelerate framework found
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Accelerate framework found
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build
[  8%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml.c.o
[ 16%] Linking C static library libggml.a
[ 16%] Built target ggml
[ 25%] Building CXX object CMakeFiles/bert.dir/bert.cpp.o
[ 33%] Linking CXX static library libbert.a
[ 33%] Built target bert
[ 41%] Building CXX object examples/CMakeFiles/server.dir/server.cpp.o
[ 50%] Linking CXX executable ../bin/server
[ 50%] Built target server
[ 58%] Building CXX object examples/CMakeFiles/main.dir/main.cpp.o
[ 66%] Linking CXX executable ../bin/main
[ 66%] Built target main
[ 75%] Building CXX object examples/CMakeFiles/test_tokenizer.dir/test_tokenizer.cpp.o
[ 83%] Linking CXX executable ../bin/test_tokenizer
[ 83%] Built target test_tokenizer
[ 91%] Building CXX object models/CMakeFiles/quantize.dir/quantize.cpp.o
[100%] Linking CXX executable ../bin/quantize
[100%] Built target quantize
cp bert.cpp/build/CMakeFiles/bert.dir/bert.cpp.o bert.o
c++ -I. -I./bert.cpp/ggml/include/ggml/ -I./bert.cpp/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread gobert.cpp -o gobert.o -c  -framework Accelerate
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
In file included from gobert.cpp:6:
./bert.cpp/bert.cpp:692:74: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
    printf("%s: mem_per_token %d KB, mem_per_input %lld MB\n", __func__, new_bert->mem_per_token / (1 << 10), new_bert->mem_per_input / (1 << 20));
                              ~~                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              %lu
gobert.cpp:19:19: warning: unused variable 't_main_start_us' [-Wunused-variable]
    const int64_t t_main_start_us = ggml_bert_time_us();
                  ^
gobert.cpp:24:9: warning: unused variable 'N' [-Wunused-variable]
    int N = bert_n_max_tokens(bctx);
        ^
gobert.cpp:32:23: warning: comparison of integers of different signs: 'int' and 'std::vector<float>::size_type' (aka 'unsigned long') [-Wsign-compare]
    for (int i = 0; i < embeddings.size(); i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~
gobert.cpp:39:19: warning: unused variable 't_main_start_us' [-Wunused-variable]
    const int64_t t_main_start_us = ggml_bert_time_us();
                  ^
gobert.cpp:53:23: warning: comparison of integers of different signs: 'int' and 'std::vector<float>::size_type' (aka 'unsigned long') [-Wsign-compare]
    for (int i = 0; i < embeddings.size(); i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~
6 warnings generated.
cd bert.cpp/build && make VERBOSE=1 ggml && cp -rf ggml/src/CMakeFiles/ggml.dir/ggml.c.o ../../ggml.o
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp -B/Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build --check-build-system CMakeFiles/Makefile.cmake 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 ggml
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp -B/Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build/CMakeFiles 2
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 ggml/src/CMakeFiles/ggml.dir/all
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f ggml/src/CMakeFiles/ggml.dir/build.make ggml/src/CMakeFiles/ggml.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp /Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/ggml/src /Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build /Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build/ggml/src /Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build/ggml/src/CMakeFiles/ggml.dir/DependInfo.cmake --color=
Dependencies file "ggml/src/CMakeFiles/ggml.dir/ggml.c.o.d" is newer than depends file "/Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build/ggml/src/CMakeFiles/ggml.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target ggml
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f ggml/src/CMakeFiles/ggml.dir/build.make ggml/src/CMakeFiles/ggml.dir/build
make[5]: Nothing to be done for `ggml/src/CMakeFiles/ggml.dir/build'.
[100%] Built target ggml
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/go-bert/bert.cpp/build/CMakeFiles 0
ar src libgobert.a gobert.o ggml.o 
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C go-ggml-transformers libtransformers.a
I go-gpt4all-j build info: 
I UNAME_S:  Darwin
I UNAME_P:  arm
I UNAME_M:  arm64
I CFLAGS:   -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -I -O3 -DNDEBUG -std=c11 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wno-unused-function -pthread -DGGML_USE_ACCELERATE
I CXXFLAGS: -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread
I LDFLAGS:   -framework Accelerate
I CMAKEFLAGS:  
I CC:       Apple clang version 14.0.3 (clang-1403.0.22.14.1)
I CXX:      Apple clang version 14.0.3 (clang-1403.0.22.14.1)

c++ -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread starcoder.cpp -o starcoder.o -c  -framework Accelerate
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
starcoder.cpp:743:19: warning: unused variable 't_main_start_us' [-Wunused-variable]
    const int64_t t_main_start_us = ggml_gpt2_time_us();
                  ^
starcoder.cpp:754:13: warning: unused variable 't_load_us' [-Wunused-variable]
    int64_t t_load_us = 0;
            ^
starcoder.cpp:758:13: warning: variable 't_sample_us' set but not used [-Wunused-but-set-variable]
    int64_t t_sample_us  = 0;
            ^
starcoder.cpp:759:13: warning: variable 't_predict_us' set but not used [-Wunused-but-set-variable]
    int64_t t_predict_us = 0;
            ^
starcoder.cpp:777:33: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
    for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) {
                              ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
starcoder.cpp:793:15: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
        if (i >= embd_inp.size()) {
            ~ ^  ~~~~~~~~~~~~~~~
starcoder.cpp:815:31: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
            for (int k = i; k < embd_inp.size(); k++) {
                            ~ ^ ~~~~~~~~~~~~~~~
starcoder.cpp:817:33: warning: comparison of integers of different signs: 'std::vector<int>::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
                if (embd.size() >= params.n_batch) {
                    ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
8 warnings generated.
c++ -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread gptj.cpp -o gptj.o -c  -framework Accelerate
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
gptj.cpp:627:19: warning: unused variable 't_main_start_us' [-Wunused-variable]
    const int64_t t_main_start_us = ggml_gpt2_time_us();
                  ^
gptj.cpp:639:13: warning: unused variable 't_load_us' [-Wunused-variable]
    int64_t t_load_us = 0;
            ^
gptj.cpp:643:13: warning: variable 't_sample_us' set but not used [-Wunused-but-set-variable]
    int64_t t_sample_us  = 0;
            ^
gptj.cpp:644:13: warning: variable 't_predict_us' set but not used [-Wunused-but-set-variable]
    int64_t t_predict_us = 0;
            ^
gptj.cpp:663:33: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
    for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) {
                              ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gptj.cpp:679:15: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
        if (i >= embd_inp.size()) {
            ~ ^  ~~~~~~~~~~~~~~~
gptj.cpp:701:31: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
            for (int k = i; k < embd_inp.size(); k++) {
                            ~ ^ ~~~~~~~~~~~~~~~
gptj.cpp:703:33: warning: comparison of integers of different signs: 'std::vector<int>::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
                if (embd.size() > params.n_batch) {
                    ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
8 warnings generated.
c++ -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread mpt.cpp -o mpt.o -c  -framework Accelerate
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
mpt.cpp:251:31: warning: comparison of integers of different signs: 'int' and 'std::basic_string<wchar_t>::size_type' (aka 'unsigned long') [-Wsign-compare]
            for (int w = 0; w < word_multibytes.size(); w++) {
                            ~ ^ ~~~~~~~~~~~~~~~~~~~~~~
mpt.cpp:865:19: warning: unused variable 't_main_start_us' [-Wunused-variable]
    const int64_t t_main_start_us = ggml_gpt2_time_us();
                  ^
mpt.cpp:877:13: warning: unused variable 't_load_us' [-Wunused-variable]
    int64_t t_load_us = 0;
            ^
mpt.cpp:880:13: warning: variable 't_sample_us' set but not used [-Wunused-but-set-variable]
    int64_t t_sample_us  = 0;
            ^
mpt.cpp:881:13: warning: variable 't_predict_us' set but not used [-Wunused-but-set-variable]
    int64_t t_predict_us = 0;
            ^
5 warnings generated.
mkdir build
cd build && cmake ../ggml.cpp  && make VERBOSE=1 ggml && cp -rf src/CMakeFiles/ggml.dir/ggml.c.o ../ggml.o
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.39.2 (Apple Git-143)") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Accelerate framework found
-- ARM detected
-- Accelerate framework found
-- Configuring done (0.6s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/ggml.cpp -B/Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build --check-build-system CMakeFiles/Makefile.cmake 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 ggml
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -S/Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/ggml.cpp -B/Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build/CMakeFiles 2
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 src/CMakeFiles/ggml.dir/all
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f src/CMakeFiles/ggml.dir/build.make src/CMakeFiles/ggml.dir/depend
cd /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/ggml.cpp /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/ggml.cpp/src /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build/src /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build/src/CMakeFiles/ggml.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f src/CMakeFiles/ggml.dir/build.make src/CMakeFiles/ggml.dir/build
[ 50%] Building C object src/CMakeFiles/ggml.dir/ggml.c.o
cd /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build/src && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DGGML_USE_ACCELERATE -I/Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/ggml.cpp/src/. -I/Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/ggml.cpp/src/../include -I/Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/ggml.cpp/src/../include/ggml -Wall                                       -Wextra                                     -Wpedantic                                  -Wshadow                                    -Wcast-qual                                 -Wstrict-prototypes                         -Wpointer-arith                             -Wdouble-promotion                          -Wno-unused-function                     -Werror=vla -O3 -DNDEBUG -std=gnu11 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -MD -MT src/CMakeFiles/ggml.dir/ggml.c.o -MF CMakeFiles/ggml.dir/ggml.c.o.d -o CMakeFiles/ggml.dir/ggml.c.o -c /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/ggml.cpp/src/ggml.c
[100%] Linking C static library libggml.a
cd /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build/src && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -P CMakeFiles/ggml.dir/cmake_clean_target.cmake
cd /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build/src && /opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_link_script CMakeFiles/ggml.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar qc libggml.a CMakeFiles/ggml.dir/ggml.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib libggml.a
[100%] Built target ggml
/opt/homebrew/Cellar/cmake/3.26.4/bin/cmake -E cmake_progress_start /Users/james/Downloads/aitest/LocalAI/go-ggml-transformers/build/CMakeFiles 0
c++ -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread gpt2.cpp ggml.o -o gpt2.o -c  -framework Accelerate
clang: warning: ggml.o: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
gpt2.cpp:716:19: warning: unused variable 't_main_start_us' [-Wunused-variable]
    const int64_t t_main_start_us = ggml_gpt2_time_us();
                  ^
gpt2.cpp:725:13: warning: unused variable 't_load_us' [-Wunused-variable]
    int64_t t_load_us = 0;
            ^
gpt2.cpp:730:13: warning: variable 't_sample_us' set but not used [-Wunused-but-set-variable]
    int64_t t_sample_us  = 0;
            ^
gpt2.cpp:731:13: warning: variable 't_predict_us' set but not used [-Wunused-but-set-variable]
    int64_t t_predict_us = 0;
            ^
gpt2.cpp:750:33: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
    for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) {
                              ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpt2.cpp:766:15: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
        if (i >= embd_inp.size()) {
            ~ ^  ~~~~~~~~~~~~~~~
gpt2.cpp:788:31: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
            for (int k = i; k < embd_inp.size(); k++) {
                            ~ ^ ~~~~~~~~~~~~~~~
gpt2.cpp:790:33: warning: comparison of integers of different signs: 'std::vector<int>::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
                if (embd.size() >= params.n_batch) {
                    ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
8 warnings generated.
c++ -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread replit.cpp -o replit.o -c  -framework Accelerate
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
replit.cpp:38:39: warning: comparison of integers of different signs: 'int' and 'std::basic_string<char>::size_type' (aka 'unsigned long') [-Wsign-compare]
    for (int start_idx = 0; start_idx < word.length(); ++start_idx) {
                            ~~~~~~~~~ ^ ~~~~~~~~~~~~~
replit.cpp:40:51: warning: comparison of integers of different signs: 'int' and 'std::basic_string<char>::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (int end_idx = start_idx + 1; end_idx <= word.length(); ++end_idx) {
                                          ~~~~~~~ ^  ~~~~~~~~~~~~~
replit.cpp:78:31: warning: comparison of integers of different signs: 'std::size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
    for (std::size_t i = 0; i < max_vocab_size; i++) {
                            ~ ^ ~~~~~~~~~~~~~~
replit.cpp:668:50: warning: format specifies type 'int' but the argument has type 'std::vector<unsigned long>::value_type' (aka 'unsigned long') [-Wformat]
    printf("%s: token[%d] = %6d\n", __func__, i, embd_inp[i]);
                            ~~~                  ^~~~~~~~~~~
                            %6lu
replit.cpp:642:17: warning: unused variable 't_main_start_us' [-Wunused-variable]
  const int64_t t_main_start_us = ggml_gpt2_time_us();
                ^
replit.cpp:652:11: warning: unused variable 't_load_us' [-Wunused-variable]
  int64_t t_load_us = 0;
          ^
replit.cpp:656:11: warning: variable 't_sample_us' set but not used [-Wunused-but-set-variable]
  int64_t t_sample_us = 0;
          ^
replit.cpp:657:11: warning: variable 't_predict_us' set but not used [-Wunused-but-set-variable]
  int64_t t_predict_us = 0;
          ^
replit.cpp:667:21: warning: comparison of integers of different signs: 'int' and 'std::vector<unsigned long>::size_type' (aka 'unsigned long') [-Wsign-compare]
  for (int i = 0; i < embd_inp.size(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~
replit.cpp:683:31: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) {
                            ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replit.cpp:700:11: warning: comparison of integers of different signs: 'int' and 'std::vector<unsigned long>::size_type' (aka 'unsigned long') [-Wsign-compare]
    if (i >= embd_inp.size()) {
        ~ ^  ~~~~~~~~~~~~~~~
replit.cpp:724:25: warning: comparison of integers of different signs: 'int' and 'std::vector<unsigned long>::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int k = i; k < embd_inp.size(); k++) {
                      ~ ^ ~~~~~~~~~~~~~~~
replit.cpp:726:25: warning: comparison of integers of different signs: 'std::vector<int>::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
        if (embd.size() > params.n_batch) {
            ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
13 warnings generated.
c++ -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread gptneox.cpp -o gptneox.o -c  -framework Accelerate
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
gptneox.cpp:688:19: warning: unused variable 't_main_start_us' [-Wunused-variable]
    const int64_t t_main_start_us = ggml_gpt2_time_us();
                  ^
gptneox.cpp:700:13: warning: unused variable 't_load_us' [-Wunused-variable]
    int64_t t_load_us = 0;
            ^
gptneox.cpp:704:13: warning: variable 't_sample_us' set but not used [-Wunused-but-set-variable]
    int64_t t_sample_us  = 0;
            ^
gptneox.cpp:705:13: warning: variable 't_predict_us' set but not used [-Wunused-but-set-variable]
    int64_t t_predict_us = 0;
            ^
gptneox.cpp:723:33: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
    for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) {
                              ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gptneox.cpp:739:15: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
        if (i >= embd_inp.size()) {
            ~ ^  ~~~~~~~~~~~~~~~
gptneox.cpp:761:31: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
            for (int k = i; k < embd_inp.size(); k++) {
                            ~ ^ ~~~~~~~~~~~~~~~
gptneox.cpp:763:33: warning: comparison of integers of different signs: 'std::vector<int>::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
                if (embd.size() > params.n_batch) {
                    ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
8 warnings generated.
c++ -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread dolly.cpp -o dolly.o -c  -framework Accelerate
clang: warning: -framework Accelerate: 'linker' input unused [-Wunused-command-line-argument]
dolly.cpp:689:13: warning: unused variable 't_load_us' [-Wunused-variable]
    int64_t t_load_us = 0;
            ^
dolly.cpp:693:13: warning: variable 't_sample_us' set but not used [-Wunused-but-set-variable]
    int64_t t_sample_us  = 0;
            ^
dolly.cpp:694:13: warning: variable 't_predict_us' set but not used [-Wunused-but-set-variable]
    int64_t t_predict_us = 0;
            ^
dolly.cpp:713:33: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
    for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) {
                              ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dolly.cpp:729:15: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
        if (i >= embd_inp.size()) {
            ~ ^  ~~~~~~~~~~~~~~~
dolly.cpp:752:31: warning: comparison of integers of different signs: 'int' and 'std::vector<int>::size_type' (aka 'unsigned long') [-Wsign-compare]
            for (int k = i; k < embd_inp.size(); k++) {
                            ~ ^ ~~~~~~~~~~~~~~~
dolly.cpp:754:33: warning: comparison of integers of different signs: 'std::vector<int>::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
                if (embd.size() > params.n_batch) {
                    ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
7 warnings generated.
c++ -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -c ggml.cpp/examples/common-ggml.cpp -o common-ggml.o
c++ -I. -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -c ggml.cpp/examples/common.cpp -o common.o
ggml.cpp/examples/common.cpp:225:31: warning: 'codecvt_utf8<wchar_t, 1114111, 0>' is deprecated [-Wdeprecated-declarations]
    std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/codecvt:199:28: note: 'codecvt_utf8<wchar_t, 1114111, 0>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:837:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:810:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((deprecated))
                                                ^
ggml.cpp/examples/common.cpp:225:10: warning: 'wstring_convert<std::codecvt_utf8<wchar_t, 1114111, 0>>' is deprecated [-Wdeprecated-declarations]
    std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:3621:28: note: 'wstring_convert<std::codecvt_utf8<wchar_t, 1114111, 0>>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:837:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:810:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((deprecated))
                                                ^
ggml.cpp/examples/common.cpp:231:31: warning: 'codecvt_utf8<wchar_t, 1114111, 0>' is deprecated [-Wdeprecated-declarations]
    std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/codecvt:199:28: note: 'codecvt_utf8<wchar_t, 1114111, 0>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:837:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:810:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((deprecated))
                                                ^
ggml.cpp/examples/common.cpp:231:10: warning: 'wstring_convert<std::codecvt_utf8<wchar_t, 1114111, 0>>' is deprecated [-Wdeprecated-declarations]
    std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:3621:28: note: 'wstring_convert<std::codecvt_utf8<wchar_t, 1114111, 0>>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:837:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:810:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((deprecated))
                                                ^
ggml.cpp/examples/common.cpp:271:27: warning: comparison of integers of different signs: 'int' and 'std::basic_string<char>::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (int i = 0; i < word.size(); ){
                        ~ ^ ~~~~~~~~~~~
5 warnings generated.
ar src libtransformers.a replit.o gptj.o mpt.o gptneox.o starcoder.o gpt2.o dolly.o ggml.o common-ggml.o common.o
cd go-rwkv && cd rwkv.cpp &&	cmake . -DRWKV_BUILD_SHARED_LIBRARY=OFF &&	cmake --build . && 	cp librwkv.a .. && cp ggml/src/libggml.a ..
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Accelerate framework found
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Accelerate framework found
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp
gmake[1]: Entering directory '/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp'
[ 12%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml.c.o
[ 25%] Linking C static library libggml.a
[ 25%] Built target ggml
[ 37%] Building CXX object CMakeFiles/rwkv.dir/rwkv.cpp.o
/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:209:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
    sprintf(full_key, "blocks.%d.%s", block_index, key.c_str());
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:471:19: error: variable has incomplete type 'struct stat64'
    struct stat64 file_stat;
                  ^
/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:471:12: note: forward declaration of 'stat64'
    struct stat64 file_stat;
           ^
/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:638:30: warning: cast from 'const rwkv_context *' to 'rwkv_context *' drops const qualifier [-Wcast-qual]
    ((struct rwkv_context *) ctx)->last_error = RWKV_ERROR_NONE;
                             ^
/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:640:31: warning: cast from 'const rwkv_context *' to 'rwkv_context *' drops const qualifier [-Wcast-qual]
    RWKV_CTX_ASSERT_FALSE_MSG(ctx, RWKV_ERROR_ARGS, state_out != NULL, "state_out is NULL");
                              ^
/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:641:31: warning: cast from 'const rwkv_context *' to 'rwkv_context *' drops const qualifier [-Wcast-qual]
    RWKV_CTX_ASSERT_FALSE_MSG(ctx, RWKV_ERROR_ARGS, logits_out != NULL, "logits_out is NULL");
                              ^
/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp/rwkv.cpp:642:31: warning: cast from 'const rwkv_context *' to 'rwkv_context *' drops const qualifier [-Wcast-qual]
    RWKV_CTX_ASSERT_FALSE_MSG(ctx, RWKV_ERROR_ARGS, token < ctx->model->n_vocab, "Token is out of range 0..%d", ctx->model->n_vocab - 1);
                              ^
5 warnings and 1 error generated.
gmake[3]: *** [CMakeFiles/rwkv.dir/build.make:76: CMakeFiles/rwkv.dir/rwkv.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:135: CMakeFiles/rwkv.dir/all] Error 2
gmake[1]: *** [Makefile:146: all] Error 2
gmake[1]: Leaving directory '/Users/james/Downloads/aitest/LocalAI/go-rwkv/rwkv.cpp'
make: *** [go-rwkv/librwkv.a] Error 2
james@mac LocalAI % wget https://gpt4all.io/models/ggml-gpt4all-j.bin -O models/ggml-gpt4all-j

--2023-05-30 12:10:06--  https://gpt4all.io/models/ggml-gpt4all-j.bin
Lookup gpt4all.io (gpt4all.io)... 104.26.0.159, 172.67.71.169, 104.26.1.159
connecting to gpt4all.io (gpt4all.io)|104.26.0.159|:443... connected.
HTTP-request send; waiting for response... 200 OK
Length: 3785248281 (3,5G)
Saved as: ‘models/ggml-gpt4all-j’

models/ggml-gpt4all 100%[===================>]   3,52G  10,3MB/s    in 5m 59s  

2023-05-30 12:16:06 (10,1 MB/s) - '‘models/ggml-gpt4all-j’' saved [3785248281/3785248281]

james@mac LocalAI % cp -rf prompt-templates/ggml-gpt4all-j.tmpl models/

james@mac LocalAI % ./local-ai --models-path ./models/ --debug
zsh: no such file or directory: ./local-ai

Additional context

Closing comment (2023-05-31T07:28:41Z): @Xonar92 thanks for the feedback. Closing as this is a dup of #411