allenai/scicite
Updated • 2.29k • 4
Run hongccccccc/scibert-citation-background-classifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/hongccccccc/scibert-citation-background-classifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/hongccccccc/scibert-citation-background-classifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use hongccccccc/scibert-citation-background-classifier with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="hongccccccc/scibert-citation-background-classifier") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("hongccccccc/scibert-citation-background-classifier")
model = AutoModelForSequenceClassification.from_pretrained("hongccccccc/scibert-citation-background-classifier", device_map="auto")allenai/scibert_scivocab_uncased fine-tuned as a binary classifier of citation intent: does a citation sentence cite prior work as background (BACKGROUND) or for any other reason (NOT_BACKGROUND)?
| id | label | meaning |
|---|---|---|
| 0 | NOT_BACKGROUND | citation used for method, comparison, extension, motivation… |
| 1 | BACKGROUND | citation provides background/context for the citing paper |
from transformers import pipeline
clf = pipeline("text-classification", model="hongccccccc/scibert-citation-background-classifier")
clf("Deep learning has achieved remarkable success in many NLP tasks [1, 2].")
# [{'label': 'BACKGROUND', 'score': ...}]
BertForSequenceClassification, single-label, 2 classes)BACKGROUNDtransformers 4.32.0F1 score of 0.81 on a held-out test set (80-20 train-test split of the combined dataset).
Base model
allenai/scibert_scivocab_uncased