by Xenova
Open source · 40k downloads · 10 likes
The *multilingual-e5-small* model is a compact and optimized version of the E5 model, designed to process and understand text across multiple languages. It excels in tasks such as multilingual information retrieval, classification, and text comparison by generating high-quality embeddings (vector representations). Its primary use cases include analyzing semantic similarity between documents, extracting multilingual information, and enhancing recommendation systems. What sets it apart is its efficiency on lightweight devices, particularly through integration with Transformers.js and ONNX weights for optimized performance in web or mobile environments.
https://huggingface.co/intfloat/multilingual-e5-small with ONNX weights to be compatible with Transformers.js.
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @huggingface/transformers
Example: Run feature extraction.
import { pipeline } from '@huggingface/transformers';
const extractor = await pipeline('feature-extraction', 'Xenova/multilingual-e5-small');
const output = await extractor('This is a simple test.');
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).