Just released an experimentalllama.cpp bindings for KMP (Android and iOS) for now. Check Here . The example project in the repo contains an example on how to use the API with Compose and SwiftUI. But there's an example using Compose multiplatform here . We hope to add more features and make it more stable. But of course contributions are welcome. Kindly leave a star if you find it interesting ๐.
๐ 4
s
Sergey Y.
06/26/2025, 6:55 PM
This seems like a very interesting project. However, from the description, itโs not entirely clear how llama.cpp is compiled for Android.
I see that for iOS, it requires the Metal framework, so itโs hardware-accelerated. But what about Android? Is it purely CPU-based?
a
ayodele
06/26/2025, 7:30 PM
Yes it's purely CPU based for now. llamacpp have an experimental support using OpenCL. Which we hope to add. But it'll only support some Adreno chips with Q4_0 quantization