cointegrated / rubert-tiny2

huggingface.co
Total runs: 320.3K
24-hour runs: -2.9K
7-day runs: -15.5K
30-day runs: -499
Model's Last Updated: December 30 2025
sentence-similarity

Introduction of rubert-tiny2

Model Details of rubert-tiny2

This is an updated version of cointegrated/rubert-tiny : a small Russian BERT-based encoder with high-quality sentence embeddings. This post in Russian gives more details.

The differences from the previous version include:

  • a larger vocabulary: 83828 tokens instead of 29564;
  • larger supported sequences: 2048 instead of 512;
  • sentence embeddings approximate LaBSE closer than before;
  • meaningful segment embeddings (tuned on the NLI task)
  • the model is focused only on Russian.

The model should be used as is to produce sentence embeddings (e.g. for KNN classification of short texts) or fine-tuned for a downstream task.

Sentence embeddings can be produced as follows:

# pip install transformers sentencepiece
import torch
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("cointegrated/rubert-tiny2")
model = AutoModel.from_pretrained("cointegrated/rubert-tiny2")
# model.cuda()  # uncomment it if you have a GPU

def embed_bert_cls(text, model, tokenizer):
    t = tokenizer(text, padding=True, truncation=True, return_tensors='pt')
    with torch.no_grad():
        model_output = model(**{k: v.to(model.device) for k, v in t.items()})
    embeddings = model_output.last_hidden_state[:, 0, :]
    embeddings = torch.nn.functional.normalize(embeddings)
    return embeddings[0].cpu().numpy()

print(embed_bert_cls('привет мир', model, tokenizer).shape)
# (312,)

Alternatively, you can use the model with sentence_transformers :

from sentence_transformers import SentenceTransformer
model = SentenceTransformer('cointegrated/rubert-tiny2')
sentences = ["привет мир", "hello world", "здравствуй вселенная"]
embeddings = model.encode(sentences)
print(embeddings)

Runs of cointegrated rubert-tiny2 on huggingface.co

320.3K
Total runs
-2.9K
24-hour runs
-434
3-day runs
-15.5K
7-day runs
-499
30-day runs

More Information About rubert-tiny2 huggingface.co Model

More rubert-tiny2 license Visit here:

https://choosealicense.com/licenses/mit

rubert-tiny2 huggingface.co

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

cointegrated rubert-tiny2 online free

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

cointegrated rubert-tiny2 online free url in huggingface.co:

https://huggingface.co/cointegrated/rubert-tiny2

rubert-tiny2 install

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

rubert-tiny2 install url in huggingface.co:

https://huggingface.co/cointegrated/rubert-tiny2

Url of rubert-tiny2

Provider of rubert-tiny2 huggingface.co

cointegrated
ORGANIZATIONS

Other API from cointegrated