CoolFace
Apppublic

Celestial01/qwen3-cee-demo

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes
App README

CEE MCQ Generator — Fine-Tuned Qwen3-1.7B

LoRA fine-tuned model that generates CEE (Nepal Common Entrance Exam) multiple-choice questions for Physics, Chemistry, and Biology, given a subject and topic.

Live Demo

Pick a subject and topic above -> get a generated question with options, answer, and explanation.

Example Output

Subject: Biology
Topic: Cell Biology
Which of the following is a characteristic feature of the phylum Chordata?
A. Presence of a notochord during embryonic development
B. Presence of a coelom
C. Absence of a mantle
D. Absence of a radula
Answer: A
Explanation: The primary characteristic of the phylum Chordata is the presence
of a notochord during embryonic development, which is a defining feature of
chordates. Option B is incorrect because while coelom is present in many
chordates, it is not the primary characteristic...

Architecture

Real CEE questions (scraped, permissioned)
        |
        v
   Clean + QC (dedup, format checks)
        |
        v
   LoRA fine-tuning (Qwen3-1.7B)
        |
        v
   Generation --> Structural check --> LLM-judge check
        |                                    |
        +----------> Rejected  <-------------+
                         |
                    Validated pool --> Served to students

Generated questions are never served directly - only what passes both validation stages reaches the pool.

Dataset

~2,800 real CEE MCQs (28 topics, Physics/Chemistry/Biology), collected with the source site owner's explicit permission, each with a worked explanation. Cleaned via automated QC (duplicate detection, malformed-option checks) before training.

Training

  • —Base model: Qwen3-1.7B-Instruct
  • —Method: LoRA (rank 16, attention projections) - chosen to fine-tune a 1.7B model on a free Kaggle T4 (16GB) without full-parameter memory cost, while keeping inference quality close to full fine-tuning
  • —Data: ~5,600 prompt/completion pairs (prompt-phrasing augmentation), stratified train/val split by topic
  • —Run: 3 epochs, ~30 min, free-tier Kaggle GPU

Evaluation

Two independent batches (n=140 each), validated via structural checks + an independent LLM judge (Llama-3.3-70B):

SubjectPass Rate
Biology~70-75%
Chemistry~60-65%
Physics~40-45%
Overall~64-69%

Limitations

  • —Physics pass rate is meaningfully lower, driven almost entirely by multi-step numerical questions (circuits, thermodynamics, wave mechanics). A 1.7B model has limited capacity for chained arithmetic reasoning - it tends to apply the right concept but make an arithmetic or formula-application error partway through, which the judge then catches. Descriptive/definitional content (most of Biology) doesn't have this failure mode.
  • —The LLM judge is a strong but imperfect filter - it occasionally over-rejects ambiguous-but-valid questions. Reported pass rate reflects "validated by this pipeline," not independently audited ground truth.

Future Work

  • —GRPO fine-tuning with a reward function targeting numerical/answer consistency, aimed specifically at the Physics gap
  • —Bayesian Knowledge Tracing integration to drive topic selection from real student performance
  • —Training-data reasoning traces (chain-of-thought) for calculation-heavy questions

Links

  • —Training notebook: tuning-qa.ipynb

Stack

transformers - peft (LoRA) - Qwen3-1.7B-Instruct - Kaggle T4 (free tier) - Groq (Llama-3.3-70B judge) - Gradio - HF Spaces (ZeroGPU)