Run Arm AI Portal text-generation models on Android
Introduction
Prepare the Android command-line tools
Build and run the default Android text-generation application
Run SmolLM2 on Android
Compare validated text-generation adapters
Verify on-device text generation
(Optional) Use an Arm AI Portal model without a validated example
Next Steps
Run Arm AI Portal text-generation models on Android
Who is this for?
This Learning Path is for Android and machine learning developers who want to run optimized text-generation and text-embedding models locally on an Arm-based Android phone.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Prepare the Android command-line tools and connect an Arm-based Android phone.
- Download and run an ExecuTorch text-generation model from the Arm AI Portal.
- Understand how the starter application uses model catalog entries and runtime adapters.
- Compare the validated ExecuTorch and ONNX Runtime GenAI adapter paths.
Prerequisites
Before starting, you will need the following:
- A macOS, Linux, or Windows development machine with Git, Python 3.10 or later, and JDK 17
- Tools for downloading and extracting ZIP archives on the machine
- An Arm-based Android phone with enough free storage for application and model files
- A data-capable USB cable
- A Hugging Face account with access to the model repositories
- Basic familiarity with terminal commands and Android applications
- Network access for the first Gradle build and model downloads
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
adb devices -l and look for your device marked device with a serial number. If it shows unauthorized, unlock the phone and accept the USB debugging prompt. On Windows, you might also need the phone manufacturer’s USB driver.filesDir/models/<model-id>/. For development, stage the package under /data/local/tmp and use the run-as command to copy it into the application’s private directory.ANDROID_PACKAGE=com.arm.learningpath.texttotext and MODEL_ID=smollm2-360m-instruct-8da4w-xnnpack-executorch. Keep the identifiers consistent with the entries in model_catalog.json.ui/MainActivity.kt reads the selected entry from model_catalog.json, and inference/RuntimeRunnerFactory.kt creates the adapter named by its runtime field. Select the validated catalog entry for the runtime you want to use.