ai-forever / sbert_large_nlu_ru

huggingface.co
Total runs: 61.0K
24-hour runs: 0
7-day runs: 37.1K
30-day runs: 23.4K
Model's Last Updated: April 18 2025
feature-extraction

Introduction of sbert_large_nlu_ru

Model Details of sbert_large_nlu_ru

BERT large model (uncased) for Sentence Embeddings in Russian language.

The model is described in this article
For better quality, use mean token embeddings.

Usage (HuggingFace Models Repository)

You can use the model directly from the model repository to compute sentence embeddings:

from transformers import AutoTokenizer, AutoModel
import torch


#Mean Pooling - Take attention mask into account for correct averaging
def mean_pooling(model_output, attention_mask):
    token_embeddings = model_output[0] #First element of model_output contains all token embeddings
    input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
    sum_embeddings = torch.sum(token_embeddings * input_mask_expanded, 1)
    sum_mask = torch.clamp(input_mask_expanded.sum(1), min=1e-9)
    return sum_embeddings / sum_mask



#Sentences we want sentence embeddings for
sentences = ['Привет! Как твои дела?',
             'А правда, что 42 твое любимое число?']

#Load AutoModel from huggingface model repository
tokenizer = AutoTokenizer.from_pretrained("ai-forever/sbert_large_nlu_ru")
model = AutoModel.from_pretrained("ai-forever/sbert_large_nlu_ru")

#Tokenize sentences
encoded_input = tokenizer(sentences, padding=True, truncation=True, max_length=24, return_tensors='pt')

#Compute token embeddings
with torch.no_grad():
    model_output = model(**encoded_input)

#Perform pooling. In this case, mean pooling
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])

Authors

Runs of ai-forever sbert_large_nlu_ru on huggingface.co

61.0K
Total runs
0
24-hour runs
16.3K
3-day runs
37.1K
7-day runs
23.4K
30-day runs

More Information About sbert_large_nlu_ru huggingface.co Model

More sbert_large_nlu_ru license Visit here:

https://choosealicense.com/licenses/mit

sbert_large_nlu_ru huggingface.co

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

sbert_large_nlu_ru huggingface.co Url

https://huggingface.co/ai-forever/sbert_large_nlu_ru

ai-forever sbert_large_nlu_ru online free

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

ai-forever sbert_large_nlu_ru online free url in huggingface.co:

https://huggingface.co/ai-forever/sbert_large_nlu_ru

sbert_large_nlu_ru install

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

sbert_large_nlu_ru install url in huggingface.co:

https://huggingface.co/ai-forever/sbert_large_nlu_ru

Url of sbert_large_nlu_ru

sbert_large_nlu_ru huggingface.co Url

Provider of sbert_large_nlu_ru huggingface.co

ai-forever
ORGANIZATIONS

Other API from ai-forever

huggingface.co

Total runs: 103.6K
Run Growth: -22.1K
Growth Rate: -21.35%
Updated:August 12 2026
huggingface.co

Total runs: 14.3K
Run Growth: 10.3K
Growth Rate: 73.33%
Updated:December 05 2023
huggingface.co

Total runs: 1.9K
Run Growth: 14
Growth Rate: 0.71%
Updated:December 12 2023
huggingface.co

Total runs: 1.1K
Run Growth: 699
Growth Rate: 68.66%
Updated:December 28 2023
huggingface.co

Total runs: 516
Run Growth: -161
Growth Rate: -31.51%
Updated:January 26 2023
huggingface.co

Total runs: 439
Run Growth: 110
Growth Rate: 26.44%
Updated:December 05 2023