Downloads · 30 days
14
33% of all-time downloads
melanchthon19/mews-aes-classifier-base
mews-aes-classifier-base is a machine learning model from melanchthon19. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
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 tes…
Downloads · 30 days
14
33% of all-time downloads
All-time downloads
43
Public
Parameters
67M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
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.
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)