Instructions to use IlyaGusev/rut5_base_headline_gen_telegram with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IlyaGusev/rut5_base_headline_gen_telegram with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="IlyaGusev/rut5_base_headline_gen_telegram")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("IlyaGusev/rut5_base_headline_gen_telegram") model = AutoModelForSeq2SeqLM.from_pretrained("IlyaGusev/rut5_base_headline_gen_telegram") - Inference
- Notebooks
- Google Colab
- Kaggle
RuT5TelegramHeadlines
Model description
Based on rut5-base model
Intended uses & limitations
How to use
from transformers import AutoTokenizer, T5ForConditionalGeneration
model_name = "IlyaGusev/rut5_base_headline_gen_telegram"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name)
article_text = "..."
input_ids = tokenizer(
[article_text],
max_length=600,
add_special_tokens=True,
padding="max_length",
truncation=True,
return_tensors="pt"
)["input_ids"]
output_ids = model.generate(
input_ids=input_ids
)[0]
headline = tokenizer.decode(output_ids, skip_special_tokens=True)
print(headline)
Training data
- Dataset: ru_all_split.tar.gz
Training procedure
- Training script: train.py
- Downloads last month
- 630,532