APIUp to 28% cheaper than official pricesTry the API →
Hermes
Back to News

Xenova's BGE-Small Brings Private Semantic Search Directly to JavaScript

Xenova/bge-small-en-v1.5 is an ONNX port of BAAI's embedding model for Transformers.js , running fully client-side. 33.4M parameters, 384-dimensional output vectors, 512-token max input, MIT license. Quantized int8/uint8 weights are around 32MB, small enough to ship in a web app.

Xenova's BGE-Small Brings Private Semantic Search Directly to JavaScript
Source
AlphaSignal
Published
Author
AlphaSignal
Read
2 min read

Takeaways

  • Xenova/bge-small-en-v1.5 is an ONNX port of BAAI's embedding model for Transformers.js , running fully client-side.
  • 33.4M parameters, 384-dimensional output vectors, 512-token max input, MIT license.
  • Quantized int8/uint8 weights are around 32MB, small enough to ship in a web app.
  • Scores 53.86 on MTEB English v2 retrieval, close to the larger bge-base-en-v1.5.
  • Install via npm i @huggingface/transformers and use the feature-extraction pipeline.
  • Over 850K downloads on Hugging Face , used in browser-based vector DBs and local RAG tools.

The Xenova model page packages BAAI’s compact English embedding model as ONNX assets that Transformers.js can execute in a browser or Node.js. Applications can generate 384-dimensional vectors without calling a hosted embedding API or running a Python inference service, enabling private semantic search while shifting work to the user’s device.

The Hub page reported 757,481 downloads in the prior month and 20 likes, indicating substantial use for a client-side embedding model.

ONNX is the bridge to JavaScript

BAAI’s upstream model card describes a 33.4-million-parameter English model trained for dense retrieval, semantic similarity, clustering, and related tasks. Its v1.5 training produces a more useful spread of similarity scores and reduces dependence on query instructions.

The Xenova repository supplies the tokenizer, configuration, and ONNX weight files in the layout Transformers.js expects. ONNX stores the network as a portable computation graph, while Transformers.js handles tokenization, model loading, pooling, and execution through ONNX Runtime.

Browser inference uses WebAssembly by default. Supported browsers can request WebGPU by passing { device: 'webgpu' } when creating the pipeline. Node.js uses the same high-level API, so one integration can cover browser, Electron, and server-side JavaScript environments.

Thirty-three million parameters, 384 values

Model size determines download time, memory use, and inference latency on client hardware. The full-precision ONNX file is about 127 MB, while the 8-bit variants are roughly 32 to 34 MB before adding the tokenizer and runtime files.

PropertyValuePractical effect
Parameters33.4 millionLower compute and memory requirements than base-sized BGE models
Embedding width384 valuesAbout 1.5 KB per vector in

Reporting is indexed from AlphaSignal. Rights remain with the original publisher and cited sources.

Read original report

Sources

  1. 01huggingface.co
  2. 02huggingface.co
  3. 03supermemory.ai
  4. 04huggingface.co
  5. 05github.com