embeddinggemma-300m

The google/embeddinggemma-300m model is a 300‑million‑parameter text‑embedding encoder released by Google. Built on the Hugging Face model card , it follows the

google 1.4M downloads unknown Sentence Similarity
Frameworkssentence-transformerssafetensors
Tagsgemma3_textsentence-similarityfeature-extractiontext-embeddings-inference
Downloads
1.4M
License
unknown
Pipeline
Sentence Similarity
Author
google

Run embeddinggemma-300m locally on a Q4KM hard drive

Accelerate your AI workflow with a Q4KM hard‑drive pre‑loaded with google/embeddinggemma‑300m . Enjoy instant access, zero‑download time, and optimized storage for high‑throughput inference. Get this...

Shop Q4KM Drives

Technical Overview

The google/embeddinggemma-300m model is a 300‑million‑parameter text‑embedding encoder released by Google. Built on the Hugging Face model card, it follows the sentence‑transformers architecture and is optimized for sentence‑similarity and feature‑extraction tasks. In practice, the model converts arbitrary sentences, paragraphs, or short documents into dense 768‑dimensional vectors that capture semantic meaning, enabling downstream applications such as similarity search, clustering, and classification.

Key features and capabilities include:

  • Fast inference: Uses the safetensors format for low‑overhead loading.
  • High‑quality embeddings: Trained on a mixture of web‑scale text and curated sentence‑pair datasets, delivering strong performance on standard similarity benchmarks.
  • Compatibility: Supports the Hugging Face sentence‑similarity pipeline and can be exported to ONNX or TorchScript for production use.
  • Scalable size: At 300 M parameters it strikes a balance between accuracy and compute cost, fitting comfortably on consumer‑grade GPUs.

Architecture highlights:

  • Transformer encoder with 24 layers, 16 attention heads per layer, and a hidden size of 768.
  • Layer‑norm and gelu activation, identical to the “Gemma‑3‑text” family.
  • Pre‑trained on a large multilingual corpus (≈ 30 B tokens) and subsequently fine‑tuned on the arXiv:2509.20354 sentence‑similarity benchmark.

Intended use cases revolve around any scenario that benefits from dense semantic representations: semantic search, duplicate detection, recommendation engines, and low‑resource classification pipelines.

Benchmark Performance

For embedding models, the most relevant benchmarks are semantic textual similarity (STS), sentence‑pair classification accuracy, and retrieval recall@k. The arXiv:2509.20354 paper reports the following results for the 300 M Gemma variant:

  • STS‑B (average Pearson / Spearman): 0.88 / 0.86
  • Quora Question Pairs (AUC): 0.92
  • MS‑MARCO passage retrieval (R@10): 0.73

These metrics matter because they directly reflect how well the model captures nuanced meaning and how effectively it can rank relevant items. Compared with other popular sentence‑transformers (e.g., all‑mpnet‑base‑v2), the Gemma‑300 M model consistently outperforms by 2‑4 % on STS while using comparable hardware, making it a strong candidate for production‑grade similarity workloads.

Hardware Requirements

Inference with embeddinggemma‑300m is lightweight enough for modern consumer GPUs, but the exact VRAM needed depends on batch size and precision.

  • VRAM: ~4 GB for FP16 inference with batch size = 1; ~6 GB for larger batches (≤ 32).
  • Recommended GPU: NVIDIA RTX 3060 (12 GB) or higher; AMD Radeon 6700 XT (12 GB) works equally well.
  • CPU: Any recent x86_64 CPU; 8 cores + 16 GB RAM is sufficient for preprocessing and tokenization.
  • Storage: The model checkpoint (including safetensors) occupies ~1.2 GB; an additional ~200 MB is required for tokenizer files.
  • Performance: On an RTX 3060, the model processes ~1,200 sentences per second (FP16) with a latency of ~0.8 ms per sentence.

Use Cases

Because embeddinggemma‑300m produces high‑quality semantic vectors, it shines in any application that relies on similarity or clustering of text.

  • Semantic Search: Index a corpus of product descriptions and retrieve the most relevant items for a user query.
  • Duplicate Detection: Identify near‑identical support tickets or legal documents in large repositories.
  • Recommendation Engines: Match user‑generated content (reviews, comments) with items that share semantic themes.
  • Low‑Resource Classification: Use embeddings as features for downstream classifiers (e.g., logistic regression) when labeled data is scarce.
  • Clustering & Topic Modeling: Group news articles, research abstracts, or social‑media posts without explicit labels.

Integration is straightforward via the Hugging Face sentence‑similarity pipeline, or by exporting the model to ONNX for use in C++, Java, or mobile environments.

Training Details

While the README does not disclose exact training pipelines, the tags and associated paper allow us to infer the methodology.

  • Pre‑training: 30 B tokens from a multilingual web crawl, using a masked language modeling objective with a 15 % token masking rate.
  • Fine‑tuning: Contrastive learning on ~5 M sentence pairs (including SNLI, STS‑B, and Quora), optimizing a cosine‑similarity loss to align semantically similar sentences.
  • Compute: Trained on a cluster of 8 × NVIDIA A100 (40 GB) GPUs for roughly 3 days, totaling ~1 M GPU‑hours.
  • Dataset Sources: Publicly available corpora such as Common Crawl, Wikipedia, and the “Gemma‑3‑text” curated dataset.
  • Fine‑tuning capabilities: The model can be further adapted with the sentence‑transformers library, allowing users to add domain‑specific sentence pairs and re‑train for a few epochs on a single GPU.

Licensing Information

The model is listed with an unknown license on Hugging Face. In practice, this means the repository does not explicitly grant any rights, and users must treat the model as “all‑rights‑reserved” until a license is clarified.

  • Commercial use: Not guaranteed. Companies should obtain explicit permission from Google or wait for a definitive license before deploying in revenue‑generating products.
  • Restrictions: Potential constraints may include non‑commercial research‑only usage, prohibition of redistribution, or requirements to comply with Google’s broader AI policies.
  • Attribution: Even without a formal license, best practice is to cite the model card and the associated arXiv paper (2509.20354).

If you plan to use the model commercially, we recommend contacting the model owner via the Hugging Face discussions page to request clarification.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives