-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
139 lines (134 loc) · 6.19 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MCQ Quiz</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.question {
margin-bottom: 20px;
}
.options label {
display: block;
margin-bottom: 10px;
}
#result {
font-weight: bold;
margin-top: 20px;
}
.button-container {
margin-top: 20px;
}
button {
padding: 10px 20px;
margin-right: 10px;
}
</style>
</head>
<body>
<h1> MCQ Quiz</h1>
<form id="quiz-form">
<!-- Questions will be inserted here -->
</form>
<div class="button-container">
<button onclick="submitQuiz()">Submit</button>
<button onclick="refreshQuiz()">Refresh</button>
</div>
<div id="result"></div>
<script>
const questions = [
{
question: "How are documents usually evaluated in the simplest form of keyword-based search?",
options: [
"According to the length of the documents",
"Based on the number of images and videos contained in the documents",
"By the complexity of language used in the documents",
"Based on the presence and frequency of the user-provided keywords"
],
answer: 3
},
{
question: "When is fine-tuning an appropriate method for customizing a Large Language Model (LLM)?",
options: [
"When you want to optimize the model without any instructions",
"When the LLM requires access to the latest data for generating outputs",
"When the LLM does not perform well on a task and the data for prompt engineering is too large",
"When the LLM already understands the topics necessary for text generation"
],
answer: 2
},
{
question: "In which scenario is soft prompting appropriate compared to other training styles?",
options: [
"When the model requires continued pretraining on unlabeled data",
"When the model needs to be adapted to perform well in a domain on which it was not originally trained",
"When there is a need to add learnable parameters to a Large Language Model (LLM) without task-specific training",
"When there is a significant amount of labeled, task-specific data available"
],
answer: 2
},
{
question: "How does the temperature setting in a decoding algorithm influence the probability distribution over the vocabulary?",
options: [
"Increasing the temperature removes the impact of the most likely word.",
"Decreasing the temperature broadens the distribution, making less likely words more probable.",
"Increasing the temperature flattens the distribution, allowing for more varied word choices.",
"Temperature has no effect on probability distribution; it only changes the speed of decoding."
],
answer: 2
},
{
question: "Which statement is true about Fine-tuning and Parameter-Efficient Fine-Tuning (PEFT)?",
options: [
"PEFT requires replacing the entire model architecture with a new one designed specifically for the new task, making it significantly more data-intensive than Fine-tuning.",
"Fine-tuning requires training the entire model on new data, often leading to substantial computational costs, whereas PEFT involves updating only a small subset of parameters, minimizing computational requirements and data needs.",
"Both Fine-tuning and PEFT require the model to be trained from scratch on new data, making them equally data and computationally intensive.",
"Fine-tuning and PEFT do not involve model modification; they differ only in the type of data used for training, with Fine-tuning requiring labeled data and PEFT using unlabeled data."
],
answer: 1
}
];
function createQuiz() {
const quizForm = document.getElementById("quiz-form");
quizForm.innerHTML = ''; // Clear existing questions
questions.forEach((q, index) => {
const questionDiv = document.createElement("div");
questionDiv.className = "question";
questionDiv.innerHTML = `
<p>${q.question}</p>
<div class="options">
${q.options.map((option, i) => `
<label>
<input type="radio" name="q${index}" value="${i}">
${option}
</label>
`).join("")}
</div>
`;
quizForm.appendChild(questionDiv);
});
}
function submitQuiz() {
let score = 0;
questions.forEach((q, index) => {
const selectedOption = document.querySelector(`input[name="q${index}"]:checked`);
if (selectedOption && parseInt(selectedOption.value) === q.answer) {
score++;
}
});
document.getElementById("result").textContent = `Your score: ${score}/${questions.length}`;
}
function refreshQuiz() {
createQuiz(); // Recreate the quiz
document.getElementById("result").textContent = ''; // Clear the result
}
createQuiz();
</script>
</body>
</html>