Downloads · 30 days
0
abooodjbr/Evalora-aa2faf06-b545-447c-a91f-49aa1b341ef1
Evalora-aa2faf06-b545-447c-a91f-49aa1b341ef1 is a machine learning model from abooodjbr. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
- Upload ID: aa2faf06-b545-447c-a91f-49aa1b341ef1 - Base Model: unsloth/mistral-7b-instruct-v0.2-bnb-4bit - Dataset: my-run - Created At: 2026-06-04T03:49:33.368017
Downloads · 30 days
0
Access
Public
Updated Jun 4, 2026
Repo size
337 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 98%
From the Hugging Face model README
| Metric | Value |
|---|---|
| Accuracy | 0.75 |
| MAE | 0.25 |
| QWK | 0.6575 |
| BERTScore | 0.9156 |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/mistral-7b-instruct-v0.2-bnb-4bit"
)
model = PeftModel.from_pretrained(
base_model,
"abooodjbr/Evalora-aa2faf06-b545-447c-a91f-49aa1b341ef1"
)
tokenizer = AutoTokenizer.from_pretrained("unsloth/mistral-7b-instruct-v0.2-bnb-4bit")
# Replace the placeholders below with your actual input
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"
"Question: <YOUR_QUESTION>\n"
"Reference Answer: <YOUR_REFERENCE_ANSWER>\n"
"Student Answer: <YOUR_STUDENT_ANSWER>\n"
"Mark Scheme: <YOUR_MARK_SCHEME>" # e.g. {'1': 'Mentions X', '2': 'Explains Y'}
)
messages = [
{
"role": "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)."
},
{
"role": "user",
"content": user_content
},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
).to(model.device)
generated_ids = model.generate(
**inputs,
max_new_tokens=128,
temperature=0.2,
top_k=5,
do_sample=False,
)[0]
new_generated_ids = generated_ids[inputs["input_ids"].shape[1]:]
generated_text = tokenizer.decode(new_generated_ids, skip_special_tokens=True)
print(generated_text)
# Output example: {"score": 4, "rationale": "The student correctly identified..."}