Text embeddings
Vector
Turn sentences into 384-dimensional vectors for semantic search, clustering or deduplication. Compare meaning, not keywords, in the browser, in milliseconds.
Try Vector
Runs in this tab · nothing uploaded
What it does
Semantic search in 23 MB.
- Vectors are L2-normalized by default, so cosine similarity is a dot product.
- Works best on English; pass a multilingual model via
modelif needed.
Specifications
- Package
- runonweb/embed
- Base model
- all-MiniLM-L6-v2 · sentence-transformers
- License
- Apache-2.0
- Weights
- Xenova/all-MiniLM-L6-v2
- Download
- ~45 MB / ~23 MB
- Quantization
- fp16 on WebGPUq8 on WASM
- Backend
- WebGPUWASM fallback
- Input
- Text
Get started with runonweb/embed
pnpm add runonwebimport { TextEmbedder, cosineSimilarity } from 'runonweb/embed'
const embedder = new TextEmbedder()
await embedder.load()
const { embeddings } = await embedder.embed([
'How do I reset my password?',
'I forgot my login credentials',
'What is the weather today?',
])
cosineSimilarity(embeddings[0], embeddings[1]) // ~0.7
cosineSimilarity(embeddings[0], embeddings[2]) // ~0.0
embedder.dispose()Same shape everywhere: construct, load(), run, dispose(). Pass onProgressto show download progress on first use.
Questions about Vector
Does Vector run on device?
Yes. Weights download once and stay in the browser. Nothing is sent to a server.
What does Vector cost?
Nothing. runonweb is free and MIT-licensed, with no device limits, tokens or sign-in.
Which browsers support Vector?
Chromium browsers use WebGPU. Firefox and Safari fall back to WebAssembly automatically, slower but identical output.
Can I use a different model with runonweb/embed?
Yes. See each module’s docs for the options it accepts (model, size, language…). Check the license and test both backends before shipping.