A dynamic plugin for the LeanType Keyboard providing 100% on-device neural proofreading, grammar correction, and local LLM text generation powered by llama.cpp (llamacpp-kotlin).
- 🧠 100% On-Device AI: Local inference powered by optimized
llama.cppARM64/x86_64 JNI binaries. - 🛡️ Zero Internet & Complete Privacy: Runs entirely offline with zero network connectivity or external telemetry.
- ⚡ Fast Neural Proofreading & Grammar Correction: Correct spelling, fix punctuation, and refine writing with local GGUF models (e.g. Qwen2.5, Gemma 2, Llama 3, SmolLM).
- 🔒 Designed for Offline Editions: Built specifically for LeanType Offline and Offline Lite flavors with zero internet permissions (Online flavors use built-in Cloud AI).
- 📦 Dynamic Isolated Architecture: Loaded on-demand via
DexClassLoaderwith isolated native libraries and zero footprint when inactive.
Important
- Do NOT Install as a Standalone App: Do not install this APK directly into Android OS via the package manager. It is loaded dynamically inside LeanType settings.
- Model Requirement: Requires downloading a compatible GGUF quantized model (e.g.
Qwen2.5-0.5B-Instruct-Q4_K_M.gguforQwen2.5-1.5B-Instruct-Q4_K_M.gguf) into your device storage.
- Operating System: Android 7.0 (API 24) or higher
- Supported CPU Architectures:
arm64-v8a(64-bit ARM),x86_64(64-bit x86) - Host Keyboard: LeanType v4.1.6+ (Offline or Offline Lite flavors)
- RAM: Recommended 3 GB+ RAM for 0.5B–1.5B GGUF models
To maintain a lightweight ~9.8 MB core keyboard, the heavy local LLM inference engine and JNI shared libraries (libllama.so) are isolated into this dynamic plugin.
At runtime, LeanType loads this plugin dynamically via OfflineAiLoader and PluginClassLoader when offline proofreading or AI text operations are requested.
- Download
ai_plugin-arm64-v8a.apk(orai_plugin-x86_64.apk) from the Latest Releases. - In LeanType, navigate to Settings → Plugins.
- Tap Load Offline AI plugin and select the downloaded
.apkfile. - Select your downloaded
.ggufmodel file in Settings → Proofread & AI Settings.
To compile the release APKs from source:
./gradlew assembleReleaseThe compiled APKs will be generated at:
app/build/outputs/apk/release/ai_plugin-arm64-v8a.apkapp/build/outputs/apk/release/ai_plugin-x86_64.apk
Licensed under the GNU General Public License v3.0 (GPL-3.0).