Downloads · 30 days
5
2% of all-time downloads
cestwc/roberta-base-bib
roberta-base-bib is a text classification model from cestwc. Use it when you need a label for a piece of text. It is set up for transformers.
This model is a text classification tool designed to predict the likelihood of a given context paper being cited by a query paper. It processes concatenated titles of context and query papers and outputs a binary pred…
Downloads · 30 days
5
2% of all-time downloads
All-time downloads
325
Public
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.bin499 MB · 99%
From the Hugging Face model README
This model is a text classification tool designed to predict the likelihood of a given context paper being cited by a query paper. It processes concatenated titles of context and query papers and outputs a binary prediction: 1 indicates a potential citation relationship (though not necessary), and 0 suggests no such relationship.
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_name = "cestwc/roberta-base-bib"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
def predict_citation(context_title, query_title):
inputs = tokenizer.encode_plus(f"{context_title} </s> {query_title}", return_tensors="pt")
outputs = model(**inputs)
prediction = outputs.logits.argmax(-1).item()
return "include" if prediction == 1 else "not include"
# Example
context_title = "Evaluating and Enhancing the Robustness of Neural Network-based Dependency Parsing Models with Adversarial Examples"
query_title = "Assessing Hidden Risks of LLMs: An Empirical Study on Robustness, Consistency, and Credibility"
print(predict_citation(context_title, query_title))