jankammerath / LlamaCppSample

Repository from Github https://github.comjankammerath/LlamaCppSampleRepository from Github https://github.comjankammerath/LlamaCppSample

Llama.cpp Sample

This is a sample boilerplate application that shows how to include and link llama.cpp in any C++ application. It is based on the simple example from llama.cpp and was used as part of my Medium article The Resurgence of C++ through Llama.cpp, CUDA & Metal.

Screenshot of this sample on macOS

Building llama.cpp

There is llama.cpp in homebrew, but I did not test that yet. Best is to check out llama.cpp and build it yourself.

cmake -B build -DBUILD_SHARED_LIBS=ON
cmake --build build --config Release

Shared libs needs to be on as otherwise, you have no shared libs to link!

About


Languages

Language:C++ 73.8%Language:CMake 17.6%Language:Shell 8.6%