Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Steake/2e5f7a3082fb450146a457c20d038190 to your computer and use it in GitHub Desktop.
Save Steake/2e5f7a3082fb450146a457c20d038190 to your computer and use it in GitHub Desktop.
Executorch LLM tutorial

Usage of the Android Demo App

You can download the v0.2.0 APK from GitHub Actions or build it yourself from commit 6a1703e (v0.2.0 with buildfixes for Android).

  1. Download and install the APK.

On-device instructions using Shizuku and aShell

  1. Download and install Shizuku and aShell
  2. Open Shizuku, pair it with your device via wireless debugging, and start the Shizuku service.
  3. Download an Executorch model such as stories110M (you need the tokenizer.bin and the .pte file) to your download folder (which is usually /sdcard/Download)
  4. Open aShell and type:
mkdir -p /data/local/tmp/llama
cp /sdcard/Download/tokenizer.bin /data/local/tmp/llama/tokenizer.bin
cp /sdcard/Download/xnnpack_llama2.pte /data/local/tmp/llama/xnnpack_llama2.pte

(make sure to change the file paths if they're different for your device or the model you're using!) 6. Open ExecuTorchLlamaDemo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment