Skip to content

linkaisheng/llama.cpp.android

Repository files navigation

llama.cpp for Android

This project is dedicated to exploring high-performance large language model capabilities on mobile devices, based on the llama.cpp project.

Demo

Demo Video

Features

  • 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

Known Issues and Future Plans

  • 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

Prerequisites

  • 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

Building

  1. Clone the repository:
git clone https://github.com/linkaisheng/llama.cpp.android.git
cd llama.cpp.android
  1. Open the project in Android Studio

  2. Sync project with Gradle files

  3. Build the project using Android Studio or run:

./gradlew assembleDebug

License

This project is licensed under the same terms as llama.cpp - MIT License. See the LICENSE file for details.

Acknowledgments

  • llama.cpp - Original llama.cpp project
  • All contributors to the llama.cpp project

Disclaimer

This is an unofficial port of llama.cpp to Android. Please ensure you comply with the model's license terms and usage restrictions.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published