Migrate model card from transformers-repo
Browse filesRead announcement at https://discuss.huggingface.co/t/announcement-all-model-cards-will-be-migrated-to-hf-co-model-repos/2755
Original file history: https://github.com/huggingface/transformers/commits/master/model_cards/google/roberta2roberta_L-24_cnn_daily_mail/README.md
README.md
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
license: apache-2.0
|
4 |
+
datasets:
|
5 |
+
- cnn_dailymail
|
6 |
+
tags:
|
7 |
+
- summarization
|
8 |
+
---
|
9 |
+
|
10 |
+
# Roberta2Roberta_L-24_cnn_daily_mail EncoderDecoder model
|
11 |
+
|
12 |
+
The model was introduced in
|
13 |
+
[this paper](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn and first released in [this repository](https://tfhub.dev/google/bertseq2seq/roberta24_cnndm/1).
|
14 |
+
|
15 |
+
The model is an encoder-decoder model that was initialized on the `roberta-large` checkpoints for both the encoder
|
16 |
+
and decoder and fine-tuned on summarization on the CNN / Dailymail dataset, which is linked above.
|
17 |
+
|
18 |
+
Disclaimer: The model card has been written by the Hugging Face team.
|
19 |
+
|
20 |
+
## How to use
|
21 |
+
|
22 |
+
You can use this model for summarization, *e.g.*
|
23 |
+
|
24 |
+
```python
|
25 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
26 |
+
|
27 |
+
tokenizer = AutoTokenizer.from_pretrained("google/roberta2roberta_L-24_cnn_daily_mail")
|
28 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("google/roberta2roberta_L-24_cnn_daily_mail")
|
29 |
+
|
30 |
+
article = """ (The Hollywood Reporter)"The Rocky Horror Picture
|
31 |
+
Show" is the latest musical getting the small-
|
32 |
+
screen treatment. Fox is developing a two-hour
|
33 |
+
remake of the 1975 cult classic to be directed,
|
34 |
+
executive-produced and choreographed by Kenneth
|
35 |
+
Ortega ("High School Musical"). The project,
|
36 |
+
tentatively titled "The Rocky Horror Picture Show
|
37 |
+
Event," is casting-contingent. The special will be
|
38 |
+
filmed in advance and not air live, but few
|
39 |
+
details beyond that are known. In addition to
|
40 |
+
Ortega, Gail Berman and Lou Adler, who produced
|
41 |
+
the original film, are also attached as executive
|
42 |
+
producers. The special will be produced by Fox 21
|
43 |
+
Television Studios, and Berman's The Jackal Group.
|
44 |
+
The special is timed to celebrate the 40th
|
45 |
+
anniversary of the film, which has grossed more
|
46 |
+
than $112 million and still plays in theaters
|
47 |
+
across the country. TV premiere dates: The
|
48 |
+
complete guide . This isn't the first stab at
|
49 |
+
adapting "The Rocky Horror Picture Show." In 2002,
|
50 |
+
Fox unveiled plans for an adaptation timed to the
|
51 |
+
30th anniversary that never came to fruition. The
|
52 |
+
faces of pilot season 2015 . Fox's "Glee" covered
|
53 |
+
several of the show's most popular songs for a
|
54 |
+
Season 2 episode and even released a special "The
|
55 |
+
Rocky Horror Glee Show" EP. There is no plan yet
|
56 |
+
for when the adaptation will air. Fox also has a
|
57 |
+
live musical production of "Grease", starring
|
58 |
+
Julianne Hough and Vanessa Hudgens, scheduled to
|
59 |
+
air on Jan. 31, 2016. Broadcast TV scorecard .
|
60 |
+
Following in the footsteps of "The Sound of Music"
|
61 |
+
and "Peter Pan," NBC recently announced plans to
|
62 |
+
air a live version of The Wiz later this year.
|
63 |
+
Ortega's credits include "Gilmore Girls," "This Is
|
64 |
+
It" and "Hocus Pocus." He is repped by Paradigm
|
65 |
+
and Hanson, Jacobson. ©2015 The Hollywood
|
66 |
+
Reporter. All rights reserved."""
|
67 |
+
|
68 |
+
input_ids = tokenizer(article, return_tensors="pt").input_ids
|
69 |
+
output_ids = model.generate(input_ids)[0]
|
70 |
+
print(tokenizer.decode(output_ids, skip_special_tokens=True))
|
71 |
+
# should output
|
72 |
+
# Fox is developing a two-hour remake of the 1975 cult classic. The special will be directed, executive-produced and choreographed by Kenneth Ortega.
|
73 |
+
# The special is timed to celebrate the 40th anniversary of the film, which has grossed more than $112 million.
|
74 |
+
|
75 |
+
```
|