CoolFace
Modelpublic

elastic/multilingual-e5-small-optimized

sourceHugging Facemitupdated 2y agoView on Hugging Face
17likes225downloads
Model Card

A quantized version of multilingual-e5-small. Quantization was performed per-layer under the same conditions as our ELSERv2 model, as described here.

Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao, Linjun Yang, Daxin Jiang, Rangan Majumder, Furu Wei, arXiv 2022

Benchmarks

We performed a number of small benchmarks to assess both the changes in quality as well as inference latency against the baseline original model.

Quality

Measuring NDCG@10 using the dev split of the MIRACL datasets for select languages, we see mostly a marginal change in quality of the quantized model.

deyoruaresth
multilingual-e5-small0.758620.561930.803090.827780.816720.85072
multilingual-e5-small-optimized0.759920.489340.796680.820170.81350.84316

To test the English out-of-domain performance, we used the test split of various datasets in the BEIR evaluation. Measuring NDCG@10, we see a larger change in SCIFACT, but marginal in the other datasets evaluated.

FIQASCIFACTnfcorpus
multilingual-e5-small0.331260.6770.31004
multilingual-e5-small-optimized0.317340.654840.30126

Performance

Using a PyTorch model traced for Linux and Intel CPUs, we performed performance benchmarking with various lengths of input. Overall, we see on average a 50-20% performance improvement with the optimized model.

input length (characters)multilingual-e5-smallmultilingual-e5-small-optimizedspeedup
0 - 500.01810.0082654.36%
50 - 1000.02750.016440.36%
100 - 1500.03660.023735.25%
150 - 2000.04350.030130.80%
200 - 2500.05140.037926.26%
250 - 3000.05690.04324.43%
300 - 3500.06630.051322.62%
350 - 4000.07370.057621.85%

Disclaimer

This e5 model, as defined, hosted, integrated and used in conjunction with our other Elastic Software is covered by our standard warranty.