netdur / llama_cpp_dart

dart binding for llama.cpp
MIT License
163 stars 19 forks source link

Compiling Llama.cpp and getting started #32

Open 49Simon opened 7 months ago

49Simon commented 7 months ago

I have cloned Llama.cpp and compiled it using the following command:

git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake .. -DBUILD_SHARED_LIBS=ON -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS
cmake --build . --config Release

I am using windows, and inside llama.cpp/build/Release dir, I found the following files:

ggml_shared.exp
ggml_shared.lib
ggml_static.lib
llama.exp
llama.lib

Then I copied the .lib files into the root of my flutter project. However, I can not run the flutter project. Is my compilation correct? Where do I copy the .lib files?

When I debug the code, it fails with the above error, even when not using any llama_cpp_dart stuff in my flutter project. If I remove the plugin from my pubsec.yaml, my flutter project runs fine.

The error:

Launching lib\main.dart on Windows in debug mode...
CMake Error at flutter/ephemeral/.plugin_symlinks/llama_cpp_dart/src/CMakeLists.txt:16 (add_subdirectory):
  add_subdirectory given source "./llama.cpp" which is not an existing
  directory.

Building Windows application...                                     79ms
Error: Unable to generate build files
Vinayak006 commented 2 months ago

@49Simon Did you find any solution?