hybrid-llama/turboquant/examples/simple-cmake-pkg
Marvin 1dd0700988 hybrid-llama: merge ik_llama IQK CPU GEMM into TurboQuant fork
Base: AtomicBot-ai/atomic-llama-cpp-turboquant @ cd5609390. IQK source: ikawrakow/ik_llama.cpp @ fe215a8c (ggml/src/iqk only).

- GGML_IQK_MUL_MAT / GGML_IQK_FLASH_ATTENTION options (default OFF)

- 57 IQK repacked types, blocks, traits; IQK hooks in ggml_compute_forward_mul_mat

- ggml-cpu with IQK ON builds and links; IQK OFF build unaffected

Assisted-by: opencode (Muse Spark)
2026-09-05 18:09:49 -03:00
..
.gitignore hybrid-llama: merge ik_llama IQK CPU GEMM into TurboQuant fork 2026-09-05 18:09:49 -03:00
CMakeLists.txt hybrid-llama: merge ik_llama IQK CPU GEMM into TurboQuant fork 2026-09-05 18:09:49 -03:00
README.md hybrid-llama: merge ik_llama IQK CPU GEMM into TurboQuant fork 2026-09-05 18:09:49 -03:00

README.md

llama.cpp/example/simple-cmake-pkg

This program builds simple using a relocatable CMake package. It serves as an example of using the find_package() CMake command to conveniently include llama.cpp in projects which live outside of the source tree.

Building

Because this example is "outside of the source tree", it is important to first build/install llama.cpp using CMake. An example is provided here, but please see the llama.cpp build instructions for more detailed build instructions.

Considerations

When hardware acceleration libraries are used (e.g. CUDA, Metal, Vulkan, etc.), the appropriate dependencies will be searched for automatically. So, for example, when finding a package

Build llama.cpp and install to llama.cpp/inst

git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
cmake -S . -B build
cmake --build build
cmake --install build --prefix inst

Build simple-cmake-pkg

cd examples/simple-cmake-pkg
cmake -S . -B build -DCMAKE_PREFIX_PATH=../../inst/lib/cmake
cmake --build build

Run simple-cmake-pkg

./build/llama-simple-cmake-pkg -m ./models/llama-7b-v2/ggml-model-f16.gguf "Hello my name is"