asermnasr commited on
Commit
646135e
·
verified ·
1 Parent(s): d331401

Match Folate Hugging Face README structure

Browse files
Files changed (1) hide show
  1. README.md +108 -7
README.md CHANGED
@@ -25,19 +25,120 @@ tags:
25
  <p align="center">
26
  <a href="https://huggingface.co/figranium/folate"><strong>Folate (Web)</strong></a>
27
  &nbsp;&bull;&nbsp;
28
- <a href="https://huggingface.co/figranium"><strong>Figranium Organization</strong></a>
29
  </p>
30
 
31
- **AndroidFolate** *(Upcoming — January 2027)* is a dedicated, on-device neural UI element ranker built for autonomous Android automation across **Native/Jetpack Compose**, **React Native**, **Flutter**, and **WebView** accessibility trees. Fine-tuned from [`google/electra-large-discriminator`](https://huggingface.co/google/electra-large-discriminator) (`335M` parameters) as a discriminative cross-encoder and quantized to **INT8**, AndroidFolate targets mobile NPU acceleration across **Google Tensor**, **Qualcomm Hexagon**, **Samsung Exynos**, and **MediaTek APU** within an **8 GB device RAM ceiling**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  ---
34
 
35
- ## Architecture & Target Specs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- * **Backbone:** `ElectraForSequenceClassification` (`24` transformer layers, `1024` hidden size, `16` attention heads, `num_labels=1`) initialized from `google/electra-large-discriminator`.
38
- * **Precision & Runtime:** Quantized **INT8** weights (~335 MB on disk) targeting **LiteRT** NPU delegates (**Google Tensor**, **Qualcomm Hexagon**, **Samsung Exynos**, **MediaTek APU**) on devices with **8 GB+ RAM**.
39
- * **Supported UI Frameworks:** Unified accessibility-tree serialization covering **Native Android Views / Jetpack Compose**, **React Native**, **Flutter**, and embedded **WebViews**.
40
 
41
  ---
42
 
43
- *Android is a trademark of Google LLC. AndroidFolate is an independent open-source project by Figranium and is not affiliated with or endorsed by Google.*
 
25
  <p align="center">
26
  <a href="https://huggingface.co/figranium/folate"><strong>Folate (Web)</strong></a>
27
  &nbsp;&bull;&nbsp;
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 (**8 GB device RAM ceiling**). 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**—requiring no 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) |
38
+ | **`androidfolate-large` (Checkpoint)** | `google/electra-large-discriminator` | `float32` Safetensors | ~1.34 GB | PyTorch / Training |
39
+
40
+ ### Inputs and outputs
41
+
42
+ * **Input:**
43
+ * A natural-language action query (e.g., `"tap Search flights button"` or `"enter destination city in search field"`).
44
+ * Candidate interactive UI nodes extracted from Android `AccessibilityNodeInfo` trees across Native/Compose, React Native, Flutter Semantics, and bridged WebViews, normalized into a unified structured token schema:
45
+ ```text
46
+ [FRAMEWORK] compose [CLASS] Button [ID] search_flights [DESC] Search flights [TEXT] Search [STATE] clickable
47
+ ```
48
+ * **Output:**
49
+ * A calibrated relevance probability (`0.0` to `1.0`, derived via sigmoid over a single sequence-classification logit) and a resolved node reference guaranteed to exist in the source accessibility hierarchy, ranked in descending order of relevance.
50
+
51
+ ### Citation
52
+
53
+ ```bibtex
54
+ @misc{androidfolate_2027,
55
+ title = {AndroidFolate: On-Device Multi-Framework Android UI Element Ranker},
56
+ author = {Figranium},
57
+ year = {2027}
58
+ }
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Model Data
64
+
65
+ Data used for model training and how the data was processed.
66
+
67
+ ### Training Dataset
68
+
69
+ AndroidFolate is trained on multi-framework Android accessibility tree grounding corpora spanning **Native Android Views / Jetpack Compose**, **React Native**, **Flutter**, and embedded **WebView** screens across real-world mobile applications.
70
+
71
+ ### Data Preprocessing
72
+
73
+ Each Android interaction step is converted into binary `(query, serialized_node)` classification pairs:
74
+
75
+ * **Query Normalization:** Action instructions are normalized to concise natural-language step descriptions.
76
+ * **Unified Multi-Framework Serialization:** Accessibility nodes are normalized across toolkits into a single schema mapping framework origin, shortened widget class/role, resource or test identifier (`resource-id`, `testID`), accessibility label (`contentDescription`, `accessibilityLabel`, Flutter Semantics `label`/`hint`, ARIA label), visible text, and interactive state flags (`clickable`, `focusable`, `scrollable`, `checked`, `selected`), while pruning unlabeled non-interactive layout containers (`ViewGroup` / `FrameLayout`).
77
+ * **Negative Sampling & Splitting:** Each ground-truth positive node is paired with sampled hard-negative candidates from the same screen state (including sibling items in `RecyclerView` / `LazyColumn` lists) and evaluated on framework-stratified validation splits.
78
+
79
+ ---
80
+
81
+ ## Implementation Information
82
+
83
+ 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
 
91
+ ## Evaluation & Benchmarks
92
+
93
+ *Weights and benchmark results will be published upon the January 2027 release.*
94
+
95
+ ### Framework-Stratified Evaluation Plan
96
+
97
+ AndroidFolate will report per-framework **Top-1**, **Top-3**, **Top-5**, **MRR**, and on-device **p50/p95 NPU latency** across all four supported UI stacks:
98
+
99
+ | Split | UI Framework | Steps | Avg Candidates | Top-1 | Top-3 | Top-5 | MRR | NPU Latency |
100
+ | :--- | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
101
+ | **`eval_native_compose`** | Native Android Views & Jetpack Compose | — | — | *Pending* | *Pending* | *Pending* | *Pending* | *Pending* |
102
+ | **`eval_react_native`** | React Native | — | — | *Pending* | *Pending* | *Pending* | *Pending* | *Pending* |
103
+ | **`eval_flutter`** | Flutter Semantics | — | — | *Pending* | *Pending* | *Pending* | *Pending* | *Pending* |
104
+ | **`eval_webview`** | Android WebView | — | — | *Pending* | *Pending* | *Pending* | *Pending* | *Pending* |
105
+
106
+ ---
107
+
108
+ ## Ethics and Safety
109
+
110
+ Evaluation approach and results.
111
+
112
+ ### Evaluation Approach
113
+
114
+ AndroidFolate is a discriminative element ranker rather than a generative text or code model; it does not generate free-form text, execute arbitrary code, or store user credentials. Evaluations focus on node grounding fidelity (verifying that returned references resolve strictly to existing interactive nodes in the provided accessibility tree) and failure-mode analysis on repeated list items.
115
+
116
+ ---
117
+
118
+ ## Usage and Limitations
119
+
120
+ Instructions on how to use the model as well as its limitations.
121
+
122
+ ### Usage
123
+
124
+ Model weights and LiteRT NPU inference bindings (`figranium/androidfolate` on GitHub and Hugging Face) will be published upon release in January 2027:
125
+
126
+ ```bash
127
+ hf download figranium/androidfolate --local-dir ./androidfolate-int8
128
+ ```
129
+
130
+ ### System Requirements
131
+
132
+ * **Disk Space:** ~335 MB (`model_quantized.tflite` + `tokenizer.json`)
133
+ * **Memory (RAM):** Designed to operate within an **8 GB total device RAM ceiling** alongside foreground Android apps
134
+ * **Hardware:** Android devices equipped with **Google Tensor**, **Qualcomm Hexagon**, **Samsung Exynos**, or **MediaTek APU** NPU hardware
135
+
136
+ ### Limitations
137
 
138
+ * **Single-Step Grounding Only:** AndroidFolate ranks candidate UI nodes for a single action query (`click`, `type`, `scroll`, `long_click`); it does not perform multi-step task planning or screen state tracking.
139
+ * **Accessibility Tree Dependency:** Grounding relies on semantic properties exposed via Android's `AccessibilityNodeInfo` API; custom canvas views without accessibility semantics cannot be ranked without a vision fallback.
140
+ * **Confidence Calibration:** Because training uses hard-negative sampling (`1:7` positive-to-negative ratio), well-calibrated top-1 positive scores typically fall below `0.90`.
141
 
142
  ---
143
 
144
+ *Android is a trademark of Google LLC. AndroidFolate is an independent open-source project by Figranium and is not affiliated with or endorsed by Google.*