█

AI/TLDR

Buy me a coffee
Buy me a coffee

EmbeddingGemma (Gemma)

A 308M multilingual embedding model small enough to run on-device

Embedding Models & InferenceOpen source
Latest
EmbeddingGemma 2
Updated
6 Oct 2026
Language
Python
License
Gemma

What's new

EmbeddingGemma 26 Oct 2026

EmbeddingGemma 2 adds image, audio and video input to the text model, grows to 740M parameters with an 8K-token context, and ships under Apache 2.0. Its MTEB Code score rises from 68.76 to 78.68.

IN SHORT

What is EmbeddingGemma (Gemma)?

EmbeddingGemma (Gemma) is a 308M multilingual embedding model small enough to run on-device. It turns text into dense vectors that you can use for semantic search, retrieval-augmented generation (RAG), clustering, and similarity comparison. It sits in the Embedding Models & Inference category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Gemma.

Updated Markdown version ↗

Overview

EmbeddingGemma is a 308M-parameter text embedding model from Google DeepMind, based on Gemma 3. It turns text into dense vectors that you can use for semantic search, retrieval-augmented generation (RAG), clustering, and similarity comparison. It was trained on data covering over 100 languages, so it works across multilingual content.

Because it is small, it is meant to run on-device or on modest hardware (CPU, GPU, or TPU) rather than requiring a large server. It also supports Matryoshka Representation Learning, which lets you shorten the output vector (for example from 768 down to 128 dimensions) to trade a little accuracy for lower storage and faster search.

It fits the embedding-models category: you generate embeddings once for your documents, store them in a vector index, and compare them against query embeddings at search time. The recommended way to run it is through the sentence-transformers library using the open weights published on Hugging Face.

EmbeddingGemma 2 (google/embeddinggemma-2) extends the family beyond text. It has 740M parameters — a 270M text backbone built on the Gemma 4 architecture plus optional 170M vision and 300M audio encoders — and places text, code, images, audio and video in one shared 768-dimension space. It has an 8K-token context window and is released under the Apache 2.0 license.

What it does

  • 308M-parameter embedding model based on Gemma 3, suited to on-device and CPU/GPU/TPU use
  • Trained on data spanning over 100 languages for multilingual text
  • Matryoshka Representation Learning: truncate output dimensions from 768 down to 128 to save storage
  • Open weights licensed for commercial use, published on Hugging Face as google/embeddinggemma-300M
  • Runs through the standard sentence-transformers API with model.encode() and model.similarity()
  • Built for RAG, semantic search, clustering, and similarity tasks

Getting started

EmbeddingGemma is loaded through the sentence-transformers library. Install the dependencies, then load the model from Hugging Face and call encode().

Install sentence-transformers

Install sentence-transformers along with the transformers build that supports EmbeddingGemma.

bashbash
pip install -U sentence-transformers git+https://github.com/huggingface/transformers@v4.56.0-Embedding-Gemma-preview

Generate embeddings

Load the model by its Hugging Face ID and call encode() on your text. Use similarity() to compare two embeddings.

pythonpython
import torch
from sentence_transformers import SentenceTransformer

device = "cuda" if torch.cuda.is_available() else "cpu"
model = SentenceTransformer("google/embeddinggemma-300M").to(device=device)

texts = ["apple", "banana", "car"]
embeddings = model.encode(texts)

similarities = model.similarity(embeddings[0], embeddings[1])

Shrink the embedding dimension (optional)

Pass truncate_dim to get shorter vectors via Matryoshka Representation Learning, which reduces storage and speeds up search.

pythonpython
embeddings = model.encode(texts, truncate_dim=512)

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Build a RAG pipeline: embed your documents, store them in a vector index, and retrieve the closest chunks for a user query
  • Add semantic search to an app so results match meaning rather than exact keywords
  • Run embeddings on-device or on a CPU where a larger model would be too heavy
  • Embed multilingual content for cross-language search, clustering, or deduplication

How EmbeddingGemma (Gemma) compares

EmbeddingGemma (Gemma) alongside other open-source embedding models & inference tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Sentence Transformers★ 19.2kThe standard Python framework for loading, training, and computing embeddings with sentence and reranking models.
OpenCLIP★ 14.2kAn open implementation of CLIP for training and running image-text embedding models, with a large catalogue of pretrained checkpoints for zero-shot classification and retrieval.
PyTorch Metric Learning★ 6.3kPyTorch library of losses, miners, distances, samplers, trainers and accuracy testers for training embedding models with deep metric and self-supervised learning.
EmbeddingGemma (Gemma)★ 5.8kA 308M multilingual embedding model small enough to run on-device
Text Embeddings Inference (TEI)★ 5.1kHugging Face's Rust-based server for deploying embedding, reranking, and sequence-classification models with high throughput on GPU or CPU.
text2vec★ 5kPython library for sentence embeddings and text similarity, implementing Word2Vec, BM25, Sentence-BERT, CoSENT and BGE with Chinese and multilingual models.
Infinity (Embeddings)★ 3kA high-throughput serving engine for text embeddings, rerankers, CLIP, and ColPali models, exposing an OpenAI-compatible API.
ColPali★ 2.8kA vision-language embedding model that indexes whole document page images for retrieval, avoiding the need to parse PDFs into text first.