Downloads · 30 days
11
26% of all-time downloads
SalehAhmad/Initial_Knowledge_Assessment_Test-Model-LLAMA7B_3Epochs
Initial_Knowledge_Assessment_Test-Model-LLAMA7B_3Epochs is a text generation model from SalehAhmad. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
11
26% of all-time downloads
All-time downloads
43
Public
Repo size
27 GB
Likes
0
Public
Click a slice to open those files.
.bin13.5 GB · 100%
From the Hugging Face model README
This model is for the module
# 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-LLAMA7B_3Epochs",
device=torch.device('cuda' if torch.cuda.is_available() else 'cpu'),
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'''<s> [INST] You are a chatbot, who is helping to curate datasets. Based on the input paragraph as context generate only one mcq question. You donot generate repetitive questions.
When you are given a paragraph for context. You will generate only one mcq question, 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}
[/INST]</s>Response:'''
output = pipe(prompt,
num_return_sequences=1,
return_full_text=False)
print(output[0]['generated_text'])