abetlen / abetlen/llama-cpp-python

can not install llama-cpp-python

未关闭
#1,621 1 条评论 10 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
10.6k
派生
1.4k
平均合并
5 小时 23 分钟
30 天内合并 PR
5

描述

# 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
```

贡献指南

打开贡献指南

调研方向

该错误是汇编指令 'vpdpbusd' 未被识别,这很可能是由于 binutils 版本过旧,或 GCC 版本与 CPU 架构不匹配。检查 vendor/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o 中的 CMake 构建日志。调查构建标志,尤其是 '-march=native',并确认目标系统是否支持 AVX-512 VNNI。查看 llama.cpp 子模块的 CMakeLists.txt 和 ggml-quants.c 源代码,以了解量化代码路径。修复可能需要更新编译器工具链或调整 CMake 的 CPU 检测。

由索引模型根据 Issue 内容生成。

评估

技术栈
c, cmake, cpp, python
领域
build-system
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。