Skip to content

ciekawy/webgpu-embed-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Experiment: Running a Quantized BGE-M3 Embedding Model in the Browser for Full Privacy

This experiment aims to demonstrate running a quantized BGE-M3 embedding model directly in the browser (unfortunately model is to big for mobile browsers), supporting multilingual and cross-lingual similarities while ensuring full privacy. The model runs entirely on the client side, avoiding any data transmission to external servers.

Results are not ideal but are good enough for many use cases. I started this after taking many notes on some broad topic and was not sure if some thought was already touched on previously. The original version was implemented in Python, but later I got interested in seeing how it can be done in the browser.

The implementation uses the @xenova/transformers and onnxruntime-web packages with a BGE-M3 model that is 570MB in size after being 8-bit quantized.

About

privacy first in-browser embeddings bullet list

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published