模型:

google/roberta2roberta_L-24_discofuse

英文

Roberta2Roberta_L-24_discofuse EncoderDecoder模型

该模型由Sascha Rothe、Shashi Narayan、Aliaksei Severyn于 this paper 年推出,并于 this repository 年首次发布。

该模型是一个编码器-解码器模型,使用roberta-large的检查点对编码器和解码器进行了初始化,并在discofuse数据集上进行了句子融合的微调,其链接如上所示。

免责声明:该模型卡片由Hugging Face团队撰写。

如何使用

您可以将此模型用于句子融合,例如

重要提示:该模型未对“"”(双引号)字符进行训练 ->因此,在对文本进行标记化之前,建议将所有“"”(双引号)替换为单个`(单后引号)。

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.