Who is this for?

This Learning Path is for developers who want to export a Llama 3.2 model with ExecuTorch and run it on an Android phone through the Vulkan backend.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Set up a Linux host for Android cross-compilation, ADB deployment, and Vulkan-backed ExecuTorch builds.
  • Export Meta Llama 3.2 1B Instruct to a Vulkan-enabled `.pte` with the exact quantization settings used in the guide.
  • Build, deploy, measure, and validate the Android `llama_main` runner on a Vivo X300 Pro or similar Android phone.

Prerequisites

Before starting, you will need the following:

  • A Linux host with enough disk space for the ExecuTorch source tree, Android SDK and NDK, Vulkan SDK, and the Llama checkpoint
  • A Vivo X300 Pro or a similar Android phone with USB debugging enabled
  • A Hugging Face account
  • Working familiarity with the shell, Python virtual environments, and Android adb workflows

Summary

AI-assisted

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.

Close
?
You’ll export Meta Llama 3.2 1B Instruct with ExecuTorch, build an Android Vulkan runtime, and run it on a Vivo X300 Pro. First, you’ll prepare a Linux host and Android device, install ExecuTorch 1.4 and the gated model files, then export a Vulkan-enabled .pte with the specified quantization, KV-cache, context, and metadata settings. After exporting, you’ll install glslc, cross-compile the runtime and llama_main, deploy the artifacts with adb, and verify Vulkan libraries during inference.

Frequently asked questions

AI-assisted

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.

Close
?
Do I need a GPU on my Linux host for this workflow?
No. You can export, quantize, and cross-compile on a Linux host without CUDA, ROCm, or a working Vulkan GPU.
How do I use the correct ExecuTorch source and Python setup?
Run git clone --branch release/1.4 --recursive https://github.com/pytorch/executorch.git and git submodule update --init --recursive. Create the environment with python3.12 -m venv .venv, activate it with source .venv/bin/activate, then install the pinned PyTorch version 2.13.0+cpu before continuing.
How large is the exported Vulkan .pte file?
The exported Vulkan .pte file is about 1.8 GB.
How do I verify the Android Vulkan build can find glslc?
Install the LunarG Vulkan SDK on the host and source its setup-env.sh script. Run which glslc and glslc --version to confirm that the compiler is available to the build.
Which performance metrics should I record on the phone?
Record model load time, prompt and decode throughput, total inference time, time to first token, RSS, and sampling time. The PyTorchObserver summary also reports prefill_token_per_sec and decode_token_per_sec.
Next