You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried setting up llama-cpp-python in the current version 0.3.7 on my MacBook M4 Pro.
In the first step I only installed via pip install llama-cpp-python --no-cache-dir without specifiying the environment variable for Metal backend support.
I set the n_gpu_layers to -1 to fully use the GPU.
The interesting thing is the GPU was used even without having to install the Metal backend support as stated in the current documentation. I double checked this with a fresh start and explicitely setting the CMAKE_ARGS env variable and did not see and difference in terms of performance or GPU usage.
This is pretty handy, because when not using pip for dependency management (e.g. poetry) passing the environment variable did not work on my side.
I tried setting up
llama-cpp-python
in the current version0.3.7
on my MacBook M4 Pro.In the first step I only installed via
pip install llama-cpp-python --no-cache-dir
without specifiying the environment variable for Metal backend support.I set the
n_gpu_layers
to-1
to fully use the GPU.The interesting thing is the GPU was used even without having to install the Metal backend support as stated in the current documentation. I double checked this with a fresh start and explicitely setting the
CMAKE_ARGS
env variable and did not see and difference in terms of performance or GPU usage.This is pretty handy, because when not using
pip
for dependency management (e.g.poetry
) passing the environment variable did not work on my side.Maybe the documentation should be updated to state that the env arguments are no longer required? This would also reflect the documentation in https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md#metal-build where it states that: "On MacOS, Metal is enabled by default"
This would also mean, that custom pre-built wheels are no longer required as well.
The text was updated successfully, but these errors were encountered: