#!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" LLAMA_DIR="${ROOT_DIR}/vendor/llama.cpp" if [[ ! -d "${LLAMA_DIR}/.git" ]]; then git clone --depth 1 https://github.com/ggml-org/llama.cpp "${LLAMA_DIR}" fi cmake -S "${LLAMA_DIR}" -B "${LLAMA_DIR}/build" \ -DCMAKE_BUILD_TYPE=Release \ -DGGML_VULKAN=ON \ -DGGML_NATIVE=ON \ -DLLAMA_BUILD_TESTS=OFF cmake --build "${LLAMA_DIR}/build" --config Release --target llama-server -j "$(nproc)" "${LLAMA_DIR}/build/bin/llama-server" --list-devices