Zero-Shot Classification
LiteRT
LiteRT
English
int8
npu
android
accessibility
mobile-agent
ui-grounding
cross-encoder
computer-use
Instructions to use figranium/androidfolate with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use figranium/androidfolate with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Add first-class emulated Android desktop host-offloaded inference support to README
Browse files
README.md
CHANGED
|
@@ -19,7 +19,7 @@ tags:
|
|
| 19 |
---
|
| 20 |
|
| 21 |
<p align="center">
|
| 22 |
-
<img src="
|
| 23 |
</p>
|
| 24 |
|
| 25 |
<p align="center">
|
|
@@ -28,13 +28,13 @@ tags:
|
|
| 28 |
<a href="https://www.apache.org/licenses/LICENSE-2.0"><strong>Apache 2.0 License</strong></a>
|
| 29 |
</p>
|
| 30 |
|
| 31 |
-
**AndroidFolate** *(Upcoming — January 2027)* is a dedicated, on-device neural UI element ranker built for autonomous Android automation within tight mobile memory constraints (**6 GB physical RAM minimum / 8 GB+ recommended**). Fine-tuned from [`google/electra-large-discriminator`](https://huggingface.co/google/electra-large-discriminator) (`335M` parameters) as a discriminative cross-encoder on multi-framework Android accessibility trees and quantized to **INT8 (~335 MB)**, AndroidFolate targets hardware-accelerated mobile NPU inference via **LiteRT** across **Google Tensor**, **Qualcomm Hexagon**, **Samsung Exynos**, and **MediaTek APU**—
|
| 32 |
|
| 33 |
AndroidFolate is designed to act as a fast, zero-hallucination UI grounding engine for single-step Android actions (`click`, `type`, `scroll`, `long_click`) across **Native Android Views / Jetpack Compose**, **React Native**, **Flutter**, and embedded **WebViews**.
|
| 34 |
|
| 35 |
| Artifact | Backbone | Precision / Format | Disk Size | Target Runtime |
|
| 36 |
| :--- | :--- | :--- | :--- | :--- |
|
| 37 |
-
| **`model_quantized.tflite` (Planned)** | `google/electra-large-discriminator` | Static `INT8` LiteRT | ~335 MB | LiteRT NPU Delegates (Tensor / Hexagon / Exynos / APU) |
|
| 38 |
| **`androidfolate-large` (Checkpoint)** | `google/electra-large-discriminator` | `float32` Safetensors | ~1.34 GB | PyTorch / Training |
|
| 39 |
|
| 40 |
### Inputs and outputs
|
|
@@ -84,7 +84,7 @@ Details about the model internals and runtime optimization.
|
|
| 84 |
|
| 85 |
* **Architecture:** `ElectraForSequenceClassification` (`24` transformer layers, `1024` hidden size, `16` attention heads, `num_labels=1`) initialized from `google/electra-large-discriminator`.
|
| 86 |
* **Sequence Length:** Static bucketed WordPiece token lengths (`vocab_size = 30,522`) for deterministic NPU graph compilation.
|
| 87 |
-
* **Quantization & Export:** Converted from PyTorch via `litert-torch` and quantized to **INT8** with `ai-edge-quantizer` (keeping the final classification head in higher precision for calibrated ranking logits), compiled for **Google Tensor**, **Qualcomm Hexagon**, **Samsung Exynos**, and **MediaTek APU** delegates.
|
| 88 |
|
| 89 |
---
|
| 90 |
|
|
@@ -130,10 +130,10 @@ hf download figranium/androidfolate --local-dir ./androidfolate-int8
|
|
| 130 |
### System Requirements & Supported Hardware
|
| 131 |
|
| 132 |
* **Disk Space:** ~335 MB (`model_quantized.tflite` + `tokenizer.json`)
|
| 133 |
-
* **
|
| 134 |
* **6 GB Physical RAM (Minimum / ~5.2 GB Usable Floor):** Supported via on-demand NPU session unloading after inference to avoid memory pressure alongside foreground apps.
|
| 135 |
* **8 GB+ Physical RAM (Recommended / Optimal Tier):** Keeps the ~335 MB INT8 NPU session warm in memory for zero cold-start latency.
|
| 136 |
-
* **NPU Acceleration:** Flagship and upper-midrange Android devices (generally 2022 onwards) with **6 GB+ RAM** and dedicated transformer-capable NPUs across all four vendors:
|
| 137 |
|
| 138 |
| NPU Vendor | Supported SoCs | Example Supported Devices (6 GB+ RAM) |
|
| 139 |
| :--- | :--- | :--- |
|
|
@@ -142,9 +142,13 @@ hf download figranium/androidfolate --local-dir ./androidfolate-int8
|
|
| 142 |
| **Samsung Exynos** | Exynos 1380, 1480, 1580, and 2400+ series | Galaxy A54 / A55 / A56 (6 GB / 8 GB+), Galaxy S24 / S24+ (Exynos), Galaxy Z Flip 7, Galaxy S26 |
|
| 143 |
| **MediaTek APU** | Dimensity 7200, 8000-series, and 9000-series | Redmi Note 13 Pro+, Nothing Phone (2a), Xiaomi 13T / 14T Pro, Vivo X100 / X200 |
|
| 144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
* **Unsupported Hardware Examples:**
|
| 146 |
-
* **Devices with <= 4 GB RAM:** Entry-level 4 GB devices fall below the ~5.2 GB usable RAM floor and cannot safely host the runtime alongside foreground apps.
|
| 147 |
-
* **Budget / Older SoCs lacking transformer-capable NPUs:** e.g., Galaxy A1x series, 6-series Snapdragon chips (including Nothing Phone (4b) on Snapdragon 6 Gen 4), and non-Android devices (iOS/iPadOS).
|
| 148 |
|
| 149 |
### Limitations
|
| 150 |
|
|
|
|
| 19 |
---
|
| 20 |
|
| 21 |
<p align="center">
|
| 22 |
+
<img src="./banner.png" alt="AndroidFolate" style="max-height: 220px; object-fit: cover;">
|
| 23 |
</p>
|
| 24 |
|
| 25 |
<p align="center">
|
|
|
|
| 28 |
<a href="https://www.apache.org/licenses/LICENSE-2.0"><strong>Apache 2.0 License</strong></a>
|
| 29 |
</p>
|
| 30 |
|
| 31 |
+
**AndroidFolate** *(Upcoming — January 2027)* is a dedicated, on-device neural UI element ranker built for autonomous Android automation within tight mobile memory constraints (**6 GB physical RAM minimum / 8 GB+ recommended** on physical devices, plus **first-class emulated Android support on desktop** via host-side inference). Fine-tuned from [`google/electra-large-discriminator`](https://huggingface.co/google/electra-large-discriminator) (`335M` parameters) as a discriminative cross-encoder on multi-framework Android accessibility trees and quantized to **INT8 (~335 MB)**, AndroidFolate targets hardware-accelerated mobile NPU inference via **LiteRT** across **Google Tensor**, **Qualcomm Hexagon**, **Samsung Exynos**, and **MediaTek APU**—and routes emulated Android sessions directly to the desktop host's native accelerators without requiring PyTorch or `transformers` at inference time.
|
| 32 |
|
| 33 |
AndroidFolate is designed to act as a fast, zero-hallucination UI grounding engine for single-step Android actions (`click`, `type`, `scroll`, `long_click`) across **Native Android Views / Jetpack Compose**, **React Native**, **Flutter**, and embedded **WebViews**.
|
| 34 |
|
| 35 |
| Artifact | Backbone | Precision / Format | Disk Size | Target Runtime |
|
| 36 |
| :--- | :--- | :--- | :--- | :--- |
|
| 37 |
+
| **`model_quantized.tflite` (Planned)** | `google/electra-large-discriminator` | Static `INT8` LiteRT | ~335 MB | LiteRT NPU Delegates (Tensor / Hexagon / Exynos / APU) & Desktop Host (ANE / GPU / XNNPACK) |
|
| 38 |
| **`androidfolate-large` (Checkpoint)** | `google/electra-large-discriminator` | `float32` Safetensors | ~1.34 GB | PyTorch / Training |
|
| 39 |
|
| 40 |
### Inputs and outputs
|
|
|
|
| 84 |
|
| 85 |
* **Architecture:** `ElectraForSequenceClassification` (`24` transformer layers, `1024` hidden size, `16` attention heads, `num_labels=1`) initialized from `google/electra-large-discriminator`.
|
| 86 |
* **Sequence Length:** Static bucketed WordPiece token lengths (`vocab_size = 30,522`) for deterministic NPU graph compilation.
|
| 87 |
+
* **Quantization & Export:** Converted from PyTorch via `litert-torch` and quantized to **INT8** with `ai-edge-quantizer` (keeping the final classification head in higher precision for calibrated ranking logits), compiled for **Google Tensor**, **Qualcomm Hexagon**, **Samsung Exynos**, and **MediaTek APU** delegates on physical devices, and executed natively via **Apple Neural Engine (ANE)**, **GPU**, or **CPU XNNPACK** when bridged from a desktop emulator.
|
| 88 |
|
| 89 |
---
|
| 90 |
|
|
|
|
| 130 |
### System Requirements & Supported Hardware
|
| 131 |
|
| 132 |
* **Disk Space:** ~335 MB (`model_quantized.tflite` + `tokenizer.json`)
|
| 133 |
+
* **Physical Android Devices — Tiered Memory & NPU Policy:**
|
| 134 |
* **6 GB Physical RAM (Minimum / ~5.2 GB Usable Floor):** Supported via on-demand NPU session unloading after inference to avoid memory pressure alongside foreground apps.
|
| 135 |
* **8 GB+ Physical RAM (Recommended / Optimal Tier):** Keeps the ~335 MB INT8 NPU session warm in memory for zero cold-start latency.
|
| 136 |
+
* **NPU Acceleration:** Flagship and upper-midrange Android devices (generally 2022 onwards) with **6 GB+ RAM** and dedicated transformer-capable NPUs across all four vendors:
|
| 137 |
|
| 138 |
| NPU Vendor | Supported SoCs | Example Supported Devices (6 GB+ RAM) |
|
| 139 |
| :--- | :--- | :--- |
|
|
|
|
| 142 |
| **Samsung Exynos** | Exynos 1380, 1480, 1580, and 2400+ series | Galaxy A54 / A55 / A56 (6 GB / 8 GB+), Galaxy S24 / S24+ (Exynos), Galaxy Z Flip 7, Galaxy S26 |
|
| 143 |
| **MediaTek APU** | Dimensity 7200, 8000-series, and 9000-series | Redmi Note 13 Pro+, Nothing Phone (2a), Xiaomi 13T / 14T Pro, Vivo X100 / X200 |
|
| 144 |
|
| 145 |
+
* **Emulated Android on Desktop (First-Class Host Offloading):**
|
| 146 |
+
* **Supported Environments:** Android Studio AVD, Cuttlefish, Waydroid, Genymotion, and desktop Android VMs on macOS, Linux, and Windows.
|
| 147 |
+
* **Architecture:** Rather than emulating a mobile NPU or consuming guest VM RAM inside the emulator, AndroidFolate detects the emulated environment, bypasses physical SoC allowlists, and streams serialized accessibility trees over a local **ADB / gRPC bridge** directly to the desktop host—executing the INT8 model outside the emulator on **Apple Silicon Neural Engine (ANE)**, **desktop GPU**, or **CPU XNNPACK**.
|
| 148 |
+
|
| 149 |
* **Unsupported Hardware Examples:**
|
| 150 |
+
* **Physical Devices with <= 4 GB RAM:** Entry-level 4 GB devices fall below the ~5.2 GB usable RAM floor and cannot safely host the runtime alongside foreground apps.
|
| 151 |
+
* **Physical Budget / Older SoCs lacking transformer-capable NPUs:** e.g., Galaxy A1x series, 6-series Snapdragon chips (including Nothing Phone (4b) on Snapdragon 6 Gen 4), and non-Android mobile devices (iOS/iPadOS).
|
| 152 |
|
| 153 |
### Limitations
|
| 154 |
|