abetlen / llama-cpp-python

Python bindings for llama.cpp
https://llama-cpp-python.readthedocs.io
MIT License
7.81k stars 934 forks source link

Installing the pre-built v0.2.85 – v0.3.0 Metal wheels for Python 3.9 – 3.12 yields `Bad magic number for file header` #1650

Open lsorber opened 1 month ago

lsorber commented 1 month ago

Expected Behavior

Installing the pre-built v0.2.85 Metal wheels works for all supported versions of Python.

Current Behavior

Installing the pre-built v0.2.85 Metal wheels for Python {3.10, 3.11} yields Bad magic number for file header. The Python {3.9, 3.12} versions work as expected.

Environment and Context

macOS 14 on a MacBook Pro M1 Max

Steps to Reproduce

You can test this by downloading the wheels and trying to decompress them:

Decompressing fails for:

Decompressing works for:

lsorber commented 1 month ago

Update: I see that the pre-built v0.2.85 Metal wheels produced by the GitHub Actions workflow seem to work fine [1], so the issue must be with the way that the artifacts are turned into a release.

[1] https://github.com/abetlen/llama-cpp-python/actions/runs/10183985970

lsorber commented 1 month ago

Still an issue for v0.2.86 and v0.2.87. Interestingly, for v0.2.86 only the Python 3.10 version works.

lsorber commented 4 days ago

Still an issue for all v0.3.0 Metal builds: https://github.com/abetlen/llama-cpp-python/releases/tag/v0.3.0-metal. To verify that this is an issue, simply download the wheel file and try to decompress it.