Instructions to use xThr45hx/EmbeddingGemma-300M-Tensor-G4-A17 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use xThr45hx/EmbeddingGemma-300M-Tensor-G4-A17 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
A17 Beta-SDK recompile of EmbeddingGemma-300M seq256 for Tensor G4 (verification pending)
Browse files
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
base_model:
|
| 4 |
+
- litert-community/embeddinggemma-300m
|
| 5 |
+
tags:
|
| 6 |
+
- embeddinggemma
|
| 7 |
+
- google-tensor
|
| 8 |
+
- tensor-g4
|
| 9 |
+
- npu
|
| 10 |
+
- edgetpu
|
| 11 |
+
- litert
|
| 12 |
+
- aot
|
| 13 |
+
pipeline_tag: feature-extraction
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# EmbeddingGemma-300M — Tensor G4 NPU (Android 17 / Beta-SDK recompile)
|
| 17 |
+
|
| 18 |
+
AOT-compiled **EmbeddingGemma-300M** for the **Google Tensor G4** NPU (darwinn EdgeTPU), built with the **official Google Tensor ML SDK (Beta)**.
|
| 19 |
+
|
| 20 |
+
> ⚠️ **Android firmware note — why this repo exists.** The G4 NPU bytecode (DGC) is compiled against a specific Tensor NPU firmware. Builds compiled against **Android 16** firmware fail to load on **Android 17** (newer NPU runtime → "Failed to get Darwinn graph" / SB-invocation error). This repo holds an **A17-targeted recompile** on the current Beta SDK. The older **Android 16** build: [xThr45hx/EmbeddingGemma-300M-Tensor-G4-NPU](https://huggingface.co/xThr45hx/EmbeddingGemma-300M-Tensor-G4-NPU).
|
| 21 |
+
>
|
| 22 |
+
> 🚧 **Status: on-device A17 load verification in progress.** This build compiles clean (2265/2265 ops, single partition, DGC0 + rio_a0); confirming it loads + runs on a real Android 17 device is the next step. Provisional until this note is updated.
|
| 23 |
+
|
| 24 |
+
## File
|
| 25 |
+
|
| 26 |
+
- `embeddinggemma-300M_seq256_Google_Tensor_G4.tflite` — seq256 (max 256 tokens in one pass), 768-d output. The efficient RAG workhorse for short chunks/queries. (A seq512 long-form variant may follow.)
|
| 27 |
+
|
| 28 |
+
## How it was compiled
|
| 29 |
+
|
| 30 |
+
- **Input:** `embeddinggemma-300M_seq256_mixed-precision.tflite` from [litert-community/embeddinggemma-300m](https://huggingface.co/litert-community/embeddinggemma-300m) (the plain, non-device-compiled mixed-precision file).
|
| 31 |
+
- **SDK:** `ai-edge-litert-nightly` + `ai-edge-litert-sdk-google-tensor==2.1.5`; official `aot_compile(target=[TENSOR_G4])`, **no flags** (mixed-precision path); mandatory `google_tensor_backend` import.
|
| 32 |
+
- **Result:** 2265 / 2265 ops offloaded to **1 partition** (fully fused, no fallback). Output 196,993,056 bytes, markers **DGC0 + rio_a0 + tfl3**. SHA-256 `eec2daf64f07f8cc84a92080c5e2afb00fc6bdf0cb688e00638c0229620b0b4a`.
|
| 33 |
+
|
| 34 |
+
## License
|
| 35 |
+
|
| 36 |
+
Gemma — inherits from EmbeddingGemma. See the base model card for terms.
|
embeddinggemma-300M_seq256_Google_Tensor_G4.tflite
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eec2daf64f07f8cc84a92080c5e2afb00fc6bdf0cb688e00638c0229620b0b4a
|
| 3 |
+
size 196993056
|