-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this library working on IOS #52
Comments
Here are my steps for macOS those might help for iOS too: git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
mkdir build
cd build
git checkout b4138
cmake .. \
-DLLAMA_FATAL_WARNINGS=ON \
-DLLAMA_CURL=ON \
-DGGML_RPC=ON \
-DBUILD_SHARED_LIBS=ON \
-DLLAMA_NATIVE=ON
cmake --build . --config Release -j $(nproc)
cp src/libllama.so ../.. Also keep in mind to set in your code |
I also have failed to run the model on my A12 Bionic. The closest I could get is with the following build command, which then leads to
However, I do get logs from the model, such as
|
This, perhaps, may not be related to the issue, but having had difficulties with this library, I iterated over all other methods to run the local inference with Flutter, and after a while, I managed to use Flutter channels and llama.swift example. You have to dig into native code a bit, but I am happy to share my workaround if anyone is interested. |
@netdur what about to ship the dependencies? I checked the latest commits you still don't really document which version is exactly required to make it working I'm working on something else, but with the same problem. I came across this article which was a bit enlightening for me: https://dev.to/leehack/how-to-use-golang-in-flutter-application-golang-ffi-1950 Most interesting is this part here:
With those commands you can combine the different architectures to a single binary for the emulator and to ship everything you need to build such a framework which you can generate with a shell command. |
you check dependency here https://github.com/netdur/llama_cpp_dart/tree/main/src clone the repo and then run darwin/run_build.sh to build llama and place binaries in bin folder also darwin//run fix_rpath to fix binaries rpath and signing if you look at those script, they can easily be modified to build for ios |
I used code similar to test_isolated.dart. There was no error when loading the model, but when I sent a prompt to the model, there was no response, even after waiting for 10 minutes. My phone is a 16 Pro, and the model I tried is Gemma-2-2B.
The text was updated successfully, but these errors were encountered: