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

Abierto
#202 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
backend, devtools

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
152
Forks
17
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de abetlen/ggml-python

Todos los issues de abetlen/ggml-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.