cointegrated / LaBSE-en-ru

huggingface.co
Total runs: 255.7K
24-hour runs: -12.4K
7-day runs: -46.1K
30-day runs: 225.6K
Model's Last Updated: March 28 2024
feature-extraction

Introduction of LaBSE-en-ru

Model Details of LaBSE-en-ru

LaBSE for English and Russian

This is a truncated version of sentence-transformers/LaBSE , which is, in turn, a port of LaBSE by Google.

The current model has only English and Russian tokens left in the vocabulary. Thus, the vocabulary is 10% of the original, and number of parameters in the whole model is 27% of the original, without any loss in the quality of English and Russian embeddings.

To get the sentence embeddings, you can use the following code:

import torch
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("cointegrated/LaBSE-en-ru")
model = AutoModel.from_pretrained("cointegrated/LaBSE-en-ru")
sentences = ["Hello World", "Привет Мир"]
encoded_input = tokenizer(sentences, padding=True, truncation=True, max_length=64, 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)

The model has been truncated in this notebook . You can adapt it for other languages (like EIStakovskii/LaBSE-fr-de ), models or datasets.

Reference:

Fangxiaoyu Feng, Yinfei Yang, Daniel Cer, Narveen Ari, Wei Wang. Language-agnostic BERT Sentence Embedding . July 2020

License: https://tfhub.dev/google/LaBSE/1

Runs of cointegrated LaBSE-en-ru on huggingface.co

255.7K
Total runs
-12.4K
24-hour runs
-36.1K
3-day runs
-46.1K
7-day runs
225.6K
30-day runs

More Information About LaBSE-en-ru huggingface.co Model

LaBSE-en-ru huggingface.co

LaBSE-en-ru huggingface.co is an AI model on huggingface.co that provides LaBSE-en-ru's model effect (), which can be used instantly with this cointegrated LaBSE-en-ru model. huggingface.co supports a free trial of the LaBSE-en-ru model, and also provides paid use of the LaBSE-en-ru. Support call LaBSE-en-ru model through api, including Node.js, Python, http.

cointegrated LaBSE-en-ru online free

LaBSE-en-ru huggingface.co is an online trial and call api platform, which integrates LaBSE-en-ru's modeling effects, including api services, and provides a free online trial of LaBSE-en-ru, you can try LaBSE-en-ru online for free by clicking the link below.

cointegrated LaBSE-en-ru online free url in huggingface.co:

https://huggingface.co/cointegrated/LaBSE-en-ru

LaBSE-en-ru install

LaBSE-en-ru is an open source model from GitHub that offers a free installation service, and any user can find LaBSE-en-ru on GitHub to install. At the same time, huggingface.co provides the effect of LaBSE-en-ru install, users can directly use LaBSE-en-ru installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

LaBSE-en-ru install url in huggingface.co:

https://huggingface.co/cointegrated/LaBSE-en-ru

Url of LaBSE-en-ru

Provider of LaBSE-en-ru huggingface.co

cointegrated
ORGANIZATIONS

Other API from cointegrated