vansin commited on
Commit
343b03a
·
verified ·
1 Parent(s): 970d401

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. assets/css/styles.css +241 -0
  2. assets/js/quiz.js +208 -0
  3. index.html +43 -19
assets/css/styles.css ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ body {
8
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
9
+ line-height: 1.6;
10
+ color: #333;
11
+ background-color: #f9f9f9;
12
+ }
13
+
14
+ header {
15
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
16
+ color: white;
17
+ text-align: center;
18
+ padding: 2rem 1rem;
19
+ position: relative;
20
+ }
21
+
22
+ .built-with {
23
+ position: absolute;
24
+ top: 1rem;
25
+ left: 1rem;
26
+ color: rgba(255,255,255,0.9);
27
+ text-decoration: none;
28
+ font-size: 0.9rem;
29
+ font-weight: 500;
30
+ transition: color 0.3s;
31
+ }
32
+
33
+ .built-with:hover {
34
+ color: white;
35
+ }
36
+
37
+ header h1 {
38
+ font-size: 2.2rem;
39
+ margin-bottom: 0.5rem;
40
+ }
41
+
42
+ header p {
43
+ font-size: 1.1rem;
44
+ opacity: 0.9;
45
+ }
46
+
47
+ main {
48
+ max-width: 900px;
49
+ margin: 2rem auto;
50
+ padding: 0 1rem;
51
+ }
52
+
53
+ #quiz-container, #results {
54
+ background: white;
55
+ border-radius: 12px;
56
+ padding: 2rem;
57
+ box-shadow: 0 8px 24px rgba(0,0,0,0.1);
58
+ }
59
+
60
+ h2 {
61
+ color: #2c3e50;
62
+ margin-bottom: 1.5rem;
63
+ border-bottom: 2px solid #ecf0f1;
64
+ padding-bottom: 0.5rem;
65
+ }
66
+
67
+ .question {
68
+ margin-bottom: 2rem;
69
+ padding: 1.5rem;
70
+ background-color: #f8f9fa;
71
+ border-radius: 10px;
72
+ border-left: 4px solid #3498db;
73
+ }
74
+
75
+ .question h3 {
76
+ margin-bottom: 1rem;
77
+ color: #2c3e50;
78
+ }
79
+
80
+ .options {
81
+ display: flex;
82
+ flex-direction: column;
83
+ gap: 0.8rem;
84
+ }
85
+
86
+ .option {
87
+ padding: 1rem;
88
+ background-color: white;
89
+ border: 1px solid #ddd;
90
+ border-radius: 8px;
91
+ cursor: pointer;
92
+ transition: all 0.3s ease;
93
+ display: flex;
94
+ align-items: center;
95
+ }
96
+
97
+ .option:hover {
98
+ background-color: #f0f7ff;
99
+ border-color: #3498db;
100
+ transform: translateX(4px);
101
+ }
102
+
103
+ .option input[type="radio"] {
104
+ margin-right: 1rem;
105
+ accent-color: #3498db;
106
+ }
107
+
108
+ .option.correct {
109
+ background-color: #d4edda;
110
+ border-color: #28a745;
111
+ color: #155724;
112
+ }
113
+
114
+ .option.incorrect {
115
+ background-color: #f8d7da;
116
+ border-color: #dc3545;
117
+ color: #721c24;
118
+ }
119
+
120
+ #controls {
121
+ display: flex;
122
+ justify-content: space-between;
123
+ margin-top: 2rem;
124
+ }
125
+
126
+ button {
127
+ padding: 0.8rem 1.5rem;
128
+ border: none;
129
+ border-radius: 8px;
130
+ cursor: pointer;
131
+ font-size: 1rem;
132
+ transition: background-color 0.3s;
133
+ }
134
+
135
+ #prev-btn, #next-btn {
136
+ background-color: #3498db;
137
+ color: white;
138
+ }
139
+
140
+ #prev-btn:hover, #next-btn:hover {
141
+ background-color: #2980b9;
142
+ }
143
+
144
+ #submit-btn {
145
+ background-color: #2ecc71;
146
+ color: white;
147
+ margin-left: auto;
148
+ }
149
+
150
+ #submit-btn:hover {
151
+ background-color: #27ae60;
152
+ }
153
+
154
+ #results {
155
+ text-align: center;
156
+ }
157
+
158
+ #score-display {
159
+ font-size: 1.5rem;
160
+ font-weight: bold;
161
+ color: #2c3e50;
162
+ margin: 1.5rem 0;
163
+ }
164
+
165
+ #feedback {
166
+ text-align: left;
167
+ margin: 2rem 0;
168
+ padding: 1.5rem;
169
+ background-color: #f8f9fa;
170
+ border-radius: 10px;
171
+ border-left: 4px solid #e74c3c;
172
+ }
173
+
174
+ #feedback p {
175
+ margin-bottom: 0.8rem;
176
+ }
177
+
178
+ #restart-btn {
179
+ background-color: #9b59b6;
180
+ color: white;
181
+ padding: 0.8rem 2rem;
182
+ font-size: 1rem;
183
+ }
184
+
185
+ #restart-btn:hover {
186
+ background-color: #8e44ad;
187
+ }
188
+
189
+ footer {
190
+ text-align: center;
191
+ padding: 2rem 1rem;
192
+ margin-top: 3rem;
193
+ color: #7f8c8d;
194
+ font-size: 0.9rem;
195
+ }
196
+
197
+ footer a {
198
+ color: #3498db;
199
+ text-decoration: none;
200
+ }
201
+
202
+ footer a:hover {
203
+ text-decoration: underline;
204
+ }
205
+
206
+ @media (max-width: 768px) {
207
+ header h1 {
208
+ font-size: 1.8rem;
209
+ }
210
+
211
+ header p {
212
+ font-size: 1rem;
213
+ }
214
+
215
+ main {
216
+ margin: 1rem auto;
217
+ padding: 0;
218
+ }
219
+
220
+ #quiz-container, #results {
221
+ padding: 1.5rem;
222
+ }
223
+
224
+ .question {
225
+ padding: 1rem;
226
+ }
227
+
228
+ button {
229
+ padding: 0.7rem 1.2rem;
230
+ font-size: 0.9rem;
231
+ }
232
+
233
+ #controls {
234
+ flex-direction: column;
235
+ gap: 1rem;
236
+ }
237
+
238
+ #controls button {
239
+ width: 100%;
240
+ }
241
+ }
assets/js/quiz.js ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', () => {
2
+ const questions = [
3
+ {
4
+ question: "What is the primary goal of Intern-S1 as described in the abstract?",
5
+ options: [
6
+ "To create a general-purpose language model for everyday tasks",
7
+ "To develop a specialized multimodal model for scientific research with expertise in analyzing multiple science modalities",
8
+ "To compete with closed-source models only in mathematical problem-solving",
9
+ "To build a vision-language model focused on natural images"
10
+ ],
11
+ correct: 1
12
+ },
13
+ {
14
+ question: "How many activated parameters and total parameters does Intern-S1 have?",
15
+ options: [
16
+ "14 billion activated, 120 billion total",
17
+ "28 billion activated, 241 billion total",
18
+ "56 billion activated, 482 billion total",
19
+ "10 billion activated, 80 billion total"
20
+ ],
21
+ correct: 1
22
+ },
23
+ {
24
+ question: "What percentage of the 5T training tokens came from scientific domains?",
25
+ options: [
26
+ "25%",
27
+ "50%",
28
+ "75%",
29
+ "Over 50% (specifically >2.5T tokens)"
30
+ ],
31
+ correct: 3
32
+ },
33
+ {
34
+ question: "What innovative technique did Intern-S1 use during its post-training reinforcement learning phase?",
35
+ options: [
36
+ "Mixture-of-Losses (MoL)",
37
+ "Mixture-of-Rewards (MoR)",
38
+ "Dynamic Reward Shaping (DRS)",
39
+ "Multi-task Gradient Aggregation (MGA)"
40
+ ],
41
+ correct: 1
42
+ },
43
+ {
44
+ question: "Which of the following scientific tasks does the paper claim Intern-S1 surpasses closed-source state-of-the-art models in?",
45
+ options: [
46
+ "Image captioning and object detection",
47
+ "Molecular synthesis planning, reaction condition prediction, predicting thermodynamic stabilities for crystals",
48
+ "Real-time video translation and voice cloning",
49
+ "Web navigation and e-commerce recommendation"
50
+ ],
51
+ correct: 1
52
+ },
53
+ {
54
+ question: "According to the introduction, why is scientific research considered important for AGI development?",
55
+ options: [
56
+ "Because it requires large amounts of labeled data",
57
+ "Because it drives fundamental breakthroughs in human society and demands rigorous reasoning across diverse scientific modalities",
58
+ "Because it relies heavily on social media data",
59
+ "Because it can be solved with simple rule-based systems"
60
+ ],
61
+ correct: 1
62
+ },
63
+ {
64
+ question: "What type of model is Intern-S1 described as?",
65
+ options: [
66
+ "A unimodal transformer model",
67
+ "A multimodal Mixture-of-Experts (MoE) model",
68
+ "A convolutional neural network for image classification",
69
+ "A recurrent neural network for time-series analysis"
70
+ ],
71
+ correct: 1
72
+ },
73
+ {
74
+ question: "What is the key limitation of current open-source models in scientific domains, according to the paper?",
75
+ options: [
76
+ "They are too slow to train",
77
+ "They lack sufficient computational resources",
78
+ "Their progress lags significantly behind popular domains like math and code, and there's a substantial gap compared to closed-source models",
79
+ "They don't support English"
80
+ ],
81
+ correct: 2
82
+ },
83
+ {
84
+ question: "Which of these benchmarks is mentioned as part of the scientific evaluation suite for Intern-S1?",
85
+ options: [
86
+ "COCO and ImageNet",
87
+ "SmolInstruct, ChemBench, MatBench, SFE, Physics",
88
+ "GLUE and SuperGLUE",
89
+ "MNIST and CIFAR-10"
90
+ ],
91
+ correct: 1
92
+ },
93
+ {
94
+ question: "Where can the Intern-S1 models be accessed?",
95
+ options: [
96
+ "GitHub.com/intern-s1",
97
+ "Hugging Face at https://huggingface.co/internlm/Intern-S1",
98
+ "OpenAI's model zoo",
99
+ "Google AI Hub"
100
+ ],
101
+ correct: 1
102
+ }
103
+ ];
104
+
105
+ const questionDisplay = document.getElementById('question-display');
106
+ const prevBtn = document.getElementById('prev-btn');
107
+ const nextBtn = document.getElementById('next-btn');
108
+ const submitBtn = document.getElementById('submit-btn');
109
+ const resultsSection = document.getElementById('results');
110
+ const scoreDisplay = document.getElementById('score-display');
111
+ const feedbackDiv = document.getElementById('feedback');
112
+ const restartBtn = document.getElementById('restart-btn');
113
+
114
+ let currentQuestion = 0;
115
+ let userAnswers = new Array(questions.length).fill(null);
116
+ let quizCompleted = false;
117
+
118
+ function renderQuestion() {
119
+ const q = questions[currentQuestion];
120
+ questionDisplay.innerHTML = `
121
+ <div class="question">
122
+ <h3>Question ${currentQuestion + 1} of ${questions.length}</h3>
123
+ <p>${q.question}</p>
124
+ <div class="options">
125
+ ${q.options.map((option, index) => `
126
+ <label class="option">
127
+ <input type="radio" name="answer" value="${index}" ${userAnswers[currentQuestion] === index ? 'checked' : ''}>
128
+ ${option}
129
+ </label>
130
+ `).join('')}
131
+ </div>
132
+ </div>
133
+ `;
134
+
135
+ // Update button states
136
+ prevBtn.disabled = currentQuestion === 0;
137
+ nextBtn.textContent = currentQuestion === questions.length - 1 ? 'Submit' : 'Next';
138
+ submitBtn.style.display = 'none';
139
+
140
+ // Add event listeners for answer selection
141
+ const radios = document.querySelectorAll('input[name="answer"]');
142
+ radios.forEach(radio => {
143
+ radio.addEventListener('change', () => {
144
+ userAnswers[currentQuestion] = parseInt(radio.value);
145
+ });
146
+ });
147
+ }
148
+
149
+ function showResults() {
150
+ const correctCount = userAnswers.filter((answer, index) => answer === questions[index].correct).length;
151
+ const scorePercentage = Math.round((correctCount / questions.length) * 100);
152
+
153
+ scoreDisplay.innerHTML = `You scored ${correctCount} out of ${questions.length} (${scorePercentage}%)`;
154
+
155
+ let feedbackHTML = '<h3>Feedback:</h3>';
156
+ userAnswers.forEach((answer, index) => {
157
+ if (answer === null) {
158
+ feedbackHTML += `<p><strong>Q${index + 1}</strong>: Not answered</p>`;
159
+ } else if (answer === questions[index].correct) {
160
+ feedbackHTML += `<p><strong>Q${index + 1}</strong>: ✅ Correct!</p>`;
161
+ } else {
162
+ feedbackHTML += `<p><strong>Q${index + 1}</strong>: ❌ Incorrect. The correct answer was: "${questions[index].options[questions[index].correct]}"</p>`;
163
+ }
164
+ });
165
+
166
+ feedbackDiv.innerHTML = feedbackHTML;
167
+ resultsSection.style.display = 'block';
168
+ questionDisplay.style.display = 'none';
169
+ document.getElementById('controls').style.display = 'none';
170
+ }
171
+
172
+ nextBtn.addEventListener('click', () => {
173
+ const selectedAnswer = document.querySelector('input[name="answer"]:checked');
174
+
175
+ if (!selectedAnswer && !quizCompleted) {
176
+ alert('Please select an answer before continuing.');
177
+ return;
178
+ }
179
+
180
+ if (currentQuestion === questions.length - 1) {
181
+ quizCompleted = true;
182
+ showResults();
183
+ } else {
184
+ currentQuestion++;
185
+ renderQuestion();
186
+ }
187
+ });
188
+
189
+ prevBtn.addEventListener('click', () => {
190
+ if (currentQuestion > 0) {
191
+ currentQuestion--;
192
+ renderQuestion();
193
+ }
194
+ });
195
+
196
+ restartBtn.addEventListener('click', () => {
197
+ currentQuestion = 0;
198
+ userAnswers = new Array(questions.length).fill(null);
199
+ quizCompleted = false;
200
+ resultsSection.style.display = 'none';
201
+ questionDisplay.style.display = 'block';
202
+ document.getElementById('controls').style.display = 'flex';
203
+ renderQuestion();
204
+ });
205
+
206
+ // Initialize
207
+ renderQuestion();
208
+ });
index.html CHANGED
@@ -1,19 +1,43 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Intern-S1 Quiz: Understand the Scientific Multimodal Foundation Model</title>
7
+ <link rel="stylesheet" href="assets/css/styles.css">
8
+ </head>
9
+ <body>
10
+ <header>
11
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="built-with">Built with anycoder</a>
12
+ <h1>Intern-S1 Quiz</h1>
13
+ <p>Test your understanding of the Intern-S1 scientific multimodal foundation model paper</p>
14
+ </header>
15
+
16
+ <main>
17
+ <section id="quiz-container">
18
+ <div id="question-display">
19
+ <!-- Questions will be dynamically inserted here -->
20
+ </div>
21
+ <div id="controls">
22
+ <button id="prev-btn" disabled>Previous</button>
23
+ <button id="next-btn">Next</button>
24
+ <button id="submit-btn" style="display:none;">Submit Quiz</button>
25
+ </div>
26
+ </section>
27
+
28
+ <section id="results" style="display:none;">
29
+ <h2>Your Results</h2>
30
+ <p id="score-display"></p>
31
+ <div id="feedback"></div>
32
+ <button id="restart-btn">Try Again</button>
33
+ </section>
34
+ </main>
35
+
36
+ <footer>
37
+ <p>Based on the paper: "INTERN-S1: A SCIENTIFIC MULTIMODAL FOUNDATION MODEL" by Intern-S1 Team, Shanghai AI Laboratory</p>
38
+ <p><a href="https://huggingface.co/internlm/Intern-S1" target="_blank">Explore Intern-S1 on Hugging Face</a></p>
39
+ </footer>
40
+
41
+ <script src="assets/js/quiz.js"></script>
42
+ </body>
43
+ </html>