I am trying to set up local, high speed NLP but am failing to install the arm64 version of llama-cpp-python.
Even when I run
CMAKE_ARGS="-DLLAMA_METAL=on -DLLAMA_METAL_EMBED_LIBRARY=on" \ pip install llama-cpp-python --no-binary llama-cpp-python --force-reinstall --no-cache-dir I still get the same error when I try to import it:
RuntimeError: Failed to load shared library '/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib': dlopen(/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib, 0x0006): tried: '/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib' (no such file), '/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/llama_cpp/lib/libllama.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
Help would be greatly appreciated!
CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DGGML_METAL=on" pip install --upgrade --verbose --force-reinstall --no-cache-dir llama-cpp-python