arxiv-community/arxiv_dataset
Updated • 1.41k • 135
How to use Callidior/bert2bert-base-arxiv-titlegen with Transformers:
# Use a pipeline as a high-level helper
# Warning: Pipeline type "summarization" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# 'pip install "transformers<5.0.0'
from transformers import pipeline
pipe = pipeline("summarization", model="Callidior/bert2bert-base-arxiv-titlegen") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Callidior/bert2bert-base-arxiv-titlegen")
model = AutoModelForSeq2SeqLM.from_pretrained("Callidior/bert2bert-base-arxiv-titlegen")Generates titles for computer science papers given an abstract.
The model is a BERT2BERT Encoder-Decoder using the official bert-base-uncased checkpoint as initialization for the encoder and decoder.
It was fine-tuned on 318,500 computer science papers posted on arXiv.org between 2007 and 2022 and achieved a 26.3% Rouge2 F1-Score on held-out validation data.
Live Demo: https://paper-titles.ey.r.appspot.com/