🚀 Roberta2Roberta_L-24_bbc 編碼器-解碼器模型
該模型是用於文本摘要的編碼器-解碼器模型,基於roberta-large
預訓練權重初始化,並在BBC XSum數據集上進行微調。
🚀 快速開始
此模型由Sascha Rothe、Shashi Narayan、Aliaksei Severyn在 這篇論文 中提出,並首次在 此倉庫 中發佈。它是一個編碼器 - 解碼器模型,編碼器和解碼器均在roberta-large
的檢查點上進行初始化,並在上述鏈接的BBC XSum數據集上進行了極端摘要任務的微調。
聲明:此模型卡片由Hugging Face團隊編寫。
💻 使用示例
基礎用法
你可以使用這個模型進行極端摘要任務,例如:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("google/roberta2roberta_L-24_bbc")
model = AutoModelForSeq2SeqLM.from_pretrained("google/roberta2roberta_L-24_bbc")
article = """The problem is affecting people using the older
versions of the PlayStation 3, called the "Fat"
model.The problem isn't affecting the newer PS3
Slim systems that have been on sale since
September last year.Sony have also said they are
aiming to have the problem fixed shortly but is
advising some users to avoid using their console
for the time being."We hope to resolve this
problem within the next 24 hours," a statement
reads. "In the meantime, if you have a model other
than the new slim PS3, we advise that you do not
use your PS3 system, as doing so may result in
errors in some functionality, such as recording
obtained trophies, and not being able to restore
certain data."We believe we have identified that
this problem is being caused by a bug in the clock
functionality incorporated in the system."The
PlayStation Network is used by millions of people
around the world.It allows users to play their
friends at games like Fifa over the internet and
also do things like download software or visit
online stores."""
input_ids = tokenizer(article, return_tensors="pt").input_ids
output_ids = model.generate(input_ids)[0]
print(tokenizer.decode(output_ids, skip_special_tokens=True))
📄 許可證
本項目採用Apache 2.0許可證。