Edit model card

This model is for the module

Initial Knowledge Assessment Test Generation

Steps

  • Data was gathered by:
    • Downloading youtube playlists for each course from every category
    • The videos were transcribed
    • The text was fed to chatgpt via API, to formulate prompts n reponse pairs.
  • 2.78 Billion parameter Phi2 model by Microsoft was finetuned on the curated data.

How to use the model?

Note the format of the prompt. Only change the text in the variable "paragraph". This is the text which acts as the context for the generated test./

# Use a huggingafce pipeline as a high-level helper
from transformers import pipeline
import torch
pipe = pipeline("text-generation",
                  model="SalehAhmad/Initial_Knowledge_Assessment_Test-Model-Phi2_3Epochs",
                  device_map='auto',
                  torch_dtype=torch.bfloat16,
                  max_new_tokens=1024)

paragraph = '''Computer science theories and basic programming principles form the foundation of the ever-evolving field of technology. At its core, computer science is not just about writing code but involves the exploration and application of fundamental principles that underpin the design and functioning of computers. One key theory in computer science is the Turing Machine, proposed by Alan Turing in the 1930s. This theoretical construct laid the groundwork for understanding the limits and possibilities of computation. The idea that any computable function could be computed by a Turing Machine provided a theoretical framework for the development of modern computers.
Another essential theory in computer science is the concept of algorithms. Algorithms are step-by-step procedures or formulas for solving problems and performing tasks. They are crucial in programming as they guide the computer in executing tasks efficiently. The study of algorithms involves analyzing their efficiency and correctness, and it plays a pivotal role in designing software that can handle large datasets and complex computations. Moreover, algorithms are closely related to data structures, which are the ways in which data is organized and stored in a computer's memory. Efficient data structures are essential for optimizing the performance of algorithms.'''

prompt = f'''Instruct: You are a chatbot, who is helping to curate datasets. Based on the input paragraph as context generate as many mcq question as possible without repeptition. You donot generate repetitive questions.
When you are given a paragraph for context. You will generate multiple mcq questions, it's 4 options and it's actual answer.
For Example:
Paragraph: .....
-Start of Question-
Question: ......
Options: 
a) .....
b) .....
c) .....
d) .....
Actual Answer: b)....
-End of Question-
-Start of Question-
Question: ......
Options: 
a) .....
b) .....
c) .....
d) .....
Actual Answer: d)....
-End of Question-
and so on.
Paragraph: {paragraph}
Output: '''

output = pipe(prompt, 
              num_return_sequences=1, 
              return_full_text=False)

print(output[0]['generated_text'])
Downloads last month
6
Safetensors
Model size
2.78B params
Tensor type
BF16
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.