Closed MarchLiu closed 4 months ago
Hey @MarchLiu on m-series macbooks using -DLLAMA_METAL_EMBED_LIBRARY=ON
should solve your problems:
mvn compile
mkdir build
cd build
cmake .. -DLLAMA_METAL_EMBED_LIBRARY=ON
cmake --build . --config Release
Note, that the Java binding already has a pre-built MacOS metal library and everything should work out of the box if used via Maven:
<dependency>
<groupId>de.kherud</groupId>
<artifactId>llama</artifactId>
<version>3.0.2</version>
</dependency>
If you don't want to use Maven, you can also download the pre-built shared libraries from here (artifacts
at the bottom): https://github.com/kherud/java-llama.cpp/actions/runs/8975246604
Otherwise, I can look for a solution on how to handle ggml-common.h
later today.
@kherud Thank you! It works !
hardware: macos m3
llama.cpp could be build and run fine.
I bulid library as documents
now I find the files in
src/main/resources/de/kherud/llama/Mac/aarch64
:When I run test
de.hkerud.llama.LlamaModelTest
, I got:I tried to modify cmake file
to
and run setup again. I found the
ggml-common.h
file insrc/main/resources/de/kherud/llama/Mac
. But the fatal message as before.where should i place the
ggml-common.h
?