Most in-browser embedding setups ask you to download 30MB: a quantized model, the ONNX runtime, a tokenizer, plus Transformers.js glue. Ternlight ships the engine, weights, and tokenizer as one 7MB WASM blob and runs the whole thing on the CPU. No WebGPU, no server, no API key, zero network calls. It hit the HackerNews front page at 120 points.
What it actually is
Ternlight is a sentence-embedding model, not an app. You get two functions: embed turns text into a vector, similar ranks candidates against a query. Their demo searches the React docs live in the browser — around 5ms per lookup, every byte staying on-device. That privacy story is the whole pitch: nothing leaves the machine.
The API
npm install @ternlight/base for the standard build, or @ternlight/mini at 5MB when you want smaller. Both work in the browser or a Worker. One line does the job: similar('easy weeknight dinner ideas', recipes, { topK: 3 }).
Why it matters: as small-model, on-device AI becomes the default, Ternlight makes the embedding layer fully local — the missing piece for browser extensions, offline search, and edge devices.
You Might Also Like
- Tambo Just hit 9600 Stars and it Might Change how you Build ai Powered React Apps
- Opengraviton Just let me run a 140b Model on my mac Mini Heres how
- Notebooklm Cinematic Video Overviews Google Just Turned Your Notes Into Mini Documentaries
- Fish Audio Just Open Sourced s2 and it Beats gpt 4o Mini tts With an 81 88 win Rate
- Google Releases Gemini Embedding 2 one Vector Space for Text Images Video and Audio

Leave a comment