/ sandbox / embeddings

In-browser embeddings · 384-d MiniLM

4 files · monaco editor↗ Open on GitHub
semantic search
// ready to embed

Three steps. One browser.

  1. 1
    Load the model (~25MB, cached forever in IndexedDB)
  2. 2
    Index a few books (streams ~paragraph-sized chunks through MiniLM)
  3. 3
    Search by meaning (cosine similarity against every chunk in RAM)
queryload model + index a book first