Instructions to use RussianNLP/FRED-T5-Summarizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RussianNLP/FRED-T5-Summarizer 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="RussianNLP/FRED-T5-Summarizer")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("RussianNLP/FRED-T5-Summarizer") model = AutoModelForSeq2SeqLM.from_pretrained("RussianNLP/FRED-T5-Summarizer") - Notebooks
- Google Colab
- Kaggle
Specify the degree of summarization
#2
by Rina00 - opened
Hi!
Is there any way I can set how much I need to summarize the text? For example, up to 10 words. Now, when specifying the maximum of words, he simply cuts off the text.
Hi!
This model is trained to sum up to 40-60 tokens on average, it is at this length of the target sequence that the best performance is achieved. For your task, I advise you to try this model: https://huggingface.co/utrobinmv/t5_summary_en_ru_zh_base_2048