Back to Trending
Modelsummarization
human-centered-summarization

human-centered-summarization/financial-summarization-pegasus

PEGASUS for Financial Summarization This model was fine-tuned on a novel financial news dataset, which consists of 2K articles from Bloomberg(https://www.bloomberg.com/europe), on topics such as stock, markets, currencies, rate and cryptocurrencies....

160likes
2.0kdownloads
4views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: dataset:xsum

#1 Repository of the week

1
TINIX TRENDING·Topic: summarization

#1 Repository of the week

1
TINIX TRENDING·Topic: arxiv:1912.08777

#1 Repository of the week

PEGASUS for Financial Summarization

This model was fine-tuned on a novel financial news dataset, which consists of 2K articles from Bloomberg, on topics such as stock, markets, currencies, rate and cryptocurrencies.

It is based on the PEGASUS model and in particular PEGASUS fine-tuned on the Extreme Summarization (XSum) dataset: google/pegasus-xsum model. PEGASUS was originally proposed by Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu in PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization.

Note: This model serves as a base version. For an even more advanced model with significantly enhanced performance, please check out our advanced version on Rapid API. The advanced model offers more than a 16% increase in ROUGE scores (similarity to a human-generated summary) compared to our base model. Moreover, our advanced model also offers several convenient plans tailored to different use cases and workloads, ensuring a seamless experience for both personal and enterprise access.

How to use

We provide a simple snippet of how to use this model for the task of financial summarization in PyTorch.

from transformers import PegasusTokenizer, PegasusForConditionalGeneration, TFPegasusForConditionalGeneration

# Let's load the model and the tokenizer 
model_name = "human-centered-summarization/financial-summarization-pegasus"
tokenizer = PegasusTokenizer.from_pretrained(model_name)
model = PegasusForConditionalGeneration.from_pretrained(model_name) # If you want to use the Tensorflow model 
                                                                    # just replace with TFPegasusForConditionalGeneration


# Some text to summarize here
text_to_summarize = "National Commercial Bank (NCB), Saudi Arabia’s largest lender by assets, agreed to buy rival Samba Financial Group for $15 billion in the biggest banking takeover this year.NCB will pay 28.45 riyals ($7.58) for each Samba share, according to a statement on Sunday, valuing it at about 55.7 billion riyals. NCB will offer 0.739 new shares for each Samba share, at the lower end of the 0.736-0.787 ratio the banks set when they signed an initial framework agreement in June.The offer is a 3.5% premium to Samba’s Oct. 8 closing price of 27.50 riyals and about 24% higher than the level the shares traded at before the talks were made public. Bloomberg News first reported the merger discussions.The new bank will have total assets of more than $220 billion, creating the Gulf region’s third-largest lender. The entity’s $46 billion market capitalization nearly matches that of Qatar National Bank QPSC, which is still the Middle East’s biggest lender with about $268 billion of assets."

# Tokenize our text
# If you want to run the code in Tensorflow, please remember to return the particular tensors as simply as using return_tensors = 'tf'
input_ids = tokenizer(text_to_summarize, return_tensors="pt").input_ids

# Generate the output (Here, we use beam search but you can also use any other strategy you like)
output = model.generate(
    input_ids, 
    max_length=32, 
    num_beams=5, 
    early_stopping=True
)

# Finally, we can print the generated summary
print(tokenizer.decode(output[0], skip_special_tokens=True))
# Generated Output: Saudi bank to pay a 3.5% premium to Samba share price. Gulf region’s third-largest lender will have total assets of $220 billion

Evaluation Results

The results before and after the fine-tuning on our dataset are shown below:

Fine-tuningR-1R-2R-LR-S
Yes23.556.9918.1421.36
No13.82.410.6312.03

Citation

You can find more details about this work in the following workshop paper. If you use our model in your research, please consider citing our paper:

T. Passali, A. Gidiotis, E. Chatzikyriakidis and G. Tsoumakas. 2021. Towards Human-Centered Summarization: A Case Study on Financial News. In Proceedings of the First Workshop on Bridging Human-Computer Interaction and Natural Language Processing(pp. 21–27). Association for Computational Linguistics.

BibTeX entry:

@inproceedings{passali-etal-2021-towards,
    title = "Towards Human-Centered Summarization: A Case Study on Financial News",
    author = "Passali, Tatiana  and Gidiotis, Alexios  and Chatzikyriakidis, Efstathios  and Tsoumakas, Grigorios",
    booktitle = "Proceedings of the First Workshop on Bridging Human{--}Computer Interaction and Natural Language Processing",
    month = apr,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2021.hcinlp-1.4",
    pages = "21--27",
}

Support

Contact us at info@medoid.ai if you are interested in a more sophisticated version of the model, trained on more articles and adapted to your needs!

More information about Medoid AI:

Similar Projects

Discover other similar projects and AI models.

Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
Modelfill-mask
google-bert/bert-base-uncased

BERT base model (uncased) Pretrained model on English language using a masked language modeling (MLM) objective. It was introduced in this paper(https://arxiv.org/abs/1810.04805) and first released in this repository(https://github.com/google-resear...

♥0
32.4M
Feb 19, 2024
Modelfeature-extraction
BAAI/bge-small-en-v1.5

FlagEmbedding Model List | FAQ | Usage | Evaluation | Train | Contact | Citation | License More details please refer to our Github: FlagEmbedding(https://github.com/FlagOpen/FlagEmbedding). If you are looking for a model that supports more languages,...

♥0
41.9M
Feb 22, 2024
Modelsentence-similarity
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2

sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic se...

♥0
24.4M
Jan 28, 2026
Modeltext-generation
openai-community/gpt2

GPT-2 Test the whole generation capabilities here: https://transformer.huggingface.co/doc/gpt2-large Pretrained model on English language using a causal language modeling (CLM) objective. It was introduced in this paper(https://d4mucfpksywv.cloudfro...

♥0
30.6M
Feb 19, 2024
Modeltext-ranking
cross-encoder/ms-marco-MiniLM-L6-v2

Cross-Encoder for MS Marco This model was trained on the MS Marco Passage Ranking(https://github.com/microsoft/MSMARCO-Passage-Ranking) task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages...

♥0
52.2M
Aug 9, 2026
Modelsummarization
facebook/bart-large-cnn

BART (large-sized model), fine-tuned on CNN Daily Mail BART model pre-trained on English language, and fine-tuned on CNN Daily Mail(https://huggingface.co/datasets/cnndailymail). It was introduced in the paper BART: Denoising Sequence-to-Sequence Pr...

♥0
1.1M
Feb 13, 2024
Modelsummarization
google/pegasus-xsum

Pegasus Models See Docs: here(https://huggingface.co/transformers/master/modeldoc/pegasus.html) Original TF 1 code here(https://github.com/google-research/pegasus) Authors: Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu on Dec 18, 2019 Ma...

♥0
91.2k
Jan 24, 2023
Modelautomatic-speech-recognition
openai/whisper-large-v3

Whisper Whisper is a state-of-the-art model for automatic speech recognition (ASR) and speech translation, proposed in the paper Robust Speech Recognition via Large-Scale Weak Supervision(https://huggingface.co/papers/2212.04356) by Alec Radford et...

♥0
3.0M
Aug 12, 2024