abetlen / abetlen/llama-cpp-python
can not install llama-cpp-python
- Ngôn ngữ chính
- Python
- Star
- 10.6k
- Fork
- 1.4k
- Merge trung bình
- 5 giờ 23 phút
- Pull request đã merge (30 ngày)
- 5
Mô tả
# Prerequisites
pip install llama-cpp-python --verbose
# Environment and Context
```
$ python3 --version
Python 3.12.3
$ make --version
GNU Make 3.82
$ g++ --version
gcc (GCC) 11.2.0
```
# Failure Logs
[11/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/g++ -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/common/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -O3 -DNDEBUG -fPIC -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/train.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/train.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/train.cpp.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/common/train.cpp
[12/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/g++ -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/common/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -O3 -DNDEBUG -fPIC -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/ngram-cache.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/ngram-cache.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/ngram-cache.cpp.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/common/ngram-cache.cpp
[13/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/g++ -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/common/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/examples/llava/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/examples/llava/../.. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/examples/llava/../../common -O3 -DNDEBUG -MD -MT vendor/llama.cpp/examples/llava/CMakeFiles/llama-llava-cli.dir/llava-cli.cpp.o -MF vendor/llama.cpp/examples/llava/CMakeFiles/llama-llava-cli.dir/llava-cli.cpp.o.d -o vendor/llama.cpp/examples/llava/CMakeFiles/llama-llava-cli.dir/llava-cli.cpp.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/examples/llava/llava-cli.cpp
[14/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/gcc -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -DGGML_BUILD -DGGML_SCHED_MAX_COPIES=4 -DGGML_SHARED -DGGML_USE_LLAMAFILE -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -Dggml_EXPORTS -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/. -O3 -DNDEBUG -std=gnu11 -fPIC -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wdouble-promotion -march=native -MD -MT vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o -MF vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o.d -o vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/ggml-quants.c
FAILED: vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o
/mnt/petrelfs/share/gcc/gcc-11.2.0/bin/gcc -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -DGGML_BUILD -DGGML_SCHED_MAX_COPIES=4 -DGGML_SHARED -DGGML_USE_LLAMAFILE -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -Dggml_EXPORTS -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/. -O3 -DNDEBUG -std=gnu11 -fPIC -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wdouble-promotion -march=native -MD -MT vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o -MF vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o.d -o vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/ggml-quants.c
/tmp/ccHC5BsH.s: Assembler messages:
/tmp/ccHC5BsH.s:32105: Error: no such instruction: `vpdpbusd %ymm0,%ymm4,%ymm2'
/tmp/ccHC5BsH.s:32161: Error: no such instruction: `vpdpbusd 4(%r9),%ymm0,%ymm2'
/tmp/ccHC5BsH.s:32227: Error: no such instruction: `vpdpbusd %ymm1,%ymm4,%ymm0'
/tmp/ccHC5BsH.s:32295: Error: no such instruction: `vpdpbusd 4(%r9),%ymm0,%ymm1'
/tmp/ccHC5BsH.s:32346: Error: no such instruction: `vpdpbusd %ymm2,%ymm4,%ymm1'
[15/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/gcc -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -DGGML_BUILD -DGGML_SCHED_MAX_COPIES=4 -DGGML_SHARED -DGGML_USE_LLAMAFILE -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -Dggml_EXPORTS -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/. -O3 -DNDEBUG -std=gnu11 -fPIC -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wdouble-promotion -march=native -MD -MT vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml.c.o -MF vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml.c.o.d -o vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml.c.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/ggml.c
[16/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/g++ -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -DLLAMA_BUILD -DLLAMA_SHARED -Dllama_EXPORTS -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -O3 -DNDEBUG -fPIC -MD -MT vendor/llama.cpp/src/CMakeFiles/llama.dir/unicode.cpp.o -MF vendor/llama.cpp/src/CMakeFiles/llama.dir/unicode.cpp.o.d -o vendor/llama.cpp/src/CMakeFiles/llama.dir/unicode.cpp.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/unicode.cpp
[17/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/g++ -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -DLLAMA_BUILD -DLLAMA_SHARED -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/examples/llava/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/examples/llava/../.. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/examples/llava/../../common -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/../include -O3 -DNDEBUG -fPIC -Wno-cast-qual -MD -MT vendor/llama.cpp/examples/llava/CMakeFiles/llava.dir/clip.cpp.o -MF vendor/llama.cpp/examples/llava/CMakeFiles/llava.dir/clip.cpp.o.d -o vendor/llama.cpp/examples/llava/CMakeFiles/llava.dir/clip.cpp.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/examples/llava/clip.cpp
[18/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/g++ -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/common/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -O3 -DNDEBUG -fPIC -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/json-schema-to-grammar.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/json-schema-to-grammar.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/json-schema-to-grammar.cpp.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/common/json-schema-to-grammar.cpp
[19/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/g++ -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/common/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -O3 -DNDEBUG -fPIC -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/common/common.cpp
[20/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/g++ -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -DLLAMA_BUILD -DLLAMA_SHARED -Dllama_EXPORTS -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -O3 -DNDEBUG -fPIC -MD -MT vendor/llama.cpp/src/CMakeFiles/llama.dir/unicode-data.cpp.o -MF vendor/llama.cpp/src/CMakeFiles/llama.dir/unicode-data.cpp.o.d -o vendor/llama.cpp/src/CMakeFiles/llama.dir/unicode-data.cpp.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/unicode-data.cpp
[21/27] /mnt/petrelfs/share/gcc/gcc-11.2.0/bin/g++ -pthread -B /mnt/petrelfs/yaoshuo/miniconda3/compiler_compat -DLLAMA_BUILD -DLLAMA_SHARED -Dllama_EXPORTS -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/. -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/../include -I/tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/ggml/src/../include -O3 -DNDEBUG -fPIC -MD -MT vendor/llama.cpp/src/CMakeFiles/llama.dir/llama.cpp.o -MF vendor/llama.cpp/src/CMakeFiles/llama.dir/llama.cpp.o.d -o vendor/llama.cpp/src/CMakeFiles/llama.dir/llama.cpp.o -c /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c/vendor/llama.cpp/src/llama.cpp
ninja: build stopped: subcommand failed.
*** CMake build failed
error: subprocess-exited-with-error
× Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /mnt/petrelfs/yaoshuo/miniconda3/bin/python /mnt/petrelfs/yaoshuo/miniconda3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpv0ch2zhp
cwd: /tmp/pip-install-4ml_mygh/llama-cpp-python_051c2755478e4ca59d901bbc1e18867c
Building wheel for llama-cpp-python (pyproject.toml) ... error
ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Lỗi là lệnh assembler 'vpdpbusd' không được nhận diện, nhiều khả năng do binutils cũ hoặc sự không tương thích phiên bản giữa GCC và kiến trúc CPU. Kiểm tra các build log của CMake trong vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o. Điều tra các build flag, đặc biệt là '-march=native', và xem hệ thống đích có hỗ trợ AVX-512 VNNI hay không. Xem CMakeLists.txt của submodule llama.cpp và mã nguồn ggml-quants.c để hiểu đường dẫn mã lượng tử hóa. Cách khắc phục có thể là cập nhật compiler toolchain hoặc điều chỉnh cơ chế phát hiện CPU của CMake.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- c, cmake, cpp, python
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100