r1char9 / ruT5-base-pls

huggingface.co
Total runs: 5
24-hour runs: 0
7-day runs: -5
30-day runs: -5
Model's Last Updated: January 27 2024
text-generation

Introduction of ruT5-base-pls

Model Details of ruT5-base-pls

Данная модель является дообучнной версией "ai-forever/ruT5-base" (ранее"sberbank-ai/ruT5-base") на задаче упрощения текста (text simplification). Набор данных был собран из корпуса "RuSimpleSentEval" ( https://github.com/dialogue-evaluation/RuSimpleSentEval ), а также "RuAdapt" ( https://github.com/Digital-Pushkin-Lab/RuAdapt ). Метрики обучения bleu:100.0 sari:28.699 fkgl:31.931 (из файла "train.logs")

import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

model_name = "r1char9/ruT5-base-pls"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)

input_text='''Война Советского Союза против фашистской Германии и её союзников
              (Венгрии, Италии, Румынии, Словакии, Хорватии, Финляндии, Японии);
              составная часть Второй мировой войны 1939-1945 гг.'''

def example(source, model, tokenizer):
    """
    Пример упрощения текста моделью
    :param source: Сложный текст
    :param model: Модель
    :param tokenizer: Токенизатор
    :return: Текст, упрощенный моделью
    """
    print(f'SOURCE: {source}')
    input_ids, attention_mask = tokenizer(source, return_tensors = 'pt').values()
    with torch.no_grad():
        output = model.generate(input_ids = input_ids.to(model.device),
                 attention_mask = attention_mask.to(model.device),
                 max_new_tokens=input_ids.size(1)*2, min_length=0)
    return tokenizer.decode(output.squeeze(0), skip_special_tokens = True)

example(input_text, model, tokenizer)

Runs of r1char9 ruT5-base-pls on huggingface.co

5
Total runs
0
24-hour runs
-2
3-day runs
-5
7-day runs
-5
30-day runs

More Information About ruT5-base-pls huggingface.co Model

ruT5-base-pls huggingface.co

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

ruT5-base-pls huggingface.co Url

https://huggingface.co/r1char9/ruT5-base-pls

r1char9 ruT5-base-pls online free

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

r1char9 ruT5-base-pls online free url in huggingface.co:

https://huggingface.co/r1char9/ruT5-base-pls

ruT5-base-pls install

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

ruT5-base-pls install url in huggingface.co:

https://huggingface.co/r1char9/ruT5-base-pls

Url of ruT5-base-pls

ruT5-base-pls huggingface.co Url

Provider of ruT5-base-pls huggingface.co

r1char9
ORGANIZATIONS

Other API from r1char9

huggingface.co

Total runs: 74
Run Growth: 0
Growth Rate: 0.00%
Updated:June 15 2024
huggingface.co

Total runs: 9
Run Growth: -14
Growth Rate: -155.56%
Updated:June 14 2024