Sentence Similarity
sentence-transformers
Safetensors
Portuguese
bert
passage-retrieval
pruned
text-embeddings-inference
Instructions to use cnmoro/portuguese-multilingual-e5-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use cnmoro/portuguese-multilingual-e5-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("cnmoro/portuguese-multilingual-e5-small") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
π΅πΉ portuguese-multilingual-e5-small
This model is a 66.2% smaller version of intfloat/multilingual-e5-small for the Portuguese language, created using the mtem-pruner space.
This pruned model should perform similarly to the original model for Portuguese 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 Portuguese 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 = "cnmoro/portuguese-multilingual-e5-small"
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("cnmoro/portuguese-multilingual-e5-small")
Credits: cc @antoinelouis
- Downloads last month
- 13
Model tree for cnmoro/portuguese-multilingual-e5-small
Base model
intfloat/multilingual-e5-small