ARPL — runtime ISA/topology detection for llama.cpp on ARM (built for Snapdragon 8 Elite) [r]
Mirrored from r/MachineLearning for archival readability. Support the source by reading on the original site.
I've been working on this for a while and finally pushed a public version.
The problem: llama.cpp runs fine on ARM phones, but it doesn't know anything about the specific chip it's on. Same thread count, same context params, whether you're on a Snapdragon 8 Elite or a five-year-old mid-ranger. ARPL reads the actual hardware at runtime — which ISA extensions are available (SDOT, I8MM, SME2), how the cores are clustered — and configures llama.cpp accordingly. No per-device build, no manual tuning.
What's in the repo:
Android reference app (Kotlin/Compose) with a JNI bridge into llama.cpp
Runtime ISA detection via HWCAPs
Topology-aware thread count recommendation
Context param patching (flash attention, KV cache quant) based on what the hardware actually supports
Built and tested on a Samsung S25 Ultra (SM-S938B). The heterogeneous CPU/GPU/NPU partitioning is still in progress and not in this release — what's here handles the ISA/thread/context side, which already made a real difference in my testing.
This is a noncommercial showcase release (PolyForm Noncommercial license) — happy to answer questions about the approach or the tradeoffs I ran into building it.
[link] [comments]
More from r/MachineLearning
-
A collision-entropy floor for watermark/retrieval AI-text detection. Looking for a sanity check before I take this further [D]
Aug 14
-
Are supervised and unsupervised learning still relevant today? [D]
Aug 14
-
TMLR Relevance and Prestige [D]
Aug 13
-
Reproducible canvas-aligned low-level patterns in somerandomllm-generated images and their possible relation to iterative editing artifacts [D]
Aug 13
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.