Downloads · 30 days
43
44% of all-time downloads
kenzykhaled/asag-xlnet-regression
asag-xlnet-regression is a machine learning model from kenzykhaled. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model evaluates student answers by comparing them to reference answers and predicting a grade (regression).
Downloads · 30 days
43
44% of all-time downloads
All-time downloads
97
Public
Parameters
117M
470 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors469 MB · 100%
From the Hugging Face model README
This model evaluates student answers by comparing them to reference answers and predicting a grade (regression).
from transformers import XLNetTokenizer, XLNetForSequenceClassification
import torch
# Load model and tokenizer
tokenizer = XLNetTokenizer.from_pretrained("kenzykhaled/asag-xlnet-regression")
model = XLNetForSequenceClassification.from_pretrained("kenzykhaled/asag-xlnet-regression")
# Prepare inputs
student_answer = "It is vision."
reference_answer = "The stimulus is seeing or hearing the cup fall."
inputs = tokenizer(
text=student_answer,
text_pair=reference_answer,
return_tensors="pt",
padding=True,
truncation=True
)
# Get prediction
with torch.no_grad():
outputs = model(**inputs)
# Get predicted grade (normalized between 0-1)
predicted_grade = outputs.logits.item()
predicted_grade = max(0, min(1, predicted_grade))
print(f"Predicted grade: {predicted_grade:.4f}")
This model was trained on the Meyerger/ASAG2024 dataset.
The model achieves the following metrics on the validation set: