Skip to content

Can't compile go-bert.cpp, go-llama.cpp, bloomz.cpp etc. #18

Open
@Liphilmor

Description

I installed everything step by step.
I tried an seperated Container but same there.

I get following message when running the autogpt4all.py or .sh

root@d2c36eb3a44c:/home/autogpt4all# python3 autogpt4all.py
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
golang is already the newest version (2:1.18~0ubuntu2).
cmake is already the newest version (3.22.1-1ubuntu1.22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Already up to date.
go mod edit -replace github.com/go-skynet/go-llama.cpp=/home/autogpt4all/LocalAI/go-llama
go mod edit -replace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang=/home/autogpt4all/LocalAI/gpt4all/gpt4all-bindings/golang
go mod edit -replace github.com/go-skynet/go-ggml-transformers.cpp=/home/autogpt4all/LocalAI/go-ggml-transformers
go mod edit -replace github.com/donomii/go-rwkv.cpp=/home/autogpt4all/LocalAI/go-rwkv
go mod edit -replace github.com/ggerganov/whisper.cpp=/home/autogpt4all/LocalAI/whisper.cpp
go mod edit -replace github.com/go-skynet/go-bert.cpp=/home/autogpt4all/LocalAI/go-bert
go mod edit -replace github.com/go-skynet/bloomz.cpp=/home/autogpt4all/LocalAI/bloomz
go mod edit -replace github.com/mudler/go-stable-diffusion=/home/autogpt4all/LocalAI/go-stable-diffusion
go mod edit -replace github.com/mudler/go-piper=/home/autogpt4all/LocalAI/go-piper
go mod download
touch prepare
I local-ai build info:
I BUILD_TYPE:
I GO_TAGS:
I LD_FLAGS: -X "github.com/go-skynet/LocalAI/internal.Version=v1.20.1-4-ga6839fd-dirty" -X "github.com/go-skynet/LocalAI/internal.Commit=a6839fd23827672aeab5988b344a2a34d7e44e6a"
CGO_LDFLAGS="" C_INCLUDE_PATH=/home/autogpt4all/LocalAI/go-llama:/home/autogpt4all/LocalAI/go-stable-diffusion/:/home/autogpt4all/LocalAI/gpt4all/gpt4all-bindings/golang/:/home/autogpt4all/LocalAI/go-ggml-transformers:/home/autogpt4all/LocalAI/go-rwkv:/home/autogpt4all/LocalAI/whisper.cpp:/home/autogpt4all/LocalAI/go-bert:/home/autogpt4all/LocalAI/bloomz LIBRARY_PATH=/home/autogpt4all/LocalAI/go-piper:/home/autogpt4all/LocalAI/go-llama:/home/autogpt4all/LocalAI/go-stable-diffusion/:/home/autogpt4all/LocalAI/gpt4all/gpt4all-bindings/golang/:/home/autogpt4all/LocalAI/go-ggml-transformers:/home/autogpt4all/LocalAI/go-rwkv:/home/autogpt4all/LocalAI/whisper.cpp:/home/autogpt4all/LocalAI/go-bert:/home/autogpt4all/LocalAI/bloomz go build -ldflags "-X "github.com/go-skynet/LocalAI/internal.Version=v1.20.1-4-ga6839fd-dirty" -X "github.com/go-skynet/LocalAI/internal.Commit=a6839fd23827672aeab5988b344a2a34d7e44e6a"" -tags "" -o local-ai ./
# github.com/go-skynet/go-bert.cpp
In file included from gobert.cpp:6:
go-bert/bert.cpp/bert.cpp: In function 'bert_ctx* bert_load_from_file(const char*)':
go-bert/bert.cpp/bert.cpp:610:89: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'int64_t' {aka 'long int'} [-Wformat=]
  610 |                 fprintf(stderr, "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%lld, %lld]\n",
      |                                                                                      ~~~^
      |                                                                                         |
      |                                                                                         long long int
      |                                                                                      %ld
  611 |                         __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
      |                                                ~~~~~~~~~~~~~
      |                                                            |
      |                                                            int64_t {aka long int}
go-bert/bert.cpp/bert.cpp:610:95: warning: format '%lld' expects argument of type 'long long int', but argument 6 has type 'int64_t' {aka 'long int'} [-Wformat=]
  610 |                 fprintf(stderr, "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%lld, %lld]\n",
      |                                                                                            ~~~^
      |                                                                                               |
      |                                                                                               long long int
      |                                                                                            %ld
  611 |                         __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
      |                                                               ~~~~~~~~~~~~~
      |                                                                           |
      |                                                                           int64_t {aka long int}
go-bert/bert.cpp/bert.cpp:610:112: warning: format '%lld' expects argument of type 'long long int', but argument 7 has type 'int64_t' {aka 'long int'} [-Wformat=]
  610 |                 fprintf(stderr, "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%lld, %lld]\n",
      |                                                                                                             ~~~^
      |                                                                                                                |
      |                                                                                                                long long int
      |                                                                                                             %ld
  611 |                         __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
      |                                                                              ~~~~~
      |                                                                                  |
      |                                                                                  int64_t {aka long int}
go-bert/bert.cpp/bert.cpp:610:118: warning: format '%lld' expects argument of type 'long long int', but argument 8 has type 'int64_t' {aka 'long int'} [-Wformat=]
  610 |                 fprintf(stderr, "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%lld, %lld]\n",
      |                                                                                                                   ~~~^
      |                                                                                                                      |
      |                                                                                                                      long long int
      |                                                                                                                   %ld
  611 |                         __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
      |                                                                                     ~~~~~
      |                                                                                         |
      |                                                                                         int64_t {aka long int}
go-bert/bert.cpp/bert.cpp:624:37: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'int64_t' {aka 'long int'} [-Wformat=]
  624 |                 printf("%24s - [%5lld, %5lld], type = %6s, %6.2f MB, %9zu bytes\n", name.data(), ne[0], ne[1], ftype_str[ftype], ggml_bert_nbytes(tensor) / 1024.0 / 1024.0, ggml_bert_nbytes(tensor));
      |                                 ~~~~^                                                            ~~~~~
      |                                     |                                                                |
      |                                     long long int                                                    int64_t {aka long int}
      |                                 %5ld
go-bert/bert.cpp/bert.cpp:624:44: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'int64_t' {aka 'long int'} [-Wformat=]
  624 |                 printf("%24s - [%5lld, %5lld], type = %6s, %6.2f MB, %9zu bytes\n", name.data(), ne[0], ne[1], ftype_str[ftype], ggml_bert_nbytes(tensor) / 1024.0 / 1024.0, ggml_bert_nbytes(tensor));
      |                                        ~~~~^                                                            ~~~~~
      |                                            |                                                                |
      |                                            long long int                                                    int64_t {aka long int}
      |                                        %5ld
go-bert/bert.cpp/bert.cpp:655:101: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type 'long unsigned int' [-Wformat=]
  655 |                 fprintf(stderr, "%s: tensor '%s' has wrong size in model file: got %zu, expected %llu\n",
      |                                                                                                  ~~~^
      |                                                                                                     |
      |                                                                                                     long long unsigned int
      |                                                                                                  %lu
  656 |                         __func__, name.data(), ggml_bert_nbytes(tensor), nelements * bpe);
      |                                                                          ~~~~~~~~~~~~~~~
      |                                                                                    |
      |                                                                                    long unsigned int
go-bert/bert.cpp/bert.cpp:692:32: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
  692 |     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));
      |                               ~^                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                |                                                                 |
      |                                int                                                               size_t {aka long unsigned int}
      |                               %ld
go-bert/bert.cpp/bert.cpp:692:55: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'int64_t' {aka 'long int'} [-Wformat=]
  692 |     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));
      |                                                    ~~~^                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                       |                                                                               |
      |                                                       long long int                                                                   int64_t {aka long int}
      |                                                    %ld
# github.com/go-skynet/go-llama.cpp
binding.cpp: In function 'void* load_model(const char*, int, int, bool, bool, bool, bool, bool, bool, int, int, const char*, const char*, bool)':
binding.cpp:634:35: warning: 'llama_context* llama_init_from_file(const char*, llama_context_params*)' is deprecated: please use llama_load_model_from_file combined with llama_new_context_with_model instead [-Wdeprecated-declarations]
  634 |         res = llama_init_from_file(fname, &lparams);
      |               ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from go-llama/llama.cpp/examples/common.h:5,
                 from binding.cpp:1:
go-llama/llama.cpp/llama.h:164:49: note: declared here
  164 |     LLAMA_API DEPRECATED(struct llama_context * llama_init_from_file(
      |                                                 ^~~~~~~~~~~~~~~~~~~~
go-llama/llama.cpp/llama.h:30:36: note: in definition of macro 'DEPRECATED'
   30 | #    define DEPRECATED(func, hint) func __attribute__((deprecated(hint)))
      |                                    ^~~~
# github.com/go-skynet/bloomz.cpp
bloomz.cpp: In function 'bool bloom_model_load(const string&, bloom_model&, gpt_bloomz_vocab&, int)':
bloomz.cpp:432:89: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'int64_t' {aka 'long int'} [-Wformat=]
  432 |                                 "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%d, %d]\n",
      |                                                                                      ~~~^
      |                                                                                         |
      |                                                                                         long long int
      |                                                                                      %ld
  433 |                                 __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
      |                                                        ~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    int64_t {aka long int}
bloomz.cpp:432:95: warning: format '%lld' expects argument of type 'long long int', but argument 6 has type 'int64_t' {aka 'long int'} [-Wformat=]
  432 |                                 "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%d, %d]\n",
      |                                                                                            ~~~^
      |                                                                                               |
      |                                                                                               long long int
      |                                                                                            %ld
  433 |                                 __func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
      |                                                                       ~~~~~~~~~~~~~
      |                                                                                   |
      |                                                                                   int64_t {aka long int}
bloomz.cpp:440:93: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'int64_t' {aka 'long int'} [-Wformat=]
  440 |                                     "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%d, %d]\n",
      |                                                                                          ~~~^
      |                                                                                             |
      |                                                                                             long long int
      |                                                                                          %ld
  441 |                                     __func__, name.data(), tensor->ne[0] / n_parts, tensor->ne[1], ne[0], ne[1]);
      |                                                            ~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          int64_t {aka long int}
bloomz.cpp:440:99: warning: format '%lld' expects argument of type 'long long int', but argument 6 has type 'int64_t' {aka 'long int'} [-Wformat=]
  440 |                                     "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%d, %d]\n",
      |                                                                                                ~~~^
      |                                                                                                   |
      |                                                                                                   long long int
      |                                                                                                %ld
  441 |                                     __func__, name.data(), tensor->ne[0] / n_parts, tensor->ne[1], ne[0], ne[1]);
      |                                                                                     ~~~~~~~~~~~~~
      |                                                                                                 |
      |                                                                                                 int64_t {aka long int}
bloomz.cpp:447:93: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'int64_t' {aka 'long int'} [-Wformat=]
  447 |                                     "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%d, %d]\n",
      |                                                                                          ~~~^
      |                                                                                             |
      |                                                                                             long long int
      |                                                                                          %ld
  448 |                                     __func__, name.data(), tensor->ne[0], tensor->ne[1] / n_parts, ne[0], ne[1]);
      |                                                            ~~~~~~~~~~~~~
      |                                                                        |
      |                                                                        int64_t {aka long int}
