Instructions to use human-centered-summarization/financial-summarization-pegasus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use human-centered-summarization/financial-summarization-pegasus 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="human-centered-summarization/financial-summarization-pegasus")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("human-centered-summarization/financial-summarization-pegasus") model = AutoModelForSeq2SeqLM.from_pretrained("human-centered-summarization/financial-summarization-pegasus") - Inference
- Notebooks
- Google Colab
- Kaggle
Is there a way to provide instruction?
Summaries often lack the most important part of the story - the subject. The model does not appear to "know" how to perform a context relevant summary and seems more akin to a simple parametric summarization module.
@vmajor Apologies for taking so long to reply, this fell through the cracks.
Thanks for the feedback! The model was fine-tuned for financial summarization and is designed to generate summaries directly from the input text rather than from additional instructions. If you are seeing cases where the main subject of the story is not reflected in the summary, that would be an interesting case to investigate.
However, this does not necessarily indicate that the model lacks contextual understanding in general. Summarization quality can vary depending on the source document, writing style, and the examples represented in the training data.
If you are interested in a more sophisticated version of the model, trained on a larger corpus and adapted to your specific needs, please contact us at info@medoid.ai.