julien-c HF staff commited on
Commit
ea245d4
1 Parent(s): b7c9202

Migrate model card from transformers-repo

Browse files

Read 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_bbc/README.md

Files changed (1) hide show
  1. README.md +58 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ datasets:
5
+ - xsum
6
+ tags:
7
+ - summarization
8
+ ---
9
+
10
+ # Roberta2Roberta_L-24_bbc 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_bbc/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 extreme summarization on the BBC XSum 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 extreme summarization, *e.g.*
23
+
24
+ ```python
25
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
26
+
27
+ tokenizer = AutoTokenizer.from_pretrained("google/roberta2roberta_L-24_bbc")
28
+ model = AutoModelForSeq2SeqLM.from_pretrained("google/roberta2roberta_L-24_bbc")
29
+
30
+ article = """The problem is affecting people using the older
31
+ versions of the PlayStation 3, called the "Fat"
32
+ model.The problem isn't affecting the newer PS3
33
+ Slim systems that have been on sale since
34
+ September last year.Sony have also said they are
35
+ aiming to have the problem fixed shortly but is
36
+ advising some users to avoid using their console
37
+ for the time being."We hope to resolve this
38
+ problem within the next 24 hours," a statement
39
+ reads. "In the meantime, if you have a model other
40
+ than the new slim PS3, we advise that you do not
41
+ use your PS3 system, as doing so may result in
42
+ errors in some functionality, such as recording
43
+ obtained trophies, and not being able to restore
44
+ certain data."We believe we have identified that
45
+ this problem is being caused by a bug in the clock
46
+ functionality incorporated in the system."The
47
+ PlayStation Network is used by millions of people
48
+ around the world.It allows users to play their
49
+ friends at games like Fifa over the internet and
50
+ also do things like download software or visit
51
+ online stores."""
52
+
53
+ input_ids = tokenizer(article, return_tensors="pt").input_ids
54
+ output_ids = model.generate(input_ids)[0]
55
+ print(tokenizer.decode(output_ids, skip_special_tokens=True))
56
+ # should output
57
+ # Some Sony PlayStation gamers are being advised to stay away from the network because of a problem with the PlayStation 3 network.
58
+ ```