Hacker NewsTuesday · July 7, 2026FREE

Ternlight – 7 MB embedding model that runs in browser (WASM)

embeddingwasmbrowsersemantic-searchmachine-learning

Ternlight is a compact embedding model that weighs only 7 MB and runs in the browser using WebAssembly (WASM). The model employs ternary (BitLinear) weights, a technique that reduces memory footprint while maintaining performance. It is distributed as the @ternlight/mini package. A live demo on the project's website showcases semantic search over React documentation, with real-time metrics such as embedding latency (measured in milliseconds per single embed() call) and throughput (chunks per second on the user's CPU). The engine initializes after loading, and once cached, subsequent runs require no network requests. The model is released under the MIT license. The demo interface also displays model architecture details including transformer layers, attention heads, and d_model size, though exact numbers are not specified in the source text.

// why it matters

Developers can run semantic search entirely client-side with a small model, reducing server costs and latency.

Sources

Primary · Hacker News
▸ Read original at ternlight-demo.vercel.app

Like this? Get the next digest.