From e0c3bc8ee030b4e2a621e03bda4cab2654109133 Mon Sep 17 00:00:00 2001 From: Patrick von Platen Date: Thu, 10 Sep 2020 16:51:15 +0200 Subject: [PATCH] Create README.md --- .../roberta2roberta_L-24_discofuse/README.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 model_cards/google/roberta2roberta_L-24_discofuse/README.md diff --git a/model_cards/google/roberta2roberta_L-24_discofuse/README.md b/model_cards/google/roberta2roberta_L-24_discofuse/README.md new file mode 100644 index 0000000000..8fc6e9c8aa --- /dev/null +++ b/model_cards/google/roberta2roberta_L-24_discofuse/README.md @@ -0,0 +1,35 @@ +--- +language: en +license: apache-2.0 +datasets: +- discofuse +--- + +# Roberta2Roberta_L-24_discofuse EncoderDecoder model + +The model was introduced in +[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_discofuse/1). + +The model is an encoder-decoder model that was initialized on the `roberta-large` checkpoints for both the encoder +and decoder and fine-tuned on sentencefusion on the discofuse dataset, which is linked above. + +Disclaimer: The model card has been written by the Hugging Face team. + +## How to use + +You can use this model for sentence fusion, *e.g.* + +```python +from transformers import AutoTokenizer, AutoModelForSeq2SeqLM + +tokenizer = AutoTokenizer.from_pretrained("google/roberta2roberta_L-24_discofuse") +model = AutoModelForSeq2SeqLM.from_pretrained("google/roberta2roberta_L-24_discofuse") + +discofuse = """As a run-blocker, Zeitler moves relatively well. Zeitler often struggles at the point of contact in space.""" + +input_ids = tokenizer(discofuse, return_tensors="pt").input_ids +output_ids = model.generate(input_ids)[0] +print(tokenizer.decode(output_ids, skip_special_tokens=True)) +# should output +# As a run-blocker, Zeitler moves relatively well. However, Zeitler often struggles at the point of contact in space. +```