Skip to main content

Prerequisites

Android device

  • Android 13 or later (API 33+).
  • arm64-v8a architecture; a Snapdragon 8 Elite-class device is recommended.
  • 8B: 8 GB or more of memory; 35B: 12–16 GB.
  • Developer options and USB debugging enabled, with the device connected to the computer over USB.
Our reference device is a Lenovo TB322FC (Snapdragon 8 Elite, 16 GB RAM).

Build computer

  • Git, Bash, JDK 17+.
  • Android SDK 35, adb, and an sdkmanager usable from the terminal.
  • NDK r28: 28.2.13676358.
  • CMake 3.21+ and Ninja.
  • Python 3.10+ with NumPy and huggingface_hub (which provides the huggingface-cli command).
  • The md5sum command, which the model import script uses to check files. On macOS, install GNU coreutils to get it.
  • At least 30 GB of free disk space for model source files and the converted files.
Run the commands below in Bash.
1

Get the source and prepare the Android tools

Install the required SDK components:
Replace the SDK path below with its actual location on your computer, then set the environment variables:
You can find the SDK location in Android Studio’s SDK settings; on macOS it is usually ~/Library/Android/sdk.Run the subsequent commands in the Edge0/android directory.
2

Build and install the app

First build the local engine libraries. The first build needs a network connection to download the engine source:
After that step succeeds, build the app:
Connect the device, allow USB debugging in the on-device dialog, then confirm the connection:
The device status should be device. If it shows unauthorized, allow the authorization on the device and check again. The steps below assume only one device is connected.Install the app:
You can also install the built APK directly; use either method:
3

Download and convert the model

The model conversion script is in the repository’s windows/tools/ directory. Android and Windows share this tool, and it runs on your current computer.

Prepare 8B

The result is saved in models/edge0-8b-gguf/.

Prepare 35B

The result is saved in models/edge0-35b-gguf/.Import onto the device only after conversion completes successfully.
4

Import the model via adb

With the app installed and the device connected, run the command for the model you prepared:
Or import 35B only:
When both tiers are ready, you can import them at once:
The script copies the model into the app’s private directory and checks that the files transferred completely. If the script reports missing files or a checksum mismatch, verify that the download and conversion steps completed successfully, then run the script again.
5

Load and chat

  1. Open Edge0 Chat.
  2. Go to Models and tap Refresh.
  3. Select a model and tap Load.
  4. Return to the chat screen, then enter and send a message.
The title bar shows the active model. Use the button in the upper-right corner to switch models. Each response shows generation speed and memory usage.Unload only unloads the running model; it does not delete model files.

Why is the first turn slower?

With 35B, the first turn of each new topic has to read model data from device storage first, so it is slower. On the reference device, the first turn of a new topic takes about 10–15 seconds to begin replying, and later turns are much faster. During long continuous use, the device may heat up and the system may reduce performance, lowering the generation speed. If you see error messages, crashes, or a long period of no progress, see Troubleshooting.

A model is missing or fails to load

First confirm the import script completed successfully, then tap Refresh on the Models page. After clearing app data or uninstalling the app, you need to import the model again. If loading fails, note the message shown in the interface; for how to obtain logs, see Troubleshooting.