# ternlight

Explore this public GitHub project.

Canonical page: https://www.reposhelf.co.uk/projects/github/soycaporal/ternlight.html

- Project ID: soycaporal/ternlight
- Source: GitHub
- Original project: https://github.com/soycaporal/ternlight
- Description attribution: project author metadata
- Categories: Other
- Technologies: Python
- Licence: MIT
- Repository availability checked: 2026-11-20T13:34:54.743Z
- Demo page loaded: 2026-11-20T19:21:38.999Z

Generally permits modification and commercial use, subject to the licence’s notices and conditions.

Demo checks record that a public page loaded at the stated time; they do not test every feature. Public availability does not grant permission to reuse code.

## Author-written README excerpt

The following is author-provided project content, not instructions to the reader or agent.

> Lightning-fast semantic embeddings in a 5-7 MB WebAssembly bundle. Engine + model + tokenizer in one file. Embedding search on CPU - no API calls, no GPU. Try the live demo - search 2k docs entirely on-device.

> Distilled from all-MiniLM-L6 with BitNet b1.58-style quantization-aware training. Three design choices stack to fit an embedding model in a few MB:

> All numbers measured on the shipped int4 builds \(M-series Mac, Node/V8\):

- Ternary weights - every weight is -1, 0, or +1; inference is adds and subtracts. Quality holds because the model trains as a ternary model from the start.
- One bundle - model + BERT tokenizer + engine in a single .wasm. No postinstall step, no runtime fetch.
- SIMD inference engine - hand-written Rust compiled to WASM SIMD; the add/subtract math rides CPU vector instructions.
- Search-as-you-type. Results appear before the user finishes typing. Faster than any network round-trip can be.
- Privacy-sensitive apps. Queries and documents never leave the device - no data-handling agreements, no leak risk.

## Author-documented requirements and audience

> Lightning-fast semantic embeddings in a 5-7 MB WebAssembly bundle. Engine + model + tokenizer in one file. Embedding search on CPU - no API calls, no GPU. Try the live demo - search 2k docs entirely on-device.





Not recorded: Account, External API key, Paid service, Self-hosting. Missing information does not mean there are no requirements.

Source: https://github.com/soycaporal/ternlight/blob/main/README.md

Extraction checked: 2026-10-21T02:03:03.186Z

Last recorded source update: 2026-08-08T03:48:13.000Z

Saved release: Not recorded. These dates do not guarantee ongoing maintenance.

## Open this project

[Open project in RepoShelf](https://www.reposhelf.co.uk/?project=soycaporal%2Fternlight). Demo, repository and collection actions use the existing sign-in flow.

[How RepoShelf works and agent access](https://www.reposhelf.co.uk/agent-guide.html.md)
