Use this file to discover Exa products, pricing, evaluations, comparisons, use cases, agent interfaces, and technical documentation before exploring further.
JavaScript machine learning libraries train models or run pretrained models in browsers and Node.js. Browser runtimes execute a model on the user's device through WebAssembly or WebGPU rather than on a server. These libraries let web apps classify images, detect faces, and run language models without sending user data to a remote API.
Popularity
ONNX Runtime Node has the most monthly downloads in this comparison, at 36.3M.
async (event) => {
// Retrieve the translation pipeline. When called for the first time, // this will load the pipeline and save it for future use. const translator = await MyTranslationPipeline.getInstance((x) => {
// We also add a progress callback to the pipeline so that we can // track model loading. self.postMessage(x);
});
// Capture partial output as it streams from the pipeline const streamer = new TextStreamer(translator.tokenizer, {
skip_prompt: true,
skip_special_tokens: true,
callback_function: function (text) {
self.postMessage({
status: "update",
output: text,
});
},
});
// Actually perform the translation const output = await translator(event.data.text, {
tgt_lang: event.data.tgt_lang,
src_lang: event.data.src_lang,
// Allows for partial output streamer,
});
// Send the output back to the main thread self.postMessage({
status: "complete",
output,
});
}
skmeans
Clusters one-dimensional and multidimensional data with k-means and k-means++ in Node.js and the browser.
TensorFlow.js suits apps that build and train models in JavaScript. Transformers.js suits apps that run pretrained models in the browser. ONNX Runtime Node suits Node.js servers that execute exported ONNX models.
MediaPipe is Google's set of ready task models for image and video input. MediaPipe Tasks Vision runs those vision tasks, such as face landmark detection, in the browser.
WebLLM runs language model chats in the browser with hardware acceleration through WebGPU. It accepts requests in an OpenAI-style chat completion format.
Transformers.js runs pretrained models exported to ONNX directly in the browser. It defaults to CPU and WebAssembly, with optional WebGPU.
TensorFlow.js builds and trains models from tensor operations and layers. Transformers.js runs existing pretrained models without a training step.
For coding agents
Found your machine learning library? Help your agent use it.
Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.