Downloads · 30 days
29
2% of all-time downloads
ielabgroup/BiTAG-t5-large
BiTAG-t5-large is a machine learning model from ielabgroup. 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.
GitHub: https://github.com/ArvinZhuang/BiTAG
Downloads · 30 days
29
2% of all-time downloads
All-time downloads
1.5K
Public
Repo size
8.9 GB
Likes
1
Public
Click a slice to open those files.
.bin3 GB · 100%
From the Hugging Face model README
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("ArvinZhuang/BiTAG-t5-large")
tokenizer = AutoTokenizer.from_pretrained("ArvinZhuang/BiTAG-t5-large")
text = "abstract: [your abstract]" # use 'title:' as the prefix for title_to_abs task.
input_ids = tokenizer.encode(text, return_tensors='pt')
outputs = model.generate(
input_ids,
do_sample=True,
max_length=500,
top_p=0.9,
top_k=20,
temperature=1,
num_return_sequences=10,
)
print("Output:\n" + 100 * '-')
for i, output in enumerate(outputs):
print("{}: {}".format(i+1, tokenizer.decode(output, skip_special_tokens=True)))