frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

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

https://ternlight-demo.vercel.app/
44•soycaporal•1h ago

Comments

soycaporal•1h ago
Hobby project, I wanted to "ship a useful model in a web browser". so I distilled a small sentence encoder from MiniLM with ternary quantization-aware training. Also wrote the inference engine from scratch and shipped in Rust → WASM SIMD.

It's an embeddings model, not an LLM: text goes in, a 384-dim vector comes out, and cosine similarity between two vectors tells you how related the texts are — regardless of shared words ("reset my password" ↔ "I forgot my password" → 0.88). Used for semantic search, FAQ/intent matching, and clustering. Running it on-device means search-as-you-type semantic search is performant with no API dependencies.

Demo (2k React docs, fully on-device): https://ternlight-demo.vercel.app

Two tiers on npm: - @ternlight/base (7 MB, ~5 ms/embed, more capable embedings) - @ternlight/mini (5 MB wire, ~2.5 ms/embed).

Bundled for Node and browsers.

Repo - see technical details (MIT, training pipeline included): https://github.com/soycaporal/ternlight

Curious if this is something useful, what are the use cases for on-device embeddings.

fellowniusmonk•54m ago
Awesome! Besides size, how does this compare to gte-small?
soycaporal•47m ago
gte-small outscores all-MiniLM-L6 on MTEB (~61 vs ~56 avg per the GTE paper). MiniLM is ternlight's teacher (ternlight holds 0.84 Spearman fidelity to teacher). I haven't run a head-to-head yet; STS-B/MTEB numbers are on the roadmap. Also on the roadmap is to distill gte-small as teacher.
aetherspawn•52m ago
Can the 30 second embedding time be done beforehand and sent to the browser?

Inference is nice and quick after that.

soycaporal•51m ago
yes, you could run a 1 time indexing run on the server side, and just ship the embeddings to frontend
dirteater_•49m ago
This is cool!

but also maybe you could put a button on the landing page to trigger the demo because it's a bit startling to hear my fans go crazy when opening a webpage.

Waterluvian•9m ago
Agree. But this also reminds me fondly of the days where the sounds of my computer so intimately indicated what’s going on.
esafak•43m ago
What we need is a W3C LLM API.
yesidoagree•33m ago
If it was like Math (Math.round, Math.PI, etc.) it could be Language, as in:

    Language.complete('the quick brown fox jumped over the lazy') 
and maybe even static methods on Image

    Image.generate('a spaceship flying toward a planet')
soycaporal•25m ago
I think standardizing the runtime is pretty effective, it then open up portability
wazzup_im•34m ago
I added an offline search engine to app.wazzup.im/search (no login or payment required).

First search downloads the model from the internet and subsequent runs are from the cache.

The model is very small so it's not the best for everything but it's good for basic math and coding.

Give it a try.

CobrastanJorji•24m ago
Great, now my websites are gonna push entire LLMs onto my browser in order to use my CPU to make inferences about my shopping habits or whatever.
antonvs•7m ago
Disabling WASM is the new disable JavaScript
newspaper1•8m ago
Very cool! I'd love to point it at my own corpus to index/embed. Would be cool if you could give it a link to a markdown file or even a website to crawl.
rvz•7m ago
Why do these things download into the browser automatically? This could be used to distribute malware and also or hog excessive browser memory.

Fable turned remarkable into Tom Riddle's diary from Harry Potter

https://github.com/MaximeRivest/Riddle
90•modinfo•1h ago•40 comments

OpenWrt One – Open Hardware Router

https://openwrt.org/toh/openwrt/one
411•peter_d_sherman•6h ago•166 comments

CoMaps – FOSS Offline Maps

https://www.comaps.app/
291•basilikum•5h ago•60 comments

How to sequence your own DNA at home

https://bradleywoolf.com/links-1/sequencing-my-own-dna-at-home
13•bilsbie•36m ago•2 comments

GLM 5.2 and the coming AI margin collapse

https://martinalderson.com/posts/the-upcoming-ai-margin-collapse-part-1-glm-5-2/
130•martinald•4h ago•80 comments

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

