3.8 KiB
name, description
| name | description |
|---|---|
| llamacpp-prism-fork-rebuild-swap | Rebuild the PrismML llama.cpp fork on Dankclaw from origin/prism and swap frank-zealot's LLAMA_BIN onto it, including the gcc-13 host-compiler and install-RPATH requirements. |
Rebuild the PrismML llama.cpp fork on Dankclaw and swap frank-zealot onto it, without guessing the build flags.
Recover the build configuration first
The binary dir carries no CMakeCache. The configure that produced the running build lives in the source tree:
grep -E 'GGML_CUDA|CUDA_ARCH|BUILD_TYPE|SHARED|HOST_COMPILER|FA_QUANTS|GENERATOR' \
/home/dank/GitPackages/llama-prism-src/build-*/CMakeCache.txt
The pinned source clone is /home/dank/GitPackages/llama-prism-src, branch prism, remote https://github.com/PrismML-Eng/llama.cpp.git. origin/HEAD -> origin/prism; there is no master/main.
Build into a fresh worktree at a pinned commit
SHA=$(git -C /home/dank/GitPackages/llama-prism-src rev-parse origin/prism)
git -C /home/dank/GitPackages/llama-prism-src worktree add --detach /home/dank/GitPackages/llama-prism-next "$SHA"
cmake -B .../llama-prism-next/build-cuda -S .../llama-prism-next -G Ninja \
-DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86-real \
-DCMAKE_CUDA_HOST_COMPILER=/usr/bin/gcc-13 -DLLAMA_CURL=OFF -DGGML_NATIVE=ON \
-DCMAKE_INSTALL_PREFIX=/home/dank/GitPackages/llama-prism-<sha7> \
-DCMAKE_INSTALL_RPATH='$ORIGIN;$ORIGIN/../lib'
cmake --build .../build-cuda -j 8
cmake --install .../build-cuda
CMAKE_CUDA_HOST_COMPILER=/usr/bin/gcc-13is mandatory: the box default is gcc 15 and nvcc 12.4 rejects it.CMAKE_INSTALL_RPATHis mandatory:cmake --installstrips the build-tree rpath, and the installed binary then dies onlibllama-server-impl.so.patchelfis NOT installed, so there is no post-hoc fix.- 672 targets on the first full build; run it detached (
setsid nohup … > log) and keep-j 8so the co-tenant services stay usable. - Disk: the box runs ~84% full; check
df -h /home/dankbefore starting.
Verify the payload gate BEFORE swapping
D=/home/dank/GitPackages/llama-prism-<sha7>
$D/bin/llama-server --version # expect 0.x.y-dev (build N, commit <sha>)
ldd $D/bin/llama-server | grep -c "not found" # must be 0
strings $D/lib/libggml-base.so.* | grep -c PQ2_0 # custom tensor type 142
strings $D/lib/libllama.so.* | grep -c prism.hadamard # dequant metadata
A fork that dropped either cannot load Ternary-Bonsai-2-9B PQ2_0 — stock llama.cpp refuses the file and a loader ignoring the metadata dequantizes wrong, silently.
Swap
scripts/frank-zealot.env:LLAMA_BIN=<D>/bin/llama-server(install layout isbin/+lib/, not the flat dir older builds shipped — the old path<dir>/llama-serverno longer exists).- Update the build/version in the env header and
serve-frank-zealot.sh(default + comments). - Land on
mainfrom the canonical checkout, then./scripts/deploy.sh dankclaw --service frank-zealot. - Prove it: process arg0 is the new path, and the journal shows
- type pq2_0: N tensors,load_tensors_hadamard: loaded N Hadamard-folded weight(s), the adapter'sprism.abliterate.base_ggufline, anddraft acceptanceonce MTP drafts. Then probes: chat, atoolsturn returning valid JSONtool_calls, and vision (solid-colour PNG via the OpenAIimage_urlcontent part,max_tokens≥512 — thinking tokens count against it). - Rollback: point
LLAMA_BINback at the previousllama-prism-b<old>dir and redeploy. Keep that dir on disk.
Test seam
tests/frank_zealot_unit.bats asserts LLAMA_BIN names a llama-prism-* fork family path, not a literal build directory: the suite runs on a box with no /home/dank, so existence cannot be checked there either. Do not re-pin a literal path.