2 min readfrom Machine Learning

ARPL — runtime ISA/topology detection for llama.cpp on ARM (built for Snapdragon 8 Elite) [r]

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.

Repo: https://github.com/noplayeryt1511-lang/ARPL-public-

submitted by /u/OpeningTough145
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#llama.cpp
#ARM
#ISA
#SDOT
#I8MM
#SME2
#Runtime Detection
#Topology
#Thread Count
#Context Params
#Snapdragon 8 Elite
#Android
#Kotlin
#Compose
#JNI
#HWCAPs
#Flash Attention
#KV Cache Quant
#Samsung S25 Ultra
#Heterogeneous Partitioning