Windows: conflicts with llama-cpp-python 0.3.37 ggml DLLs in the same process

Đang mở
#202 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend, devtools

Hướng nghiên cứu

Start by reviewing the Windows DLL loading and bundled ggml library naming in ggml-python, then compare the bundled ggml version with llama-cpp-python 0.3.37. Use the linked Windows CI matrix to reproduce both import orders on Python 3.11. Done means both packages import and the reported ggml call works in either order on Windows.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

On Windows, when ggml-python 0.0.45 and llama-cpp-python are used in the same process, both packages load a DLL named ggml and the second import reuses the one already loaded:

  • llama_cpp imported first, llama-cpp-python 0.3.37: ggml-python calls into llama-cpp's newer ggml build and crashes. For example ggml_gallocr_new(ggml_backend_get_default_buffer_type(backend)) raises OSError: exception: access violation writing 0x0000000000000000. With llama-cpp-python 0.3.36 the same code works.
  • ggml imported first (either version): llama_cpp fails to load with Failed to load shared library '...\llama_cpp\lib\llama.dll': [WinError 127] The specified procedure could not be found.

Linux and macOS are not affected. A Windows CI matrix that reproduces both cases is here: https://github.com/MaiAditya/txtai/actions/runs/44072580894 (Python 3.11, windows-latest). This came up in txtai, see neuml/txtai#1584.

Would updating the bundled ggml to the version used by current llama-cpp-python releases be possible? That would make the first case work again. Longer term, giving the bundled DLLs a package-specific name would avoid the clash entirely.

Ngôn ngữ chính
Python
Star
152
Fork
17
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của abetlen/ggml-python

Tất cả issue của abetlen/ggml-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.