bloomz.cpp:447:99: warning: format '%lld' expects argument of type 'long long int', but argument 6 has type 'int64_t' {aka 'long int'} [-Wformat=]
  447 |                                     "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld], expected [%d, %d]\n",
      |                                                                                                ~~~^
      |                                                                                                   |
      |                                                                                                   long long int
      |                                                                                                %ld
  448 |                                     __func__, name.data(), tensor->ne[0], tensor->ne[1] / n_parts, ne[0], ne[1]);
      |                                                                           ~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                         |
      |                                                                                         int64_t {aka long int}
# github.com/go-skynet/go-ggml-transformers.cpp
In file included from replit.cpp:21:
ggml.cpp/examples/replit/main.cpp: In function 'bool replit_model_load(const string&, replit_model&, replit_tokenizer&)':
ggml.cpp/examples/replit/main.cpp:345:56: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'long int' [-Wformat=]
  345 |         printf("%s: memory_size = %8.2f MB, n_mem = %lld\n", __func__, memory_size / 1024.0 / 1024.0, n_mem);
      |                                                     ~~~^                                              ~~~~~
      |                                                        |                                              |
      |                                                        long long int                                  long int
      |                                                     %ld
replit.cpp: In function 'int replit_predict(void*, void*, char*)':
replit.cpp:65:31: warning: format '%d' expects argument of type 'int', but argument 4 has type '__gnu_cxx::__alloc_traits<std::allocator<long unsigned int>, long unsigned int>::value_type' {aka 'long unsigned int'} [-Wformat=]
   65 |     printf("%s: token[%d] = %6d\n", __func__, i, embd_inp[i]);
      |                             ~~^
      |                               |
      |                               int
      |                             %6ld
Already up to date.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions