Sentence Similarity
sentence-transformers
Safetensors
English
xlm-roberta
passage-retrieval
pruned
text-embeddings-inference
Instructions to use lainlives/english-multilingual-e5-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use lainlives/english-multilingual-e5-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("lainlives/english-multilingual-e5-base") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
🇬🇧 english-multilingual-e5-base
This model is a 58.0% smaller version of intfloat/multilingual-e5-base for the English language, created using the mtem-pruner space.
This pruned model should perform similarly to the original model for English language tasks with a much smaller memory footprint. However, it may not perform well for other languages present in the original multilingual model as tokens not commonly used in English were removed from the original multilingual model's vocabulary.
Usage
You can use this model with the Transformers library:
from transformers import AutoModel, AutoTokenizer
model_name = "lainlives/english-multilingual-e5-base"
model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True, use_fast=True)
Or with the sentence-transformers library:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("lainlives/english-multilingual-e5-base")
Credits: cc @antoinelouis
- Downloads last month
- 4
Model tree for lainlives/english-multilingual-e5-base
Base model
intfloat/multilingual-e5-base