Windows: conflicts with llama-cpp-python 0.3.37 ggml DLLs in the same process
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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_cppimported first,llama-cpp-python0.3.37:ggml-pythoncalls into llama-cpp's newer ggml build and crashes. For exampleggml_gallocr_new(ggml_backend_get_default_buffer_type(backend))raisesOSError: exception: access violation writing 0x0000000000000000. Withllama-cpp-python0.3.36 the same code works.ggmlimported first (either version):llama_cppfails to load withFailed 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.
- Dominant language
- Python
- Stars
- 152
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from abetlen/ggml-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
abetlen/ggml-python#91 ·
-
Import errorOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
abetlen/ggml-python#90 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
abetlen/ggml-python#93 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
abetlen/ggml-python#92 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
abetlen/ggml-python#21 ·
All issues in abetlen/ggml-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
abetlen/llama-cpp-python#2424 ·
Maintainers usually reply within 1 day
-
Bug IronPython Python 3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pyrevitlabs/pyRevit#4184 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 74/100
jqueryscript/awesome-claude-code#1009 ·
-
tests
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day