melanchthon19's picture
model card
83c8719
metadata
language:
  - en
tags:
  - automated_essay_scoring
  - text_classification
  - model_hub_mixin
  - pytorch_model_hub_mixin
base_model: DistilBERT

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)