DistilBERT Essay Scoring Model

This model is a proof-of-concept for automated essay scoring, built using DistilBERT and integrated with the Hugging Face Hub through the PyTorchModelHubMixin.
It was trained for only one epoch and is intended for testing pipeline integration, not production use.


Task

  • Automated Essay Scoring (Text Classification)

Usage

from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch

model_name = "melanchthon19/mews-aes-classifier-base"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

text = "Artificial intelligence models are transforming how we write essays."
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)

with torch.no_grad():
    outputs = model(**inputs)
    logits = outputs.logits
    probs = torch.softmax(logits, dim=-1)
    pred_id = probs.argmax(dim=-1).item()

label = model.config.id2label[pred_id]
print(f"Predicted class: {label} (index {pred_id})")
# Scores go from 1 to 5 (index 0 --> 4)
Downloads last month
3
Safetensors
Model size
67M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support