---
title: roberta2roberta_L-24_wikisplit
canonical_url: "https://www.modelscope.cn/models/google/roberta2roberta_L-24_wikisplit"
md_url: "https://www.modelscope.cn/models/google/roberta2roberta_L-24_wikisplit.md"
repository: google/roberta2roberta_L-24_wikisplit
last_updated: 2025-04-21
license: apache-2.0
pipeline_tag: text2text-generation
tasks:
  - text2text-generation
model_type:
  - encoder-decoder
architectures:
  - EncoderDecoderModel
library_name:
  - transformer
  - pytorch
frameworks:
  - pytorch
language:
  - en
downloads: 420
stars: 0
---

# roberta2roberta_L-24_wikisplit

> roberta2roberta_L-24_wikisplit - google 在 ModelScope 开源的模型。Roberta2RobertaL-24wikisplit EncoderDecoder model

google/roberta2roberta_L-24_wikisplit 是 ModelScope 魔搭社区上的text2text-generation模型，采用 apache-2.0 许可。

- **Repository**: google/roberta2roberta_L-24_wikisplit
- **License**: apache-2.0
- **Tasks**: text2text-generation
- **Downloads**: 420
- **Stars**: 0
- **Last updated**: 2025-04-21

Source: https://www.modelscope.cn/models/google/roberta2roberta_L-24_wikisplit

---

# Roberta2Roberta_L-24_wikisplit 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_cnndm/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 sentence splitting on the [WikiSplit](https://github.com/google-research-datasets/wiki-split) dataset.

Disclaimer: The model card has been written by the Hugging Face team.

## How to use

You can use this model for sentence splitting, *e.g.*

**IMPORTANT**: The model was not trained on the `"` (double quotation mark) character -> so the before tokenizing the text, 
it is advised to replace all `"` (double quotation marks) with two single `'` (single quotation mark).

```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("google/roberta2roberta_L-24_wikisplit")
model = AutoModelForSeq2SeqLM.from_pretrained("google/roberta2roberta_L-24_wikisplit")

long_sentence = """Due to the hurricane, Lobsterfest has been canceled, making Bob very happy about it and he decides to open Bob 's Burgers for customers who were planning on going to Lobsterfest."""

input_ids = tokenizer(tokenizer.bos_token + long_sentence + tokenizer.eos_token, return_tensors="pt").input_ids
output_ids = model.generate(input_ids)[0]
print(tokenizer.decode(output_ids, skip_special_tokens=True))
# should output
# Due to the hurricane, Lobsterfest has been canceled, making Bob very happy about it. He decides to open Bob's Burgers for customers who were planning on going to Lobsterfest. 
```
