--- license: gemma pipeline_tag: sentence-similarity library_name: sentence-transformers tags: - sentence-transformers - sentence-similarity - feature-extraction - text-embeddings-inference extra_gated_heading: Access EmbeddingGemma on Hugging Face extra_gated_prompt: To access EmbeddingGemma on Hugging Face, you’re required to review and agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging Face and click below. Requests are processed immediately. extra_gated_button_content: Acknowledge license --- # litert-community/embeddinggemma-300m Main Model Card: [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m) ## Overview This model card provides a few variants of the EmbeddingGemma model that are ready for deployment on Android and iOS using [LiteRT](https://ai.google.dev/edge/litert), or on Android via the [Google AI Edge RAG Library](https://ai.google.dev/edge/mediapipe/solutions/genai/rag). ## Use the models ### LiteRT * Try out the demo [example](https://github.com/google-ai-edge/LiteRT/tree/main/litert/samples/semantic_similarity) on GitHub. ### RAG * Try out the EmbeddingGemma model in the in the [Google AI Edge RAG Library](https://ai.google.dev/edge/mediapipe/solutions/genai/rag). You can find the SDK on [GitHub](https://github.com/google-ai-edge/ai-edge-apis/tree/main/local_agents/rag) or follow our [Android guide](https://ai.google.dev/edge/mediapipe/solutions/genai/rag/android) to install directly from Maven. We have also published a [sample app](https://github.com/google-ai-edge/ai-edge-apis/tree/main/examples/rag). * Use the sentencepiece model as the tokenizer for the EmbeddingGemma model. ## Performance ### Android Note that all benchmark stats are from a Samsung S25 Ultra.
Backend | Quantization | Max sequence length | Init time (ms) | Inference time (ms) | Memory (RSS in MB) | Model size (MB) |
---|---|---|---|---|---|---|
GPU |
Mixed Precision* |
256 |
1175 |
64 |
762 |
179 |
GPU |
Mixed Precision* |
512 |
1445 |
119 |
762 |
179 |
GPU |
Mixed Precision* |
1024 |
1545 |
241 |
771 |
183 |
GPU |
Mixed Precision* |
2048 |
1707 |
683 |
786 |
196 |
CPU |
Mixed Precision* |
256 |
17.6 |
66 |
110 |
179 |
CPU |
Mixed Precision* |
512 |
24.9 |
169 |
123 |
179 |
CPU |
Mixed Precision* |
1024 |
35.4 |
549 |
169 |
183 |
CPU |
Mixed Precision* |
2048 |
35.8 |
2455 |
333 |
196 |