Downloads · 30 days
45
5% of all-time downloads
tokhey/question-generator-model-qwen2.5-1.5b
question-generator-model-qwen2.5-1.5b is a text generation model from tokhey. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of Qwen2.5-1.5B-Instruct designed to generate English multiple-choice questions that closely resemble the official examinations of the Egyptian Ministry of Education (General Seconda…
Downloads · 30 days
45
5% of all-time downloads
All-time downloads
848
Public
Parameters
1.5B
3.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.1 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of Qwen2.5-1.5B-Instruct designed to generate English multiple-choice questions that closely resemble the official examinations of the Egyptian Ministry of Education (General Secondary Stage).
Unlike generic question generation models, this model was trained specifically to reproduce the wording, structure, difficulty, distractor quality, and examination style commonly found in Egyptian Ministry exams.
The model receives curriculum information (Unit, Topic, Grammar Focus, Target Skills, Life Skills, Core Values) together with a user request and generates Ministry-style English MCQs in structured JSON format.
The objective is to assess understanding rather than memorization, while preserving the writing style used in official examinations.
The model was trained using two complementary datasets.
A manually collected dataset extracted from previous official English examinations.
Each sample was converted into an instruction-following format including:
To improve generalization, an additional synthetic dataset was generated using GLM-5.2.
The synthetic data follows the same curriculum structure and examination philosophy while introducing diverse contexts and wording.
This significantly increased dataset diversity without changing the Ministry examination style.
The model can generate:
Each generated question contains:
Although the model understands simple prompts, it performs significantly better when curriculum information is supplied.
Recommended prompt:
Generate 5 Ministry-style grammar MCQs.
Unit: 11
Topic: Literature
Grammar Focus: Comparative and Superlative Adjectives
Return JSON only.
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "tokhey/question-generator-model-qwen2.5-1.5b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype="auto"
)
messages = [
{
"role":"user",
"content":"""
Generate 3 Ministry-style grammar MCQs.
Unit: 8
Topic:
A Journey Through Time
Grammar Focus:
Active and Passive Voice
Return JSON only.
"""
}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=1024,
do_sample=False
)
print(
tokenizer.decode(
outputs[0][inputs.input_ids.shape[-1]:],
skip_special_tokens=True
)
)
For deterministic evaluation:
do_sample=False
For more diverse generations:
do_sample=True
temperature=0.7
top_p=0.9
This model was developed as part of an undergraduate graduation project focused on automatic generation of Egyptian Ministry-style English examination questions using Large Language Models.
Base Model: Qwen Team
Fine-tuning Framework: LLaMA-Factory
Synthetic Data Generation: GLM-5.2