librarian-bots/arxiv-metadata-snapshot
Viewer โข Updated โข 3.22M โข 10k โข 19
Run Ian-Khalzov/article-topic-service-scibert 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/Ian-Khalzov/article-topic-service-scibert. 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/Ian-Khalzov/article-topic-service-scibert 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 Ian-Khalzov/article-topic-service-scibert with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Ian-Khalzov/article-topic-service-scibert") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Ian-Khalzov/article-topic-service-scibert")
model = AutoModelForSequenceClassification.from_pretrained("Ian-Khalzov/article-topic-service-scibert", device_map="auto")SciBERT text classifier for scientific article topic prediction from article title and abstract.
Balanced 12-class subset built from librarian-bots/arxiv-metadata-snapshot.
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch
model_id = "Ian-Khalzov/article-topic-service-scibert"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
text = "Title: Large language models for scientific document classification\n\nAbstract: We study..."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
with torch.inference_mode():
probs = torch.softmax(model(**inputs).logits[0], dim=-1)
predicted_label = model.config.id2label[int(probs.argmax())]
print(predicted_label)
The current baseline is strongest on physics-heavy classes and weakest on the broad Machine Learning category, where topical overlap with AI, NLP, CV, and Statistics remains high.