Instructions to use litert-community/embeddinggemma-300m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use litert-community/embeddinggemma-300m with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("litert-community/embeddinggemma-300m") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Add Tensor G4 build (seq256, mixed-precision)
Adds the missing Tensor G4 entry to the SoC matrix.
This repo currently covers google.tensor_g5, google.tensor_g6, mediatek.mt6991 / mt6993,
and qualcomm.sm8550 / sm8650 / sm8750 / sm8850 across seq256 / 512 / 1024 / 2048 —
every supported SoC except google.tensor_g4.
File: embeddinggemma-300M_seq256_mixed-precision.google.tensor_g4.tflite (196,993,056 B)
Mixed-precision AOT build for Tensor G4 (Pixel 9 series), named to match the existing convention
in this repo. Carries a compiled DarwiNN DGC payload.
Only seq256 here for now — the other three sequence lengths compile the same way if that would
be useful.
Caveat: as with any AOT DGC, this needs a compatible GoogleTensor dispatch library on device.