Ternlight
An embedding model in 7 MB.
Runs on your CPU. No API.
Drop it in, embed text in milliseconds, and never call a server.
Runs in your browser
no API call
Engine + weights · 7 MB
mini variant · 5 MB
Fast embeddings · ~5 ms
CPU only · no GPU
USE IT
Three lines to semantic search
Ships as a single npm package. No model download step, no server.
$npm install @ternlight/base⧉
example.js⧉
import { embed, similar } from '@ternlight/base';
similar('easy weeknight dinner ideas', recipes, { topK: 3 });
// → ranked matches · ~5 ms · zero network
EXAMPLE
React docs search
Search React's docs in your browser. Type a question — powered by @ternlight/mini, the 5 MB tier.
Embedding…
CHUNKS
24 emb/sec
ON YOUR CPU
3.1 s
ELAPSED
›—
ASK share state across components skip a re-render run code after render avoid prop drilling form input value
EMBED LATENCY
—ms
single embed() call (@ternlight/mini)
⧉Copy query embedding
MODEL
Embedding—Linear weights ternary (BitLinear)Transformer layers—Attention heads—d_model—Output—Max input—
PACKAGE
Runs on@ternlight/mini↗Bundle—Engine init—Throughput—License MIT After first load cached (0 network)
React docs from reactjs/react.dev · CC BY 4.0 · Demo built with ternlight