How to use from the
Use from the
sentence-transformers library
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("cnmoro/bert-tiny-embeddings-english-portuguese")

sentences = [
    "dogs are playful",
    "i love cats",
    "i love dogs"
]
embeddings = model.encode(sentences)

similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Model Trained Using AutoTrain

  • Problem type: Sentence Transformers

Validation Metrics

loss: 0.056979671120643616

Info

This is the bert-tiny model finetuned on 15B tokens for embedding/feature extraction, for English and Brazillian Portuguese languages.

The output vector size is 128.

This model only has 4.4M params but the quality of the embeddings punch way above its size after tuning.

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SentenceTransformer

# Download from the Hugging Face Hub
model = SentenceTransformer("cnmoro/bert-tiny-embeddings-english-portuguese")
# Run inference
sentences = [
    'first passage',
    'second passage'
]
embeddings = model.encode(sentences)
print(embeddings.shape)
Downloads last month
132
Safetensors
Model size
4.39M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for cnmoro/bert-tiny-embeddings-english-portuguese

Finetuned
(136)
this model

Collection including cnmoro/bert-tiny-embeddings-english-portuguese