Downloads · 30 days
0
0% of all-time downloads
goenkalokesh/MCQGenerator
MCQGenerator is a text generation model from goenkalokesh. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of Meta’s LLaMA 3.1 8B, trained specifically for generating Multiple Choice Questions (MCQs) from academic passages using Alpaca-style instructions.
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
275
Public
Repo size
185 MB
Likes
0
Public
Click a slice to open those files.
.safetensors336 MB · 95%
From the Hugging Face model README
This model is a fine-tuned version of Meta’s LLaMA 3.1 8B, trained specifically for generating Multiple Choice Questions (MCQs) from academic passages using Alpaca-style instructions.
It was developed as part of a personalized learning platform focused on adaptive assessments for K–12 education. The model generates exactly n questions at a given difficulty level and returns the correct answers, making it suitable for real-time evaluations in edtech platforms.
The model expects prompts in the following format:
You are an intelligent and precise Multiple Choice Questions (MCQs) Generator, designed to create effective assessments.
Your goal is to generate exactly {no_mcq} clear, well-structured MCQs with four answer options each.
Ensure each MCQ has options labeled A, B, C, and D.
Also, give the answer key for all the questions at the end.
Do not generate more or fewer than {no_mcq} questions.
Do not include explanations or extra commentary.
### Instruction:
Generate exactly {no_mcq} {level}-level MCQs based on the following passage:
### Input:
{passage}
### Response:
At what temperature does water boil under standard atmospheric pressure?
A) 90°C
B) 95°C
C) 100°C
D) 110°C
What is the boiling point of water under standard conditions?
A) 0°C
B) 50°C
C) 100°C
D) 150°C
Under what condition does water boil at 100°C?
A) High pressure
B) Low pressure
C) Vacuum
D) Standard atmospheric pressure
Answer Key:
from transformers import pipeline
generator = pipeline("text2text-generation", model="goenkalokesh/MCQGenerator")
prompt = """ You are an intelligent and precise Multiple Choice Questions (MCQs) Generator, designed to create effective assessments. Your goal is to generate exactly 3 clear, well-structured MCQs with four answer options each. Ensure each MCQ has options labeled A, B, C, and D. Also, give the answer key for all the questions at the end.
Do not generate more or fewer than 3 questions. Do not include explanations or extra commentary.
Generate exactly 3 Medium-level MCQs based on the following passage:
India gained independence from British rule in 1947 after years of struggle and sacrifice by freedom fighters.
"""
output = generator(prompt, max_new_tokens=400) print(output[0]['generated_text'])
Lokesh Goenka 🎓 M.Sc. in Data Science & Computing 🔬 Working on AI for Education, Adaptive Testing & Personalized Learning 🌐 Hugging Face Profile