li-plus / chatglm.cpp

C++ implementation of ChatGLM-6B & ChatGLM2-6B & ChatGLM3 & GLM4
MIT License
2.84k stars 327 forks source link

macos m2 芯片最后一步出现Illegal instruction: 4 #258

Closed Ventery closed 5 months ago

Ventery commented 5 months ago

model是chatgml3-6b 似乎是个老问题 已经解决了 修改文件内容 third_party/ggml/src/CMakeLists.txt

将 if (SYSCTL_M MATCHES "1")

set(UNAME_P "arm")

    #set(UNAME_M "arm64")

两个井号去掉 然后在外面加上一句 set (CMAKE_SYSTEM_PROCESSOR "arm64")

保存后重新按流程build一遍就行了