This checkpoint should be loaded into BartForConditionalGeneration.frompretrained. See the BART docs for more information.
Search public pages, research tools, and SAVRN solutions.
Open-weight model · Summarization
by Manuel Romero mrm8488/bert-small2bert-small-finetuned-cnn_daily_mail-summarization
This model is a warm-started BERT2BERT (small) model fine-tuned on the CNN/Dailymail summarization dataset. The model achieves a 17.37 ROUGE-2 score on CNN/Dailymail's test dataset.
By Manuel Romero, published under apache-2.0, revision 3ecce850ed19.
This model is a warm-started BERT2BERT (small) model fine-tuned on the CNN/Dailymail summarization dataset. The model achieves a 17.37 ROUGE-2 score on CNN/Dailymail's test dataset. For more details on how the model was fine-tuned, please refer to this notebook.
This model is a warm-started BERT2BERT (small) model fine-tuned on the CNN/Dailymail summarization dataset.
The model achieves a 17.37 ROUGE-2 score on CNN/Dailymail's test dataset.
For more details on how the model was fine-tuned, please refer to this notebook.
| Metric | # Value |
|---|---|
| ROUGE-2 | 17.37 |
from transformers import BertTokenizerFast, EncoderDecoderModel
import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
tokenizer = BertTokenizerFast.from_pretrained('mrm8488/bert-small2bert-small-finetuned-cnn_daily_mail-summarization')
model = EncoderDecoderModel.from_pretrained('mrm8488/bert-small2bert-small-finetuned-cnn_daily_mail-summarization').to(device)
def generate_summary(text):
# cut off at BERT max length 512
inputs = tokenizer([text], padding="max_length", truncation=True, max_length=512, return_tensors="pt")
input_ids = inputs.input_ids.to(device)
attention_mask = inputs.attention_mask.to(device)
output = model.generate(input_ids, attention_mask=attention_mask)
return tokenizer.decode(output[0], skip_special_tokens=True)
text = "your text to be summarized here..."
generate_summary(text)
Created by Manuel Romero/@mrm8488 | LinkedIn
Made with in Spain
8 files, 247.4 MB in total. The weights are 2 files totalling 247.2 MB in bin.
| File | Type | Size | SHA-256 |
|---|---|---|---|
| pytorch_model.bin | Weights | 247.2 MB | e755e8e29887 |
| training_args.bin | Weights | 2.0 KB | 44c10ac720f9 |
| config.json | Configuration | 3.6 KB | — |
| special_tokens_map.json | Configuration | 112 B | — |
| README.md | Documentation | 1.8 KB | — |
| .gitattributes | Repository | 345 B | — |
| tokenizer_config.json | Tokenizer | 324 B | — |
| vocab.txt | Tokenizer | 231.5 KB | — |
Released by Manuel Romero through its official repository on Hugging Face. Read the license.
| Precision | Weights in memory |
|---|---|
| As published | 247.2 MB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Yes. bert-small2bert-small-finetuned-cnn_daily_mail-summarization is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.
This checkpoint should be loaded into BartForConditionalGeneration.frompretrained. See the BART docs for more information.
Original TF 1 code here Authors: Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu on Dec 18, 2019 The following is copied from the authors' README. We train a pegasus model with sampled gap sentence ratios on both C4 and HugeNews, and stochastically sample important sentences. The updated the results are reported in this table. The "Mixed & Stochastic" model has the following changes: - trained on both C4 and HugeNews (dataset mixture is weighted by their number of examples). - trained for 1.5M instead of 500k (we observe slower convergence on pretraining perplexity). - the model uniformly sample a gap sentence ratio between 15% and 45%. - importance sentences are sampled using a…
This model was trained using Amazon SageMaker and the new Hugging Face Deep Learning container.
This checkpoint should be loaded into BartForConditionalGeneration.frompretrained. See the BART docs for more information.
This repository contains the mT5 checkpoint finetuned on the 45 languages of XL-Sum dataset. For finetuning details and scripts, see the paper and the official repository. Scores on the XL-Sum test sets are as follows: Language | ROUGE-1 / ROUGE-2 / ROUGE-L Amharic | 20.0485 / 7.4111 / 18.0753 Arabic | 34.9107 / 14.7937 / 29.1623 Azerbaijani | 21.4227 / 9.5214 / 19.3331 Bengali | 29.5653 / 12.1095 / 25.1315 Burmese | 15.9626 / 5.1477 / 14.1819 Chinese (Simplified) | 39.4071 / 17.7913 / 33.406 Chinese (Traditional) | 37.1866 / 17.1432 / 31.6184 English | 37.601 / 15.1536 / 29.8817 French | 35.3398 / 16.1739 / 28.2041 Gujarati | 21.9619 / 7.7417 / 19.86 Hausa | 39.4375 / 17.6786 / 31.6667…