This project is dedicated to exploring high-performance large language model capabilities on mobile devices, based on the llama.cpp project.
- Run LLMs directly on Android devices
- Native C++ implementation using Android NDK
- Context compression for long text processing:
- Support longer text with smaller memory footprint
- Efficient context management for extended conversations
- Simple Android UI for interaction
- Model list management (including model descriptions, download links, etc.) is currently hardcoded in the source code. This will be improved in future updates with a more flexible and maintainable solution.
- Future improvements planned:
- Better model management system
- Performance optimizations for mobile scenarios
- Android Studio Arctic Fox (2020.3.1) or newer
- CMake 3.18.1 or newer
- Android NDK 21.4.7075529 or newer
- Android SDK Platform 21 or newer
- Clone the repository:
git clone https://github.com/linkaisheng/llama.cpp.android.git
cd llama.cpp.android-
Open the project in Android Studio
-
Sync project with Gradle files
-
Build the project using Android Studio or run:
./gradlew assembleDebugThis project is licensed under the same terms as llama.cpp - MIT License. See the LICENSE file for details.
- llama.cpp - Original llama.cpp project
- All contributors to the llama.cpp project
This is an unofficial port of llama.cpp to Android. Please ensure you comply with the model's license terms and usage restrictions.
