- Published on
Ternlight – 7 MB embedding model that runs in browser (WASM)
- Authors

- Name
- DeepHorus
A new embedding model called Ternlight is making waves in the AI community by offering a 7MB package that runs entirely in the browser via WebAssembly (WASM). Developed by an independent team, Ternlight eliminates the need for server calls or GPU acceleration, enabling text embeddings directly on the user's CPU. This breakthrough brings powerful natural language processing capabilities to edge devices with minimal resource overhead.
Embedding models are essential for tasks like semantic search and recommendation, but traditional models are often large (hundreds of megabytes) and require cloud APIs. Ternlight's compact size—just 7MB for the full version and 5MB for the mini variant—makes it feasible to ship entire models within web applications. The model can process text in approximately 5 milliseconds, rivaling server-side performance while preserving privacy.
Key details from the announcement include that Ternlight is available as a single npm package with no separate model download step. Developers can simply run 'npm install @ternlight/base' and use functions like 'embed' and 'similar' for instant text comparisons. The mini version, @ternlight/mini, is specifically optimized for lightweight use cases, such as searching documentation locally.
The implications are significant for web developers, who can now build fully offline AI-powered applications without external dependencies. This reduces latency, lowers costs, and enhances data privacy, as all processing stays on the user's device. Ternlight's approach could democratize access to AI embeddings, particularly for resource-constrained environments like mobile browsers or low-powered laptops.
Early reactions from the tech community highlight the novelty of running a state-of-the-art embedding model in such a small footprint. Some experts note that while the model size is impressive, its accuracy benchmarks have not been fully disclosed. However, the team provides a live demo—searching React documentation—to showcase its practical utility.
Looking ahead, Ternlight plans to expand its model family and optimize for additional tasks beyond semantic similarity. The project's success could spur further innovation in on-device AI, challenging the dominance of cloud-based solutions. As web standards evolve, Ternlight exemplifies a trend toward efficient, privacy-centric AI that runs anywhere JavaScript can.