From 657adbd7d88f410fdf2b727cee32a6a946dfed2d Mon Sep 17 00:00:00 2001 From: BelachewRachel Date: Thu, 17 Sep 2026 17:10:40 +0300 Subject: [PATCH 1/4] Add Llama ONNX GenAI validated path --- .../2-build-and-run.md | 1 + .../4-compare-runtime-adapters.md | 29 ++++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/2-build-and-run.md b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/2-build-and-run.md index 5bb5e25cca..8bfeee4d0c 100644 --- a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/2-build-and-run.md +++ b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/2-build-and-run.md @@ -87,6 +87,7 @@ When you want to try another runtime or workload, return to the following table: | [SmolLM2 360M Instruct](https://huggingface.co/Arm/smollm2-360m-instruct-8da4w-xnnpack-executorch) | ExecuTorch 1.1.0 | Text generation | `smollm2-executorch` | | [BGE Base English v1.5](https://huggingface.co/Arm/bge-base-en-v1.5-int8-litert) | LiteRT 1.4.2 | Text embedding | `bge-base-litert` | | [TinyLlama 1.1B Chat](https://huggingface.co/Arm/tinyllama-1-1b-chat-onnx-genai-int4-kquantlast-emb-int8-vivo-x300) | ONNX Runtime GenAI | Text generation | `tinyllama-onnx-genai` | +| [Llama 3.2 1B Instruct](https://huggingface.co/Arm/llama-3-2-1b-instruct-onnx-genai-int4-kquantlast-emb-int8-vivo-x300) | ONNX Runtime GenAI | Text generation | `llama-3-2-onnx-genai` | The model and runtime change together in these examples, so their results and timings aren't controlled runtime benchmarks. diff --git a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md index e338631573..2cc75a52f1 100644 --- a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md +++ b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md @@ -24,7 +24,7 @@ The downloaded model package isn't an Android executable. Gradle packages the ru ## Choose a text-generation path -The application includes two validated text-generation paths that share the interface and deployment flow. However, each needs an adapter because its runtime API, model format, tokenizer handling, and output contract differ. +The application includes three validated text-generation examples that share the interface and deployment flow. However, each needs an adapter because its runtime API, model format, tokenizer handling, and output contract differ. The following table describes the paths: @@ -32,6 +32,7 @@ The following table describes the paths: | --- | --- | --- | --- | --- | | SmolLM2 with ExecuTorch | `executorch` | `inference/models/smollm2/ExecuTorchTextGenerationAdapter` | `.pte`, configuration, tokenizer, and chat template | The recommended default and smallest validated generation example. | | TinyLlama with ONNX Runtime GenAI | `onnxruntime` | `inference/models/tinyllama/OnnxTextGenerationAdapter` | ONNX model directory, configuration, tokenizer, and chat template | A directory-based GenAI package with an additional Android AAR dependency. | +| Llama 3.2 with ONNX Runtime GenAI | `onnxruntime` | `inference/models/llama32/OnnxTextGenerationAdapter` | ONNX model directory, configuration, tokenizer, and chat template | The same GenAI runtime flow with the Llama 3.2 package. | The repository also contains `inference/models/bge/LiteRtEmbeddingAdapter` for the catalog runtime `litert`. That adapter runs the BGE text-embedding workload and returns vectors rather than generated text, so it is listed separately from the text-generation paths. @@ -53,9 +54,9 @@ This checks compatibility with the adapter and doesn't evaluate the model's lang ### Prepare the ONNX Runtime GenAI path -The TinyLlama example uses `com.microsoft.onnxruntime:onnxruntime-android:1.27.0` and the official ONNX Runtime GenAI Android AAR. First, complete the [ONNX Runtime GenAI Android Learning Path](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/build-android-chat-app-using-onnxruntime/) to build `onnxruntime-genai-release.aar`. +The ONNX Runtime GenAI examples use `com.microsoft.onnxruntime:onnxruntime-android:1.27.0` and the official ONNX Runtime GenAI Android AAR. First, complete the [ONNX Runtime GenAI Android Learning Path](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/build-android-chat-app-using-onnxruntime/) to build `onnxruntime-genai-release.aar`. -Create a separate project and download the complete model directory: +Create a separate project and select one ONNX Runtime GenAI example: {{< tabpane code=true >}} {{< tab header="macOS or Linux" language="bash" >}} @@ -64,9 +65,15 @@ git clone https://github.com/arm-education/ai-portal-android-app-text-to-text.gi ai-portal-android-app-text-to-text-onnx cd ai-portal-android-app-text-to-text-onnx -cp -R adapter-examples/tinyllama-onnx-genai/app/. app/ - +# Choose one validated ONNX Runtime GenAI example. +export ONNX_EXAMPLE="tinyllama-onnx-genai" export MODEL_ID="tinyllama-1-1b-chat-onnx-genai-int4-kquantlast-emb-int8-vivo-x300" +# Or use Llama 3.2 instead: +# export ONNX_EXAMPLE="llama-3-2-onnx-genai" +# export MODEL_ID="llama-3-2-1b-instruct-onnx-genai-int4-kquantlast-emb-int8-vivo-x300" + +cp -R "adapter-examples/$ONNX_EXAMPLE/app/." app/ + export MODEL_DIR="../model-onnx" ../.hf-venv/bin/hf download "Arm/$MODEL_ID" --local-dir "$MODEL_DIR" {{< /tab >}} @@ -76,10 +83,16 @@ git clone https://github.com/arm-education/ai-portal-android-app-text-to-text.gi ai-portal-android-app-text-to-text-onnx Set-Location ai-portal-android-app-text-to-text-onnx -Copy-Item -Path "adapter-examples\tinyllama-onnx-genai\app\*" ` +# Choose one validated ONNX Runtime GenAI example. +$ONNX_EXAMPLE = "tinyllama-onnx-genai" +$MODEL_ID = "tinyllama-1-1b-chat-onnx-genai-int4-kquantlast-emb-int8-vivo-x300" +# Or use Llama 3.2 instead: +# $ONNX_EXAMPLE = "llama-3-2-onnx-genai" +# $MODEL_ID = "llama-3-2-1b-instruct-onnx-genai-int4-kquantlast-emb-int8-vivo-x300" + +Copy-Item -Path "adapter-examples\$ONNX_EXAMPLE\app\*" ` -Destination "app" -Recurse -Force -$MODEL_ID = "tinyllama-1-1b-chat-onnx-genai-int4-kquantlast-emb-int8-vivo-x300" $MODEL_DIR = "..\model-onnx" ..\.hf-venv\Scripts\hf.exe download "Arm/$MODEL_ID" --local-dir $MODEL_DIR {{< /tab >}} @@ -89,7 +102,7 @@ Copy the generated AAR to `app/libs/onnxruntime-genai-release.aar` before contin ## Build and run the selected alternative -The ONNX Runtime GenAI alternative now follows the same workflow: build the APK, install the APK, copy the chosen model package to the directory named by its catalog ID, and start the application. +The selected ONNX Runtime GenAI alternative now follows the same workflow: build the APK, install the APK, copy the chosen model package to the directory named by its catalog ID, and start the application. Continue in the same terminal so that `MODEL_ID` and `MODEL_DIR` remain set: From 9f399f920a3c16d2f2867b4481aceace333b38ab Mon Sep 17 00:00:00 2001 From: BelachewRachel Date: Thu, 24 Sep 2026 00:39:26 +0300 Subject: [PATCH 2/4] Provide instructions for AAR building directly in this LP --- .../4-compare-runtime-adapters.md | 76 ++++++++++++++++++- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md index 2cc75a52f1..9e03153ec3 100644 --- a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md +++ b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md @@ -54,13 +54,77 @@ This checks compatibility with the adapter and doesn't evaluate the model's lang ### Prepare the ONNX Runtime GenAI path -The ONNX Runtime GenAI examples use `com.microsoft.onnxruntime:onnxruntime-android:1.27.0` and the official ONNX Runtime GenAI Android AAR. First, complete the [ONNX Runtime GenAI Android Learning Path](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/build-android-chat-app-using-onnxruntime/) to build `onnxruntime-genai-release.aar`. +The ONNX Runtime GenAI examples use `com.microsoft.onnxruntime:onnxruntime-android:1.27.0` and the official ONNX Runtime GenAI Android AAR. Build the AAR from the official ONNX Runtime GenAI source before you apply an ONNX Runtime GenAI adapter. + +Set `ANDROID_HOME` to your Android SDK location. Set `ANDROID_NDK_HOME` to the installed Android NDK directory, or replace it in the commands below. Android Studio installs the SDK and NDK from **Tools > SDK Manager > SDK Tools**. + +{{< tabpane code=true >}} + {{< tab header="macOS or Linux" language="bash" >}} +export WORK_DIR="$HOME/text-to-text-android" +mkdir -p "$WORK_DIR" +cd "$WORK_DIR" + +git clone --recursive https://github.com/microsoft/onnxruntime-genai.git +cd onnxruntime-genai + +python3 -m pip install -r requirements-dev.txt +if ! command -v cmake >/dev/null 2>&1; then + if ! ls -d "$ANDROID_HOME"/cmake/*/bin >/dev/null 2>&1; then + "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \ + --sdk_root="$ANDROID_HOME" \ + "cmake;3.22.1" + fi + export PATH="$(ls -d "$ANDROID_HOME"/cmake/*/bin | tail -n 1):$PATH" +fi +cmake --version + +python3 build.py --skip_wheel --build_java --android \ + --android_home "$ANDROID_HOME" \ + --android_ndk_path "$ANDROID_NDK_HOME" \ + --android_abi arm64-v8a \ + --config Release + +export ONNX_GENAI_AAR="$PWD/build/Android/Release/src/java/build/android/outputs/aar/onnxruntime-genai-release.aar" +test -f "$ONNX_GENAI_AAR" +cd "$WORK_DIR" + {{< /tab >}} + {{< tab header="Windows PowerShell" language="powershell" >}} +$WORK_DIR = Join-Path $HOME "text-to-text-android" +New-Item -ItemType Directory -Force -Path $WORK_DIR +Set-Location $WORK_DIR + +git clone --recursive https://github.com/microsoft/onnxruntime-genai.git +Set-Location onnxruntime-genai + +python -m pip install -r requirements-dev.txt +if (-not (Get-Command cmake -ErrorAction SilentlyContinue)) { + if (-not (Test-Path "$env:ANDROID_HOME\cmake")) { + & "$env:ANDROID_HOME\cmdline-tools\latest\bin\sdkmanager.bat" ` + --sdk_root="$env:ANDROID_HOME" ` + "cmake;3.22.1" + } + $CMAKE_DIR = Get-ChildItem "$env:ANDROID_HOME\cmake" -Directory | Sort-Object Name | Select-Object -Last 1 + $env:PATH = "$($CMAKE_DIR.FullName)\bin;$env:PATH" +} +cmake --version + +python build.py --skip_wheel --build_java --android ` + --android_home "$env:ANDROID_HOME" ` + --android_ndk_path "$env:ANDROID_NDK_HOME" ` + --android_abi arm64-v8a ` + --config Release + +$ONNX_GENAI_AAR = Join-Path $PWD "build\Android\Release\src\java\build\android\outputs\aar\onnxruntime-genai-release.aar" +Test-Path $ONNX_GENAI_AAR +Set-Location $WORK_DIR + {{< /tab >}} +{{< /tabpane >}} Create a separate project and select one ONNX Runtime GenAI example: {{< tabpane code=true >}} {{< tab header="macOS or Linux" language="bash" >}} -cd .. +cd "$WORK_DIR" git clone https://github.com/arm-education/ai-portal-android-app-text-to-text.git \ ai-portal-android-app-text-to-text-onnx cd ai-portal-android-app-text-to-text-onnx @@ -73,12 +137,14 @@ export MODEL_ID="tinyllama-1-1b-chat-onnx-genai-int4-kquantlast-emb-int8-vivo-x3 # export MODEL_ID="llama-3-2-1b-instruct-onnx-genai-int4-kquantlast-emb-int8-vivo-x300" cp -R "adapter-examples/$ONNX_EXAMPLE/app/." app/ +mkdir -p app/libs +cp "$ONNX_GENAI_AAR" app/libs/onnxruntime-genai-release.aar export MODEL_DIR="../model-onnx" ../.hf-venv/bin/hf download "Arm/$MODEL_ID" --local-dir "$MODEL_DIR" {{< /tab >}} {{< tab header="Windows PowerShell" language="powershell" >}} -Set-Location .. +Set-Location $WORK_DIR git clone https://github.com/arm-education/ai-portal-android-app-text-to-text.git ` ai-portal-android-app-text-to-text-onnx Set-Location ai-portal-android-app-text-to-text-onnx @@ -92,13 +158,15 @@ $MODEL_ID = "tinyllama-1-1b-chat-onnx-genai-int4-kquantlast-emb-int8-vivo-x300" Copy-Item -Path "adapter-examples\$ONNX_EXAMPLE\app\*" ` -Destination "app" -Recurse -Force +New-Item -ItemType Directory -Force -Path "app\libs" +Copy-Item -Path $ONNX_GENAI_AAR -Destination "app\libs\onnxruntime-genai-release.aar" -Force $MODEL_DIR = "..\model-onnx" ..\.hf-venv\Scripts\hf.exe download "Arm/$MODEL_ID" --local-dir $MODEL_DIR {{< /tab >}} {{< /tabpane >}} -Copy the generated AAR to `app/libs/onnxruntime-genai-release.aar` before continuing. Keep every file in the downloaded ONNX model directory together, including external model data, `genai_config.json`, tokenizer files, and the chat template. +The commands above copy the generated AAR to `app/libs/onnxruntime-genai-release.aar`. Keep every file in the downloaded ONNX model directory together, including external model data, `genai_config.json`, tokenizer files, and the chat template. ## Build and run the selected alternative From 0deee90308e8f7fb855fde4f567078cfe471ca25 Mon Sep 17 00:00:00 2001 From: BelachewRachel Date: Thu, 24 Sep 2026 15:19:59 +0300 Subject: [PATCH 3/4] Pin ONNX GenAI AAR build dependencies --- .../4-compare-runtime-adapters.md | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md index 9e03153ec3..2a7f7d24fe 100644 --- a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md +++ b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md @@ -56,15 +56,22 @@ This checks compatibility with the adapter and doesn't evaluate the model's lang The ONNX Runtime GenAI examples use `com.microsoft.onnxruntime:onnxruntime-android:1.27.0` and the official ONNX Runtime GenAI Android AAR. Build the AAR from the official ONNX Runtime GenAI source before you apply an ONNX Runtime GenAI adapter. -Set `ANDROID_HOME` to your Android SDK location. Set `ANDROID_NDK_HOME` to the installed Android NDK directory, or replace it in the commands below. Android Studio installs the SDK and NDK from **Tools > SDK Manager > SDK Tools**. +Set `ANDROID_HOME` to your Android SDK location. The commands below install a pinned Android NDK under `ANDROID_HOME` and use it for the ONNX Runtime GenAI AAR build. Android Studio installs the SDK tools from **Tools > SDK Manager > SDK Tools**. {{< tabpane code=true >}} {{< tab header="macOS or Linux" language="bash" >}} export WORK_DIR="$HOME/text-to-text-android" +export ONNX_GENAI_VERSION="v0.16.0" +export ANDROID_NDK_VERSION="27.3.13750724" +export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$ANDROID_NDK_VERSION" mkdir -p "$WORK_DIR" cd "$WORK_DIR" -git clone --recursive https://github.com/microsoft/onnxruntime-genai.git +"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \ + --sdk_root="$ANDROID_HOME" \ + "ndk;$ANDROID_NDK_VERSION" + +git clone --recursive --branch "$ONNX_GENAI_VERSION" https://github.com/microsoft/onnxruntime-genai.git cd onnxruntime-genai python3 -m pip install -r requirements-dev.txt @@ -90,10 +97,17 @@ cd "$WORK_DIR" {{< /tab >}} {{< tab header="Windows PowerShell" language="powershell" >}} $WORK_DIR = Join-Path $HOME "text-to-text-android" +$ONNX_GENAI_VERSION = "v0.16.0" +$ANDROID_NDK_VERSION = "27.3.13750724" +$env:ANDROID_NDK_HOME = Join-Path $env:ANDROID_HOME "ndk\$ANDROID_NDK_VERSION" New-Item -ItemType Directory -Force -Path $WORK_DIR Set-Location $WORK_DIR -git clone --recursive https://github.com/microsoft/onnxruntime-genai.git +& "$env:ANDROID_HOME\cmdline-tools\latest\bin\sdkmanager.bat" ` + --sdk_root="$env:ANDROID_HOME" ` + "ndk;$ANDROID_NDK_VERSION" + +git clone --recursive --branch $ONNX_GENAI_VERSION https://github.com/microsoft/onnxruntime-genai.git Set-Location onnxruntime-genai python -m pip install -r requirements-dev.txt From 62c68e384ef7331dc42c891849c1618ae8b1b986 Mon Sep 17 00:00:00 2001 From: BelachewRachel Date: Thu, 24 Sep 2026 19:43:05 +0300 Subject: [PATCH 4/4] Use a pre-compiled AAR --- .../4-compare-runtime-adapters.md | 77 ++++--------------- 1 file changed, 13 insertions(+), 64 deletions(-) diff --git a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md index 2a7f7d24fe..da6866e310 100644 --- a/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md +++ b/content/learning-paths/mobile-graphics-and-gaming/run-text-to-text-models-on-android/4-compare-runtime-adapters.md @@ -54,83 +54,32 @@ This checks compatibility with the adapter and doesn't evaluate the model's lang ### Prepare the ONNX Runtime GenAI path -The ONNX Runtime GenAI examples use `com.microsoft.onnxruntime:onnxruntime-android:1.27.0` and the official ONNX Runtime GenAI Android AAR. Build the AAR from the official ONNX Runtime GenAI source before you apply an ONNX Runtime GenAI adapter. - -Set `ANDROID_HOME` to your Android SDK location. The commands below install a pinned Android NDK under `ANDROID_HOME` and use it for the ONNX Runtime GenAI AAR build. Android Studio installs the SDK tools from **Tools > SDK Manager > SDK Tools**. +The ONNX Runtime GenAI examples use `com.microsoft.onnxruntime:onnxruntime-android:1.27.0` and the official ONNX Runtime GenAI Android AAR. Download the official pre-compiled ONNX Runtime GenAI Android AAR before you apply an ONNX Runtime GenAI adapter. {{< tabpane code=true >}} {{< tab header="macOS or Linux" language="bash" >}} export WORK_DIR="$HOME/text-to-text-android" -export ONNX_GENAI_VERSION="v0.16.0" -export ANDROID_NDK_VERSION="27.3.13750724" -export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$ANDROID_NDK_VERSION" mkdir -p "$WORK_DIR" -cd "$WORK_DIR" -"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \ - --sdk_root="$ANDROID_HOME" \ - "ndk;$ANDROID_NDK_VERSION" - -git clone --recursive --branch "$ONNX_GENAI_VERSION" https://github.com/microsoft/onnxruntime-genai.git -cd onnxruntime-genai - -python3 -m pip install -r requirements-dev.txt -if ! command -v cmake >/dev/null 2>&1; then - if ! ls -d "$ANDROID_HOME"/cmake/*/bin >/dev/null 2>&1; then - "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \ - --sdk_root="$ANDROID_HOME" \ - "cmake;3.22.1" - fi - export PATH="$(ls -d "$ANDROID_HOME"/cmake/*/bin | tail -n 1):$PATH" -fi -cmake --version - -python3 build.py --skip_wheel --build_java --android \ - --android_home "$ANDROID_HOME" \ - --android_ndk_path "$ANDROID_NDK_HOME" \ - --android_abi arm64-v8a \ - --config Release - -export ONNX_GENAI_AAR="$PWD/build/Android/Release/src/java/build/android/outputs/aar/onnxruntime-genai-release.aar" +export ONNX_GENAI_AAR="$WORK_DIR/onnxruntime-genai-release.aar" + +curl --fail --location \ + "https://github.com/microsoft/onnxruntime-genai/releases/download/v0.16.0/onnxruntime-genai-android-0.16.0.aar" \ + --output "$ONNX_GENAI_AAR" + test -f "$ONNX_GENAI_AAR" -cd "$WORK_DIR" {{< /tab >}} {{< tab header="Windows PowerShell" language="powershell" >}} $WORK_DIR = Join-Path $HOME "text-to-text-android" -$ONNX_GENAI_VERSION = "v0.16.0" -$ANDROID_NDK_VERSION = "27.3.13750724" -$env:ANDROID_NDK_HOME = Join-Path $env:ANDROID_HOME "ndk\$ANDROID_NDK_VERSION" New-Item -ItemType Directory -Force -Path $WORK_DIR -Set-Location $WORK_DIR -& "$env:ANDROID_HOME\cmdline-tools\latest\bin\sdkmanager.bat" ` - --sdk_root="$env:ANDROID_HOME" ` - "ndk;$ANDROID_NDK_VERSION" - -git clone --recursive --branch $ONNX_GENAI_VERSION https://github.com/microsoft/onnxruntime-genai.git -Set-Location onnxruntime-genai - -python -m pip install -r requirements-dev.txt -if (-not (Get-Command cmake -ErrorAction SilentlyContinue)) { - if (-not (Test-Path "$env:ANDROID_HOME\cmake")) { - & "$env:ANDROID_HOME\cmdline-tools\latest\bin\sdkmanager.bat" ` - --sdk_root="$env:ANDROID_HOME" ` - "cmake;3.22.1" - } - $CMAKE_DIR = Get-ChildItem "$env:ANDROID_HOME\cmake" -Directory | Sort-Object Name | Select-Object -Last 1 - $env:PATH = "$($CMAKE_DIR.FullName)\bin;$env:PATH" -} -cmake --version - -python build.py --skip_wheel --build_java --android ` - --android_home "$env:ANDROID_HOME" ` - --android_ndk_path "$env:ANDROID_NDK_HOME" ` - --android_abi arm64-v8a ` - --config Release - -$ONNX_GENAI_AAR = Join-Path $PWD "build\Android\Release\src\java\build\android\outputs\aar\onnxruntime-genai-release.aar" +$ONNX_GENAI_AAR = Join-Path $WORK_DIR "onnxruntime-genai-release.aar" + +Invoke-WebRequest ` + -Uri "https://github.com/microsoft/onnxruntime-genai/releases/download/v0.16.0/onnxruntime-genai-android-0.16.0.aar" ` + -OutFile $ONNX_GENAI_AAR + Test-Path $ONNX_GENAI_AAR -Set-Location $WORK_DIR {{< /tab >}} {{< /tabpane >}}