Downloads · 30 days
69
2% of all-time downloads
sobamchan/bart-large-scitldr
bart-large-scitldr is a machine learning model from sobamchan. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Downloads · 30 days
69
2% of all-time downloads
All-time downloads
3.3K
Public
Repo size
3.3 GB
Likes
1
Public
Click a slice to open those files.
.bin1.6 GB · 100%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("sobamchan/bart-large-scitldr")
model = AutoModelForSeq2SeqLM.from_pretrained("sobamchan/bart-large-scitldr")
text = "Abstract of a paper."
batch = tok(text, return_tensors="pt")
generated_ids = model.generate(batch["input_ids"])
print(tok.batch_decode(generated_ids, skip_special_tokens=True))