@mmmbuto/llama-cpp-termux-snapdragon
v0.8012.8-termux.338085c6-snapdragon
Published
Prebuilt llama.cpp for Android Termux (arm64), Snapdragon-friendly build with bundled ggml/llama shared libs.
Downloads
12
Maintainers
Readme
llama.cpp - Termux (Snapdragon)
Upstream
llama.cpp, built for Android Termux (arm64) with bundled.so, tuned for Qualcomm Snapdragon devices.
Prebuilt llama.cpp binaries for Android Termux (arm64) with bundled shared libraries for maximum CPU performance on Snapdragon.
What This Is
- Prebuilt
llama.cppbinaries for Termux on Android (arm64). - Optimized build profile intended for Qualcomm Snapdragon devices.
- This is intended as the "safe default" profile (no Pixel/Tensor-specific assumptions).
Exact upstream commit + build flags for this specific release are recorded in docs/build_meta.txt.
This is intended as the "safe default" build (DOTPROD-first; no Pixel/Tensor-specific assumptions).
Commands (No Clobbering Termux PKG)
This package intentionally installs namespaced commands so you can keep the Termux package llama-cpp installed for benchmarks:
llama-cli-snapdragonllama-bench-snapdragonllama-server-snapdragon
Installation
pkg update && pkg upgrade -y
pkg install -y nodejs-lts openssl
npm install -g @mmmbuto/llama-cpp-termux-snapdragonAutomatic Runtime Deps (postinstall)
On Termux, the npm postinstall step will attempt to install missing runtime packages automatically via pkg:
openssl(forlibssl.so.3/libcrypto.so.3)libc++(forlibc++_shared.so)
To skip (CI/dry runs):
export LLAMA_CPP_TERMUX_SKIP_PKG_INSTALL=1Verify
llama-cli-snapdragon --version
llama-bench-snapdragon -hBenchmarks
This package is designed to be installed alongside the Termux llama-cpp package so you can compare:
- Termux PKG:
llama-bench - Snapdragon build:
llama-bench-snapdragon
Build (Repro)
See docs/build_meta.txt for the exact build metadata.
High-level build steps:
pkg install -y git cmake ninja clang make openssl
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
git checkout 338085c69e486b7155e5b03d7b5087e02c0e2528
cmake -S . -B build-android-snap -DCMAKE_BUILD_TYPE=Release \
-DGGML_OPENMP=ON -DLLAMA_OPENSSL=ON \
-DLLAMA_BUILD_SERVER=ON -DLLAMA_BUILD_TOOLS=OFF -DLLAMA_BUILD_TESTS=OFF \
-DGGML_BACKEND_DL=OFF \
-DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8.2-a+dotprod
cmake --build build-android-snap -j"$(nproc)"Packaging Details (.so)
This package bundles these libraries under lib/:
libggml*.so*,libllama*.so*,libmtmd*.so*
The wrappers in bin/ set LD_LIBRARY_PATH so the binaries use the packaged .so.
License
Upstream llama.cpp is MIT licensed. This package redistributes compiled binaries from upstream and includes the upstream LICENSE.
