ruT5-base-pls

A fine-tuned version of ai-forever/ruT5-base (formerly sberbank-ai/ruT5-base) for text simplification on Russian text: given a complex sentence, the model generates a simpler paraphrase that preserves its meaning.

Training data

Training metrics

From train.logs:

Metric Value
BLEU 100.0
SARI 28.699
FKGL 31.931

⚠️ A BLEU score of exactly 100.0 is unusual for a generation task and typically indicates the reported score was computed on a degenerate case (e.g. reference == input, or evaluation on the training set itself) rather than genuine model quality — worth re-checking on a proper held-out test set before treating this as the model's real performance.

Usage

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):
    """
    Simplify a complex text with the model.
    :param source: complex input text
    :param model: the model
    :param tokenizer: the tokenizer
    :return: simplified text generated by the model
    """
    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)

Limitations

  • FKGL (Flesch–Kincaid Grade Level) of 31.931 is far higher than typical simplified-text targets (usually single digits) — worth confirming this metric was computed correctly before drawing conclusions from it.
  • No license has been specified for this model card — add the appropriate license field before publishing, based on the licenses of the base model and the training datasets used.
Downloads last month
324
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for r1char9/ruT5-base-pls

Finetuned
(24)
this model

Collection including r1char9/ruT5-base-pls