ai-forever / ruElectra-large

huggingface.co
Total runs: 251
24-hour runs: 2
7-day runs: 73
30-day runs: 76
Model's Last Updated: Noviembre 03 2023

Introduction of ruElectra-large

Model Details of ruElectra-large

ruELECTRA large model (cased) for Embeddings in the Russian language.

The model architecture design, pretraining, and evaluation are documented in our preprint: A Family of Pretrained Transformer Language Models for Russian .

Usage (HuggingFace Models Repository)

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

For better quality, use mean token 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/ruElectra-large")
model = AutoModel.from_pretrained("ai-forever/ruElectra-large")

#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'])

Cite us

@misc{zmitrovich2023family,
      title={A Family of Pretrained Transformer Language Models for Russian}, 
      author={Dmitry Zmitrovich and Alexander Abramov and Andrey Kalmykov and Maria Tikhonova and Ekaterina Taktasheva and Danil Astafurov and Mark Baushenko and Artem Snegirev and Tatiana Shavrina and Sergey Markov and Vladislav Mikhailov and Alena Fenogenova},
      year={2023},
      eprint={2309.10931},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Runs of ai-forever ruElectra-large on huggingface.co

251
Total runs
2
24-hour runs
43
3-day runs
73
7-day runs
76
30-day runs

More Information About ruElectra-large huggingface.co Model

More ruElectra-large license Visit here:

https://choosealicense.com/licenses/mit

ruElectra-large huggingface.co

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

ruElectra-large huggingface.co Url

https://huggingface.co/ai-forever/ruElectra-large

ai-forever ruElectra-large online free

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

ai-forever ruElectra-large online free url in huggingface.co:

https://huggingface.co/ai-forever/ruElectra-large

ruElectra-large install

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

ruElectra-large install url in huggingface.co:

https://huggingface.co/ai-forever/ruElectra-large

Url of ruElectra-large

ruElectra-large huggingface.co Url

Provider of ruElectra-large huggingface.co

ai-forever
ORGANIZATIONS

Other API from ai-forever

huggingface.co

Total runs: 525.5K
Run Growth: 485.9K
Growth Rate: 96.59%
Updated: Noviembre 03 2023
huggingface.co

Total runs: 10.6K
Run Growth: 1.6K
Growth Rate: 14.99%
Updated: Diciembre 05 2023
huggingface.co

Total runs: 8.2K
Run Growth: 5.1K
Growth Rate: 59.45%
Updated: Diciembre 29 2024
huggingface.co

Total runs: 5.9K
Run Growth: 3.6K
Growth Rate: 61.73%
Updated: Diciembre 11 2023
huggingface.co

Total runs: 2.3K
Run Growth: -360
Growth Rate: -15.50%
Updated: Diciembre 05 2023
huggingface.co

Total runs: 1.8K
Run Growth: 78
Growth Rate: 4.35%
Updated: Diciembre 28 2023
huggingface.co

Total runs: 1.3K
Run Growth: -138
Growth Rate: -3.15%
Updated: Diciembre 05 2023
huggingface.co

Total runs: 315
Run Growth: 165
Growth Rate: 52.05%
Updated: Enero 26 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated: Diciembre 24 2021
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated: Junio 08 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated: Septiembre 21 2021