Downloads · 30 days
39
3% of all-time downloads
Ayham/roberta_gpt2_summarization_cnn_dailymail
roberta_gpt2_summarization_cnn_dailymail is a machine learning model from Ayham. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
39
3% of all-time downloads
All-time downloads
1.4K
Public
Repo size
3.4 GB
Likes
1
Public
Click a slice to open those files.
.bin1.1 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of on the cnn_dailymail dataset.
This model uses RoBerta encoder and GPT2 decoder and fine-tuned on the summarization task. It got Rouge scores as follows:
Rouge1= 35.886
Rouge2= 16.292
RougeL= 23.499
To use its API:
from transformers import RobertaTokenizerFast, GPT2Tokenizer, EncoderDecoderModel
model = EncoderDecoderModel.from_pretrained("Ayham/roberta_gpt2_summarization_cnn_dailymail")
input_tokenizer = RobertaTokenizerFast.from_pretrained('roberta-base')
output_tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
article = """Your Input Text"""
input_ids = input_tokenizer(article, return_tensors="pt").input_ids
output_ids = model.generate(input_ids)
print(output_tokenizer.decode(output_ids[0], skip_special_tokens=True))
More information needed
More information needed
The following hyperparameters were used during training: