β All models Β· EmbeddingGemma
use case Β· practical
Semantic search over your own passages, entirely in the browser: EmbeddingGemma embeds each passage once (as a document), your query once (as a query), and ranks by cosine. The twist is the Matryoshka slider β drop the stored vector from 768 down to 128 dimensions and see the ranking barely change. That is the on-device win: a 4β6Γ smaller index with almost the same results.
Everything here is local: the corpus never leaves the tab, the vectors live in memory, and the slider re-ranks from the cached 768-d vectors by truncating + re-normalizing β so you're comparing the exact same embeddings at different budgets. In a real app you would store the truncated vectors in IndexedDB.
β Basics Β· EmbeddingGemma Β· Next: Wild β