Qwen2.5-1.5B-Instruct-EngSaf-211K

This model is a fine-tuned version of Qwen/Qwen2.5-1.5B-Instruct on the EngSAF dataset for Essay Grading.

Report

Dataset

The EngSAF dataset, in its raw and unprocessed form, consists of approximately 5,800 short-answer responses collected from real-life engineering examinations administered at a reputed academic institute. These responses are spread across 119 unique questions drawn from a wide range of engineering disciplines, making the dataset both diverse and domain-specific. Each data point includes a studentโ€™s answer and an associated human-annotated score, serving as a benchmark for evaluating automated grading models.

The dataset is divided into three primary subsets: 70% is allocated for training, 16% is reserved for evaluation on unseen answers (UA), and 14% is dedicated to evaluating performance on entirely new questions (UQ). At this stage, it is important to note that the dataset is considered in its original state; no preprocessing, transformation, or filtering has yet been applied. All subsequent improvements and refinements to the data will be described in later sections. This dataset is known as EngSAF version 1.0 and was introduced in the paper titled "I understand why I got this grade": Automatic Short Answer Grading (ASAG) with Feedback, authored by Aggarwal et al., and set to appear in the proceedings of AIED 2025. The dataset is released strictly for academic and research purposes; any commercial use or redistribution without explicit permission is prohibited. Researchers are also urged to avoid publicly disclosing any sensitive content that may be contained in the dataset.

For more details, the paper can be accessed at: https://arxiv.org/abs/2407.12818.

Modeling

The modeling approach for this study was carefully designed to evaluate the performance of different large language models (LLMs) on the automated essay grading task. We selected the Qwen2.5 architecture to represent a range of model sizes: 0.5B, 1.5B, and 3B. Each model was instruction-tuned on the EngSAF dataset in varying sizes, with hyperparameters optimized to balance computational efficiency and performance. The experiments were conducted on GPU-accelerated hardware, leveraging techniques such as gradient checkpointing, flash attention, and mixed-precision training to maximize resource utilization.

Evaluation

The evaluation methodology employed both quantitative metrics and qualitative analysis. For quantitative assessment, we computed accuracy, precision, recall, F1 score, root mean squared error (RMSE), and Cohen's kappa score (CKS) for the scoring task, while using BERT-Score precision, recall, and F1 for rationale evaluation. On a held-out test set of 100 samples. Qualitative examination of models' outputs revealed cases where most of the models correctly identified key aspects of student answers but sometimes failed to properly align its scoring with the rubric criteria.

Evaluation results for score and rationale outputs:

Aspect F1 Precision Recall Accuracy CKS RMSE
Score 0.5619 0.5882 0.6020 0.5800 0.3725 0.7746
Rationale 0.6251 0.6187 0.6353 -- -- --

Usage

Below is an example of how to use the model with the Hugging Face Transformers library:

from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
import torch


checkpoint       = "IsmaelMousa/Qwen2.5-1.5B-Instruct-EngSaf-211K"
device           = torch.device("cuda" if torch.cuda.is_available() else "cpu")

tokenizer        = AutoTokenizer       .from_pretrained(checkpoint)
model            = AutoModelForCausalLM.from_pretrained(checkpoint)

assistant        = pipeline("text-generation", tokenizer=tokenizer, model=model, device=device)

question         = input("Question        : ")
reference_answer = input("Reference Answer: ")
student_answer   = input("Student Answer  : ")
mark_scheme      = input("Mark Scheme     : ")

system_content   = "You are a grading assistant. Evaluate student answers based on the mark scheme. Respond only in JSON format with keys 'score' (int) and 'rationale' (string)."

user_content     = ("Provide both a score and a rationale by evaluating the student's answer strictly within the mark scheme range,"
                    " grading based on how well it meets the question's requirements by comparing the student answer to the reference answer.\n"
                    f"Question: {question}\n"
                    f"Reference Answer: {reference_answer}\n"
                    f"Student Answer: {student_answer}\n"
                    f"Mark Scheme: {mark_scheme}")

messages         = [{"role": "system", "content": system_content}, {"role": "user", "content": user_content}]

inputs           = tokenizer.apply_chat_template(messages, tokenize=False)

output           = assistant(inputs, max_new_tokens=128, do_sample=False, return_full_text=False)[0]["generated_text"]

print(output)

Frameworks

  • datasets-3.6.0
  • torch-2.7.0
  • transformers-4.51.3
  • trl-0.17.0
  • scikit-learn-1.6.1
  • bert-score-0.3.13
  • json-repair-0.46.0
Downloads last month
8
Safetensors
Model size
1.54B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for IsmaelMousa/Qwen2.5-1.5B-Instruct-EngSaf-211K

Base model

Qwen/Qwen2.5-1.5B
Finetuned
(907)
this model

Collection including IsmaelMousa/Qwen2.5-1.5B-Instruct-EngSaf-211K

Evaluation results