Downloads · 30 days
127
8% of all-time downloads
slone/LaBSE-en-ru-myv-v1
LaBSE-en-ru-myv-v1 is a feature extraction model from slone. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as cc-by-sa-4.0.
This is an Erzya (myv, cyrillic script) sentence encoder from the paper The first neural machine translation system for the Erzya language.
Downloads · 30 days
127
8% of all-time downloads
All-time downloads
1.6K
Public
Parameters
144M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin575 MB · 50%
How the weights are stored.
F32144M · 100%
From the Hugging Face model README
This is an Erzya (myv, cyrillic script) sentence encoder from the paper The first neural machine translation system for the Erzya language.
It is based on sentence-transformers/LaBSE (license here), but with updated vocabulary and checkpoint:
ru-myv corpus;myv monolingual data;ru-myv translations from random pairs.The model can be used as a sentence encoder or a masked language modelling predictor for Erzya, or fine-tuned for any downstream NLU dask.
Sentence embeddings can be produced with the code below:
import torch
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("slone/LaBSE-en-ru-myv-v1")
model = AutoModel.from_pretrained("slone/LaBSE-en-ru-myv-v1")
sentences = ["Hello World", "Привет Мир", "Шумбратадо Мастор"]
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
with torch.no_grad():
model_output = model(**encoded_input)
embeddings = model_output.pooler_output
embeddings = torch.nn.functional.normalize(embeddings)
print(embeddings.shape) # torch.Size([3, 768])