li-plus / chatglm.cpp

C++ implementation of ChatGLM-6B & ChatGLM2-6B & ChatGLM3 & GLM4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmake --build build -j --config Release 命令报错

certhon opened this issue · comments

In file included from /Users/a1021500667/Documents/gpt/chatglm.cpp/chatglm.cpp:1:
/Users/a1021500667/Documents/gpt/chatglm.cpp/chatglm.h:546:13: error: no matching function for call to 'ggml_scale_inplace'
ggml_scale_inplace(gctx, attn_scores, ggml_new_f32(gctx, 1.f / std::sqrt(head_size))));
^~~~~~~~~~~~~~~~~~
/Users/a1021500667/Documents/gpt/chatglm.cpp/third_party/ggml/include/ggml/ggml.h:1158:35: note: candidate function not viable: no known conversion from 'struct ggml_tensor *' to 'float' for 3rd argument
GGML_API struct ggml_tensor * ggml_scale_inplace(
^
/Users/a1021500667/Documents/gpt/chatglm.cpp/chatglm.cpp:49:26: error: no member named 'n_dims' in 'ggml_tensor'
for (int i = tensor->n_dims - 1; i >= 0; i--) {
~~~~~~ ^
/Users/a1021500667/Documents/gpt/chatglm.cpp/chatglm.cpp:59:26: error: no member named 'n_dims' in 'ggml_tensor'
for (int i = tensor->n_dims - 1; i >= 0; i--) {
~~~~~~ ^
/Users/a1021500667/Documents/gpt/chatglm.cpp/chatglm.cpp:71:21: error: no member named 'n_dims' in 'ggml_tensor'
if (tensor->n_dims > 3)
~~~~~~ ^
/Users/a1021500667/Documents/gpt/chatglm.cpp/chatglm.cpp:74:25: error: no member named 'n_dims' in 'ggml_tensor'
if (tensor->n_dims > 2)
~~~~~~ ^
/Users/a1021500667/Documents/gpt/chatglm.cpp/chatglm.cpp:77:29: error: no member named 'n_dims' in 'ggml_tensor'

cmake version 3.29.0-rc1
python 3.9
cmake -B build命令无问题