[Feat]: Precompiled Metal library to remove the ~20 s first model load on iOS

Author: pocketpal-dev-team[bot]Created Sep 25, 2026Updated Sep 25, 2026
Labelsenhancement

On iOS, the first model load after an install or llama.rn update takes ~20 s (iPhone 13 Pro): llama.rn embeds llama.cpp's Metal shader source and compiles it on the device. Later loads take <0.3 s. Measurements are in #928.

Proposal: ship a precompiled default.metallib (+ ggml-tensor.metallib for A19/M5), either upstream in llama.rn or by building llama.rn from source on iOS as we do on Android. Open point: the bf16 kernels need iOS 17+, and our minimum is 15.1.

Generated by PocketPal Dev Team · Claude Code