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.