Team Ai
Apppublic

Sergidev/EmbeddingGemma-3d

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
App README

๐ŸŒŒ 3D Embed โ€” EmbeddingGemma Visualizer

An interactive demo showcasing Google's EmbeddingGemma 300M โ€” a state-of-the-art, lightweight embedding model built on the Gemma 3 architecture.

This space lets you see how the model understands language by projecting its 768-dimensional embeddings into explorable 3D space using PCA dimensionality reduction.

โœจ Features

  • โ€”๐Ÿ”ค Word Galaxy โ€” Type individual words and watch semantic clusters form in 3D. See how "cat", "dog", and "fish" cluster differently from "car", "bus", and "train".
  • โ€”๐Ÿ“ Sentence Explorer โ€” Compare full sentences and discover how meaning shapes geometry. Similar sentences land near each other; different ones drift apart.
  • โ€”๐Ÿ” Semantic Search โ€” Enter a query and a set of documents. Watch the model find the closest match and see why through spatial proximity.
  • โ€”๐Ÿช† Matryoshka Dimensions โ€” Explore how MRL (Matryoshka Representation Learning) lets you truncate embeddings from 768d โ†’ 512d โ†’ 256d โ†’ 128d with minimal quality loss, visualized side-by-side.

๐Ÿง  About EmbeddingGemma

PropertyValue
Parameters308M
Embedding Dim768 (truncatable to 512, 256, 128)
Context Window2,048 tokens
Languages100+
ArchitectureGemma 3 encoder (bidirectional attention)
Backbonesentence-transformers compatible

EmbeddingGemma is the highest-ranking text-only multilingual embedding model under 500M parameters on the MTEB leaderboard. It uses bidirectional attention (encoder-style) rather than causal decoding, making it purpose-built for embeddings.

๐Ÿš€ How It Works

  1. 1.Text is passed through EmbeddingGemma with task-specific prompts (e.g., "task: sentence similarity | query: ")
  2. 2.The model produces 768-dimensional normalized embeddings
  3. 3.PCA reduces these to 3 dimensions, capturing the directions of maximum variance
  4. 4.Plotly renders the points as an interactive 3D scatter plot

๐Ÿ“š References