ydshieh / bert2bert-cnn_dailymail-fp16

huggingface.co
Total runs: 25
24-hour runs: 0
7-day runs: -1
30-day runs: 15
Model's Last Updated: January 09 2022
text-generation

Introduction of bert2bert-cnn_dailymail-fp16

Model Details of bert2bert-cnn_dailymail-fp16

Bert2Bert Summarization with 🤗 EncoderDecoder Framework

[This is a TensorFlow version converted from the original PyTorch Bert2Bert ]

This model is a Bert2Bert model fine-tuned on summarization.

Bert2Bert is a EncoderDecoderModel , meaning that both the encoder and the decoder are bert-base-uncased BERT models. Leveraging the EncoderDecoderFramework , the two pretrained models can simply be loaded into the framework via:

bert2bert = TFEncoderDecoderModel.from_encoder_decoder_pretrained("bert-base-uncased", "bert-base-uncased")

The decoder of an TFEncoderDecoder model needs cross-attention layers and usually makes use of causal masking for auto-regressiv generation. Thus, bert2bert is consequently fined-tuned on the CNN/Daily Mail dataset and the resulting model bert2bert-cnn_dailymail-fp16 is uploaded here.

Example

The model is by no means a state-of-the-art model, but nevertheless produces reasonable summarization results. It was mainly fine-tuned as a proof-of-concept for the 🤗 EncoderDecoder Framework.

The model can be used as follows:

from transformers import AutoTokenizer, TFEncoderDecoderModel

loc = "ydshieh/bert2bert-cnn_dailymail-fp16"
model = TFEncoderDecoderModel.from_pretrained(loc)
tokenizer = AutoTokenizer.from_pretrained(loc)

article = """(CNN)Sigma Alpha Epsilon is under fire for a video showing party-bound fraternity members singing a racist chant. SAE's national chapter suspended the students, but University of Oklahoma President David Boren took it a step further, saying the university's affiliation with the fraternity is permanently done. The news is shocking, but it's not the first time SAE has faced controversy. SAE was founded March 9, 1856, at the University of Alabama, five years before the American Civil War, according to the fraternity website. When the war began, the group had fewer than 400 members, of which "369 went to war for the Confederate States and seven for the Union Army," the website says. The fraternity now boasts more than 200,000 living alumni, along with about 15,000 undergraduates populating 219 chapters and 20 "colonies" seeking full membership at universities. SAE has had to work hard to change recently after a string of member deaths, many blamed on the hazing of new recruits, SAE national President Bradley Cohen wrote in a message on the fraternity's website. The fraternity's website lists more than 130 chapters cited or suspended for "health and safety incidents" since 2010. At least 30 of the incidents involved hazing, and dozens more involved alcohol. However, the list is missing numerous incidents from recent months. Among them, according to various media outlets: Yale University banned the SAEs from campus activities last month after members allegedly tried to interfere with a sexual misconduct investigation connected to an initiation rite. Stanford University in December suspended SAE housing privileges after finding sorority members attending a fraternity function were subjected to graphic sexual content. And Johns Hopkins University in November suspended the fraternity for underage drinking. "The media has labeled us as the 'nation's deadliest fraternity,' " Cohen said. In 2011, for example, a student died while being coerced into excessive alcohol consumption, according to a lawsuit. SAE's previous insurer dumped the fraternity. "As a result, we are paying Lloyd's of London the highest insurance rates in the Greek-letter world," Cohen said. Universities have turned down SAE's attempts to open new chapters, and the fraternity had to close 12 in 18 months over hazing incidents."""

input_ids = tokenizer(article, return_tensors="tf").input_ids
output_ids = model.generate(input_ids)
summary = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(summary)

# should produce
# sae was founded in 1856, five years before the civil war. the fraternity has had to work hard to change recently. the university of oklahoma president says the university's affiliation with the fraternity is permanently done. the sae has had a string of members in recent mon ths.
Training script:

For the original PyTorch BERT2BERT model, please follow this tutorial to see how to warm-start a BERT2BERT model: https://colab.research.google.com/drive/1WIk2bxglElfZewOHboPFNj8H44_VAyKE?usp=sharing

The obtained results should be:

- Rouge2 - mid -precision Rouge2 - mid - recall Rouge2 - mid - fmeasure
CNN/Daily Mail 16.12 17.07 16.1

Runs of ydshieh bert2bert-cnn_dailymail-fp16 on huggingface.co

25
Total runs
0
24-hour runs
0
3-day runs
-1
7-day runs
15
30-day runs

More Information About bert2bert-cnn_dailymail-fp16 huggingface.co Model

bert2bert-cnn_dailymail-fp16 huggingface.co

bert2bert-cnn_dailymail-fp16 huggingface.co is an AI model on huggingface.co that provides bert2bert-cnn_dailymail-fp16's model effect (), which can be used instantly with this ydshieh bert2bert-cnn_dailymail-fp16 model. huggingface.co supports a free trial of the bert2bert-cnn_dailymail-fp16 model, and also provides paid use of the bert2bert-cnn_dailymail-fp16. Support call bert2bert-cnn_dailymail-fp16 model through api, including Node.js, Python, http.

bert2bert-cnn_dailymail-fp16 huggingface.co Url

https://huggingface.co/ydshieh/bert2bert-cnn_dailymail-fp16

ydshieh bert2bert-cnn_dailymail-fp16 online free

bert2bert-cnn_dailymail-fp16 huggingface.co is an online trial and call api platform, which integrates bert2bert-cnn_dailymail-fp16's modeling effects, including api services, and provides a free online trial of bert2bert-cnn_dailymail-fp16, you can try bert2bert-cnn_dailymail-fp16 online for free by clicking the link below.

ydshieh bert2bert-cnn_dailymail-fp16 online free url in huggingface.co:

https://huggingface.co/ydshieh/bert2bert-cnn_dailymail-fp16

bert2bert-cnn_dailymail-fp16 install

bert2bert-cnn_dailymail-fp16 is an open source model from GitHub that offers a free installation service, and any user can find bert2bert-cnn_dailymail-fp16 on GitHub to install. At the same time, huggingface.co provides the effect of bert2bert-cnn_dailymail-fp16 install, users can directly use bert2bert-cnn_dailymail-fp16 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

bert2bert-cnn_dailymail-fp16 install url in huggingface.co:

https://huggingface.co/ydshieh/bert2bert-cnn_dailymail-fp16

Url of bert2bert-cnn_dailymail-fp16

bert2bert-cnn_dailymail-fp16 huggingface.co Url

Provider of bert2bert-cnn_dailymail-fp16 huggingface.co

ydshieh
ORGANIZATIONS

Other API from ydshieh

huggingface.co

Total runs: 340
Run Growth: 187
Growth Rate: 55.00%
Updated:August 19 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 28 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 23 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 18 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 28 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 06 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 13 2024