Transformers
PyTorch
JAX
Safetensors
Russian
t5
text2text-generation
normalization
denoising autoencoder
russian
text-generation-inference
Run this model with HF Jobs
Run cointegrated/rut5-small-normalizer on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/cointegrated/rut5-small-normalizer. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/cointegrated/rut5-small-normalizer on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use cointegrated/rut5-small-normalizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cointegrated/rut5-small-normalizer with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("cointegrated/rut5-small-normalizer") model = AutoModelForSeq2SeqLM.from_pretrained("cointegrated/rut5-small-normalizer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
This is a small Russian denoising autoencoder. It can be used for restoring corrupted sentences.
This model was produced by fine-tuning the rut5-small model on the task of reconstructing a sentence:
- restoring word positions (after slightly shuffling them)
- restoring dropped words and punctuation marks (after dropping some of them randomly)
- restoring inflection of words (after changing their inflection randomly using natasha and pymorphy2 packages)
The fine-tuning was performed on a Leipzig web corpus of Russian sentences.
The model can be applied as follows:
# !pip install transformers sentencepiece
import torch
from transformers import T5ForConditionalGeneration, T5Tokenizer
tokenizer = T5Tokenizer.from_pretrained("cointegrated/rut5-small-normalizer")
model = T5ForConditionalGeneration.from_pretrained("cointegrated/rut5-small-normalizer")
text = 'меня тобой не понимать'
inputs = tokenizer(text, return_tensors='pt')
with torch.no_grad():
hypotheses = model.generate(
**inputs,
do_sample=True, top_p=0.95,
num_return_sequences=5,
repetition_penalty=2.5,
max_length=32,
)
for h in hypotheses:
print(tokenizer.decode(h, skip_special_tokens=True))
A possible output is:
# Мне тебя не понимать.
# Если бы ты понимаешь меня?
# Я с тобой не понимаю.
# Я тебя не понимаю.
# Я не понимаю о чем ты.
- Downloads last month
- 395
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support