我正在尝试在我的 Linux Mint 20.3 Cinnamon 上安装 Alpaca。但是,当涉及到 Make 部分时,我得到以下输出
(base) ricc@ricc-K5:/mnt/Storage/software/dalai$ npx dalai alpaca install 7B --home /mnt/Storage/software/dalai
mkdir /mnt/Storage/software/dalai
{ method: 'install', callparams: [ '7B' ] }
mkdir /mnt/Storage/software/dalai/alpaca
try fetching /mnt/Storage/software/dalai/alpaca https://github.com/ItsPi3141/alpaca.cpp
[E] Pull TypeError: Cannot read properties of null (reading 'split')
at new GitConfig (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/isomorphic-git/index.cjs:1604:30)
at GitConfig.from (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/isomorphic-git/index.cjs:1627:12)
at GitConfigManager.get (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/isomorphic-git/index.cjs:1750:22)
at async _getConfig (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/isomorphic-git/index.cjs:5397:18)
at async normalizeAuthorObject (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/isomorphic-git/index.cjs:5407:19)
at async Object.pull (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/isomorphic-git/index.cjs:11682:20)
at async Dalai.add (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:394:7)
at async Dalai.install (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:346:5) {
caller: 'git.pull'
}
try cloning /mnt/Storage/software/dalai/alpaca https://github.com/ItsPi3141/alpaca.cpp
next alpaca [AsyncFunction: make]
exec: make in /mnt/Storage/software/dalai/alpaca
make
exit
(base) ricc@ricc-K5:/mnt/Storage/software/dalai/alpaca$ make
I llama.cpp build info:
I UNAME_S: Linux
I UNAME_P: x86_64
I UNAME_M: x86_64
I CFLAGS: -I. -O3 -DNDEBUG -std=c11 -fPIC -pthread -mavx -msse3
I CXXFLAGS: -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread
I LDFLAGS:
I CC: cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
I CXX: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
cc -I. -O3 -DNDEBUG -std=c11 -fPIC -pthread -mavx -msse3 -c ggml.c -o ggml.o
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:109,
from ggml.c:155:
ggml.c: In function ‘ggml_vec_dot_f16’:
/usr/lib/gcc/x86_64-linux-gnu/9/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
52 | _mm256_cvtph_ps (__m128i __A)
| ^~~~~~~~~~~~~~~
ggml.c:911:33: note: called from here
911 | #define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i *)(x)))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ggml.c:921:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
921 | #define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
| ^~~~~~~~~~~~~~~~
ggml.c:1274:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
1274 | ay[j] = GGML_F16_VEC_LOAD(y + i + j*GGML_F16_EPR, j);
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:109,
from ggml.c:155:
/usr/lib/gcc/x86_64-linux-gnu/9/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
52 | _mm256_cvtph_ps (__m128i __A)
| ^~~~~~~~~~~~~~~
ggml.c:911:33: note: called from here
911 | #define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i *)(x)))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ggml.c:921:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
921 | #define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
| ^~~~~~~~~~~~~~~~
ggml.c:1273:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
1273 | ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j);
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:109,
from ggml.c:155:
/usr/lib/gcc/x86_64-linux-gnu/9/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
52 | _mm256_cvtph_ps (__m128i __A)
| ^~~~~~~~~~~~~~~
ggml.c:911:33: note: called from here
911 | #define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i *)(x)))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ggml.c:921:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
921 | #define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
| ^~~~~~~~~~~~~~~~
ggml.c:1273:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
1273 | ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j);
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:109,
from ggml.c:155:
/usr/lib/gcc/x86_64-linux-gnu/9/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
52 | _mm256_cvtph_ps (__m128i __A)
| ^~~~~~~~~~~~~~~
ggml.c:911:33: note: called from here
911 | #define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i *)(x)))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ggml.c:921:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
921 | #define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
| ^~~~~~~~~~~~~~~~
ggml.c:1274:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
1274 | ay[j] = GGML_F16_VEC_LOAD(y + i + j*GGML_F16_EPR, j);
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:109,
from ggml.c:155:
/usr/lib/gcc/x86_64-linux-gnu/9/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
52 | _mm256_cvtph_ps (__m128i __A)
| ^~~~~~~~~~~~~~~
ggml.c:911:33: note: called from here
911 | #define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i *)(x)))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ggml.c:921:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
921 | #define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
| ^~~~~~~~~~~~~~~~
ggml.c:1273:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
1273 | ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j);
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:109,
from ggml.c:155:
/usr/lib/gcc/x86_64-linux-gnu/9/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
52 | _mm256_cvtph_ps (__m128i __A)
| ^~~~~~~~~~~~~~~
ggml.c:911:33: note: called from here
911 | #define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i *)(x)))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ggml.c:921:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
921 | #define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
| ^~~~~~~~~~~~~~~~
ggml.c:1274:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
1274 | ay[j] = GGML_F16_VEC_LOAD(y + i + j*GGML_F16_EPR, j);
| ^~~~~~~~~~~~~~~~~
make: *** [Makefile:186: ggml.o] Errore 1
(base) ricc@ricc-K5:/mnt/Storage/software/dalai/alpaca$ exit
exit
ERROR Error: running 'make' failed
at Alpaca.make (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/alpaca.js:51:15)
at async Dalai.add (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:412:5)
at async Dalai.install (/home/ricc/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:346:5)
我相信这是因为不适当/不完整的标志。但是我对此没有专业知识。这是问题可能所在的特定于体系结构的 Makefile 部分。知道如何调整它吗?
# Architecture specific
# TODO: probably these flags need to be tweaked on some architectures
# feel free to update the Makefile for your architecture and send a pull request or issue
ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
ifeq ($(UNAME_S),Darwin)
CFLAGS += -mf16c
AVX1_M := $(shell sysctl machdep.cpu.features)
ifneq (,$(findstring FMA,$(AVX1_M)))
CFLAGS += -mfma
endif
ifneq (,$(findstring AVX1.0,$(AVX1_M)))
CFLAGS += -mavx
endif
AVX2_M := $(shell sysctl machdep.cpu.leaf7_features)
ifneq (,$(findstring AVX2,$(AVX2_M)))
CFLAGS += -mavx2
endif
else ifeq ($(UNAME_S),Linux)
AVX1_M := $(shell grep "avx " /proc/cpuinfo)
ifneq (,$(findstring avx,$(AVX1_M)))
CFLAGS += -mavx
endif
AVX2_M := $(shell grep "avx2 " /proc/cpuinfo)
ifneq (,$(findstring avx2,$(AVX2_M)))
CFLAGS += -mavx2
endif
FMA_M := $(shell grep "fma " /proc/cpuinfo)
ifneq (,$(findstring fma,$(FMA_M)))
CFLAGS += -mfma
endif
F16C_M := $(shell grep "f16c " /proc/cpuinfo)
ifneq (,$(findstring f16c,$(F16C_M)))
CFLAGS += -mf16c
endif
SSE3_M := $(shell grep "sse3 " /proc/cpuinfo)
ifneq (,$(findstring sse3,$(SSE3_M)))
CFLAGS += -msse3
endif
else ifeq ($(UNAME_S),Haiku)