├── .github └── workflows │ └── build.yml ├── LICENSE ├── Makefile ├── README-ORIGIN.md ├── README.md ├── android ├── app │ ├── .gitignore │ ├── build.gradle.kts │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── inference-gpu.c │ │ └── inference.c │ │ ├── java │ │ └── com │ │ │ └── celikin │ │ │ └── llama2 │ │ │ ├── MainActivity.kt │ │ │ ├── Utils.kt │ │ │ └── wrapper │ │ │ ├── InferenceRunner.kt │ │ │ └── InferenceRunnerManager.kt │ │ └── res │ │ ├── drawable │ │ ├── ic_launcher_background.xml │ │ └── ic_launcher_foreground.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── values-night │ │ └── themes.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml │ │ └── xml │ │ ├── backup_rules.xml │ │ └── data_extraction_rules.xml ├── build.gradle.kts ├── gradle.properties ├── gradle │ ├── libs.versions.toml │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle.kts ├── assets ├── llama2-android-wrapper.png └── llama_cute.jpg ├── configurator.py ├── export.py ├── export_meta_llama_bin.py ├── model.py ├── requirements.txt ├── run.c ├── run.ipynb ├── sample.py ├── test_all.py ├── tinystories.py ├── tokenizer.bin ├── tokenizer.model ├── tokenizer.py ├── train.py ├── train_vocab.sh ├── win.c └── win.h /.github/workflows/build.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/.github/workflows/build.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/Makefile -------------------------------------------------------------------------------- /README-ORIGIN.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/README-ORIGIN.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/README.md -------------------------------------------------------------------------------- /android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /android/app/build.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/build.gradle.kts -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/proguard-rules.pro -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/AndroidManifest.xml -------------------------------------------------------------------------------- /android/app/src/main/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/cpp/CMakeLists.txt -------------------------------------------------------------------------------- /android/app/src/main/cpp/inference-gpu.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/cpp/inference-gpu.c -------------------------------------------------------------------------------- /android/app/src/main/cpp/inference.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/cpp/inference.c -------------------------------------------------------------------------------- /android/app/src/main/java/com/celikin/llama2/MainActivity.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/java/com/celikin/llama2/MainActivity.kt -------------------------------------------------------------------------------- /android/app/src/main/java/com/celikin/llama2/Utils.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/java/com/celikin/llama2/Utils.kt -------------------------------------------------------------------------------- /android/app/src/main/java/com/celikin/llama2/wrapper/InferenceRunner.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/java/com/celikin/llama2/wrapper/InferenceRunner.kt -------------------------------------------------------------------------------- /android/app/src/main/java/com/celikin/llama2/wrapper/InferenceRunnerManager.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/java/com/celikin/llama2/wrapper/InferenceRunnerManager.kt -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/drawable/ic_launcher_background.xml -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/drawable/ic_launcher_foreground.xml -------------------------------------------------------------------------------- /android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/layout/activity_main.xml -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/values-night/themes.xml -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/values/colors.xml -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/values/strings.xml -------------------------------------------------------------------------------- /android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/values/themes.xml -------------------------------------------------------------------------------- /android/app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/xml/backup_rules.xml -------------------------------------------------------------------------------- /android/app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/app/src/main/res/xml/data_extraction_rules.xml -------------------------------------------------------------------------------- /android/build.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/build.gradle.kts -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/gradle.properties -------------------------------------------------------------------------------- /android/gradle/libs.versions.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/gradle/libs.versions.toml -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/gradle/wrapper/gradle-wrapper.properties -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/gradlew -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/gradlew.bat -------------------------------------------------------------------------------- /android/settings.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/android/settings.gradle.kts -------------------------------------------------------------------------------- /assets/llama2-android-wrapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/assets/llama2-android-wrapper.png -------------------------------------------------------------------------------- /assets/llama_cute.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/assets/llama_cute.jpg -------------------------------------------------------------------------------- /configurator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/configurator.py -------------------------------------------------------------------------------- /export.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/export.py -------------------------------------------------------------------------------- /export_meta_llama_bin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/export_meta_llama_bin.py -------------------------------------------------------------------------------- /model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/model.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/requirements.txt -------------------------------------------------------------------------------- /run.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/run.c -------------------------------------------------------------------------------- /run.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/run.ipynb -------------------------------------------------------------------------------- /sample.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/sample.py -------------------------------------------------------------------------------- /test_all.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/test_all.py -------------------------------------------------------------------------------- /tinystories.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/tinystories.py -------------------------------------------------------------------------------- /tokenizer.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/tokenizer.bin -------------------------------------------------------------------------------- /tokenizer.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/tokenizer.model -------------------------------------------------------------------------------- /tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/tokenizer.py -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/train.py -------------------------------------------------------------------------------- /train_vocab.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/train_vocab.sh -------------------------------------------------------------------------------- /win.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/win.c -------------------------------------------------------------------------------- /win.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/celikin/llama2.c-android-wrapper/HEAD/win.h --------------------------------------------------------------------------------