https://ternlight-demo.vercel.app/
44•soycaporal•1h ago•15 comments

A global workspace in language models

https://www.anthropic.com/research/global-workspace
255•in-silico•7h ago•87 comments

Pruning RAG context down to what the answer actually needs

https://www.kapa.ai/blog/how-we-prune-rag-context
47•emil_sorensen•5h ago•5 comments

A 2048-spin bulk acoustic wave Ising machine for number partitioning and Sudoku

https://arxiv.org/abs/2607.02112
16•Jimmc414•2d ago•0 comments

AI: The ROI Runway Could Be Long Outside the Tech Sector

https://www.apollo.com/wealth/insights-news/insights/daily-spark/ai-the-roi-runway-could-be-long-...
46•u1hcw9nx•3h ago•31 comments

Linux on the Atari Jaguar

https://cakehonolulu.github.io/linux-for-jaguar/
99•cakehonolulu•6h ago•18 comments

Full Writeup of the Windows GDID

https://github.com/SmtimesIWndr/gdid-reversal
30•typeofhuman•2h ago•15 comments

Resetting Xbox

https://news.xbox.com/en-us/2026/07/06/resetting-xbox/
460•dijksterhuis•10h ago•434 comments

Stealth robotics startup (YC S26) is hiring principal engineers (Palo Alto)

1•david-venegas•8h ago

AMD Ryzen AI Halo – $4k AI Dev Kit

https://www.lttlabs.com/articles/2026/07/06/amd-ryzen-ai-halo
269•LabsLucas•9h ago•196 comments

The Music of Destruction

https://thebaffler.com/latest/the-music-of-destruction-fuelling
5•lermontov•4d ago•0 comments

Vessel An EGA adventure about whether machines can grieve

https://claude.ai/public/artifacts/2c647671-3f94-4d22-b3c1-f2b5a0e17b6e
16•schwarzarno•2h ago•5 comments

OfficeCLI: Office suite for AI agents to read and edit Microsoft Office files

https://github.com/iOfficeAI/OfficeCLI
119•maxloh•8h ago•34 comments

Evaluation order and nontermination in query languages

https://www.rntz.net/post/2026-06-11-datalog-nontermination.html
16•luu•4d ago•1 comments

The LLVM Compiler Infrastructure

https://cacm.acm.org/federal-funding-of-academic-research/the-llvm-compiler-infrastructure/
36•tosh•2d ago•4 comments

OpenSSH 10.4/10.4p1 Released

https://www.openssh.org/txt/release-10.4
17•throw0101a•2h ago•3 comments

Using precision editing to study human embryo development shows master gene

https://www.cam.ac.uk/research/news/first-use-of-precision-editing-to-study-human-embryo-developm...
41•gmays•3d ago•21 comments

M/PC – A Concatenative OS

https://wiki.xxiivv.com/site/m_pc.html
31•caminanteblanco•4h ago•3 comments

Acronym Fatigue Series Introduction: why I'm wary of acronyms

https://devz.cl/posts/acryonym-fatigue-series-why-i-m-wary-of-engineering-acronyms/
8•DanielVZ•2h ago•1 comments

Januscape: Guest-to-Host Escape in KVM/x86 [CVE-2026-53359]

https://github.com/V4bel/Januscape
71•Imustaskforhelp•7h ago•23 comments

Aluminum foil (2021)

https://dernocua.github.io/notes/aluminum-foil.html
228•firephox•11h ago•101 comments

Poly/ML – A Standard ML Implementation

https://github.com/polyml/polyml
12•Lyngbakr•2h ago•2 comments

Rotman Lens

https://en.wikipedia.org/wiki/Rotman_lens
71•thomasjb•5d ago•18 comments

Kani: A Model Checker for Rust

https://arxiv.org/abs/2607.01504
124•Jimmc414•8h ago•7 comments

Show HN: InstantVideos.org – short documentaries in ~30 seconds

https://instantvideos.org/
3•pw•52m ago•1 comments