How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="matthewleechen/science_MP_classifier")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("matthewleechen/science_MP_classifier")
model = AutoModelForSequenceClassification.from_pretrained("matthewleechen/science_MP_classifier", device_map="auto")
Quick Links

This is a fine-tuned RoBERTa-base model trained to identify whether historical MPs in the British Parliament were empirical scientists or came from a background of empirical science.

The training data were drawn from Wikipedia biographies of 19th century MPs. A batch size of 128 was used, and the learning rate was 8e-5.

Test-set evals:

{'eval_loss': 0.28504136204719543,
 'eval_accuracy': 0.92,
 'eval_precision': 0.9198241758241759,
 'eval_recall': 0.92,
 'eval_f1': 0.9195138888888889,
 'eval_runtime': 0.425,
 'eval_samples_per_second': 235.291,
 'eval_steps_per_second': 2.353,
 'epoch': 8.0}
Downloads last month
3
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support