text-generation-inference/backends/llamacpp/README.md
Hugo Larcher 59b0ef3018
feat: Fix Cmakelist to allow building on Darwin platform (#2785)
* feat: Fix Cmakelist to allow building on Darwin platform
* fix: Fix tokenizer in llama.cpp Dockerfile
2024-11-29 00:31:36 +01:00

559 B

Compiling with MacOS

To compile the Llama.cpp backend on MacOS, you need to install clang and cmake via Homebrew:

brew install llvm cmake

You then need to configure CMakelists.txt to use the newly installed clang compiler. You can do this by configuring your IDE or adding the following lines to the top of the file:

set(CMAKE_C_COMPILER /opt/homebrew/opt/llvm/bin/clang)
set(CMAKE_CXX_COMPILER /opt/homebrew/opt/llvm/bin/clang++)

CMakelist.txt assumes that Homebrew installs libc++ in $HOMEBREW_PREFIX/opt/llvm/lib/c++.