Downloads · 30 days
36
1% of all-time downloads
a1noack/bart-large-gigaword
bart-large-gigaword is a summarization model from a1noack. Use it when you need a shorter version of a longer text. It is set up for transformers. The card lists the license as mit.
- This model was created by fine-tuning the facebook/bart-large-cnn weights (also on HuggingFace) for the Gigaword dataset. The model was fine-tuned on the Gigaword training set for 3 epochs, and the model with the hi…
Downloads · 30 days
36
1% of all-time downloads
All-time downloads
6.9K
Public
Repo size
3.3 GB
Likes
1
Public
Click a slice to open those files.
.bin1.6 GB · 100%
From the Hugging Face model README
facebook/bart-large-cnn weights (also on HuggingFace) for the Gigaword dataset. The model was fine-tuned on the Gigaword training set for 3 epochs, and the model with the highest ROUGE-1 score on the training set batches was kept.from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("a1noack/bart-large-gigaword")
google/pegasus-gigaword, which achieves 39.12 / 19.86 / 36.24.text_list is a list of input text string.input_ids_list = tokenizer(text_list, truncation=True, max_length=128,
return_tensors='pt', padding=True)['input_ids']
output_ids_list = model.generate(input_ids_list, min_length=0)
outputs_list = tokenizer.batch_decode(output_ids_list, skip_special_tokens=True,
clean_up_tokenization_spaces=False)