Downloads · 30 days
1.8K
94% of all-time downloads
litert-community/Gemma3-1B-IT-Tensor-NPU
Gemma3-1B-IT-Tensor-NPU is a text generation model from litert-community. Use it when you need the model to write or continue text. It is set up for litert-lm. The card lists the license as gemma.
[!NOTE] Quantized, repackaged variants of google/gemma-3-1b-it precompiled (AOT) for the Google Tensor Edge TPU NPU across Pixel generations. Packaged as .litertlm bundles for LiteRT-LM. G3/G4 = int4 per-channel + Had…
Downloads · 30 days
1.8K
94% of all-time downloads
All-time downloads
1.9K
Public
Repo size
7.7 GB
Likes
3
Trending 1
Click a slice to open those files.
.litertlm5.5 GB · 100%
From the Hugging Face model README
[!NOTE] Quantized, repackaged variants of
google/gemma-3-1b-itprecompiled (AOT) for the Google Tensor Edge TPU NPU across Pixel generations. Packaged as.litertlmbundles for LiteRT-LM. G3/G4 = int4 per-channel + Hadamard · G5/G6 = int8. (This repo was previously namedGemma3-1B-IT-Tensor-G4-NPU.)
[!IMPORTANT] Community build — not an official Google release. Built and maintained by @xThr45hx; not affiliated with or endorsed by Google.
| SoC | Pixel | Quant | File | Status |
|---|---|---|---|---|
| Tensor G4 | Pixel 9 / 9 Pro / 9 Pro XL / 9 Pro Fold | int4 + Hadamard | Gemma3-1B-IT_int4hadamard_aot_ekv4096_G4.litertlm | ✅ VERIFIED on device |
| Tensor G3 | Pixel 8 / 8 Pro / 8a | int4 + Hadamard | Gemma3-1B-IT_int4hadamard_aot_ekv4096_G3.litertlm | 🟡 Same program as the verified G4 build; replies word-for-word identically to the G4 build on G4 hardware — awaiting a Pixel 8 report |
| Tensor G6 | Pixel 11 series | int8 | Gemma3-1B-IT_int8_aot_ekv4096_G6.litertlm | ✅ VERIFIED on device (retail Pixel 11 Pro XL, kodiak): coherent output, runs on the NPU |
| Tensor G5 | Pixel 10 series | int8 | Gemma3-1B-IT_int8_aot_ekv4096_G5.litertlm | ⚠️ UNVERIFIED on hardware — compiled 100% to the NPU (buenos_b0, 1295/1295 + 1226/1226 ops, 0 CPU ops); awaiting a Pixel 10 report |
[!NOTE] Why int8 on G5/G6? On a retail Tensor G6 (
santafe_a0) every int4 variant we compiled with the Tensor SDK v2.1 runs on the NPU but produces word salad. That covers int4 + Hadamard, plain per-channel int4, mixed int8-head + int4-body, blockwise-64 int4, and several compiler-option combinations (8 builds in total). The same graph quantized to int8 is coherent on the NPU. The int4 path on G6 is not yet working with the current compiler, and that is not a quant-recipe problem we could fix on our side. G5 uses the same int8 recipe as G6. Google's own G5/G6 Gemma 3 1B bundles are also int8.The earlier int4 G5/G6 bundles in this repo have been removed. The G6 one failed warmup on a retail Pixel 11 (it was built with the older beta SDK, whose G6 firmware ABI didn't match retail silicon; SDK v2.1 fixed that). The G5 one was never confirmed on hardware.
[!WARNING] Tensor G5 is not yet confirmed on a Pixel 10. It is built from the same int8 model as the verified G6 bundle and compiles fully to the NPU. If you have a Pixel 10, please test it and comment on this repo (Community tab) with: device, whether it loads on the NPU, tokens/s, and a sample multi-sentence reply. That's what moves it to ✅.
[!WARNING] Tensor G3 is not yet confirmed on a Pixel 8. Strong evidence it works: the G3 and G4 compiles are the same program. They differ in only 19 bytes (a device-type tag and its hash), and the G3 bundle runs on a Pixel 9 (G4) and gives word-for-word identical replies to the G4 build. If you have a Pixel 8 / 8 Pro / 8a, please test it and comment on this repo (Community tab) with: device, whether it loads on the NPU, tokens/s, and a sample multi-sentence reply. That's what moves it to ✅.
03 vs 04) in the embedded compiler options, plus its 8-byte hash. The G3 bundle loads
and gives word-for-word identical replies to the G4 build on G4 hardware, so the G4 runtime does not enforce the tag.All variants: 26-layer Gemma 3 1B-IT, 4096 context (embedded KV cache), prefill 128, embedded
tokenizer + chat template, .litertlm v1, built from Google's QAT checkpoint
google/gemma-3-1b-it-qat-int4-unquantized.
Sizes: G3/G4 int4 ≈ 875 MB · G5 int8 ≈ 1.65 GB · G6 int8 ≈ 2.11 GB.
These are precompiled DarwiNN DGCs. They need a GoogleTensor dispatch runtime that matches your chip's generation.
👉 G3/G4: use Box. It ships the correct runtimes/dispatch libs.
Download the APK, put the .litertlm for your SoC on the phone, load it with the NPU backend.
| Surface | Support |
|---|---|
| Box (github.com/jegly/Box) | ✅ recommended for G3/G4 |
LiteRT-LM CLI (--backend=npu) | ✅ with a compatible dispatch runtime |
| Stock Google AI Edge Gallery | ❌ on G3/G4 (its bundled dispatch runtime is the newer-generation one). On G5/G6, import with the settings below |
| Use the file for your SoC only | a DGC compiled for one Tensor generation won't run on another |
| llama.cpp / GGUF, Web, iOS, desktop, non-Pixel | ❌ .litertlm DGCs are Pixel-NPU-only |
Use Import Model with: max tokens 4096, accelerator NPU only, image/audio/thinking/speculative decoding off.
![]() | ![]() |
Measured 2026-09-10 on the G4 bundle:
| prefill | decode | prefill tok/s | decode tok/s |
|---|---|---|---|
| 128 | 64 | 608.83 | 15.93 |
| 512 | 128 | 659.22 | 16.17 |
| 1024 | 64 | 663.99 | 15.89 |
Prefill scales, decode is pinned (~16 tok/s, dispatch-bound): fastest option on the phone for prefill-heavy work (RAG, long context, summarization, classification).
Full step-by-step for both paths in AOT_RECIPE.md. The int4 path has an
executable version with guardrails in recipe/gemma3_int4hr_recipe.py.
Shared:
google/gemma-3-1b-it-qat-int4-unquantized (not plain -it).litert_torch export_hf: split_cache=True, cache_length=4096, prefill_lengths=[128],
externalize_embedder=True. Use the float prefill_decode (model.tflite), not the default
int8 copy that export_hf also writes.G3/G4 (int4 + Hadamard):
ai_edge_quantizer dynamic_wi4c_hr_afp32 (int4 per-channel + Hadamard rotation), applied once.recipe/fc_rank2_surgery.py (see
RANK2_FC_SURGERY.md).ai_edge_litert 2.2.0 + Google Tensor beta compiler (BuildID 87ea807a…).G5/G6 (int8):
ai_edge_quantizer dynamic_wi8_afp32 on the float model.tflite.ai-edge-litert 2.3.0 + ai-edge-litert-sdk-google-tensor 2.3.0
(compiler BuildID f4df3004…). In our tests the nightly packages INTERNAL'd on this graph and the stable 2.3.0 packages compiled it.Reproducibility check: a from-scratch G4 rebuild with this recipe produces a compiled prefill_decode that is
bit-identical to the published G4 build (md5 f1102df2…), and gives word-for-word identical replies
on device.
| File | Purpose |
|---|---|
Gemma3-1B-IT_int4hadamard_aot_ekv4096_G4.litertlm | Tensor G4, int4: ✅ verified |
Gemma3-1B-IT_int4hadamard_aot_ekv4096_G3.litertlm | Tensor G3, int4: 🟡 same program as G4, awaiting Pixel 8 report |
Gemma3-1B-IT_int8_aot_ekv4096_G6.litertlm | Tensor G6, int8: ✅ verified (Pixel 11 Pro XL) |
Gemma3-1B-IT_int8_aot_ekv4096_G5.litertlm | Tensor G5, int8: ⚠️ unverified on hardware (buenos_b0) |
AOT_RECIPE.md | exact reproducible AOT recipe (int4 G3/G4 + int8 G5/G6) |
recipe/gemma3_int4hr_recipe.py | executable int4 recipe with toolchain/input guardrails |
recipe/fc_rank2_surgery.py | rank-3 → rank-2 FC surgery (G3/G4) |
RANK2_FC_SURGERY.md | why the surgery is needed |
MANIFEST.md | sizes + SHA-256 |
docs/ | Edge Gallery import screenshots |
Base model Gemma 3 1B-IT © Google, under the Gemma Terms of Use. These quantized/repackaged derivatives inherit the Gemma license. Runtime: LiteRT-LM / LiteRT (Apache-2.0). Quantization, rank-2 FC surgery, int4 + Hadamard and int8 AOT compiles, and Tensor NPU packaging by @xThr45hx. Not affiliated with or endorsed by Google.