File size: 12,936 Bytes
1df72c3
 
 
 
edf774b
 
1df72c3
 
edf774b
4e141cd
edf774b
4e141cd
 
edf774b
 
4e141cd
edf774b
 
4e141cd
 
edf774b
 
 
 
 
 
1df72c3
4e141cd
 
edf774b
 
 
4e141cd
edf774b
 
 
 
 
 
4e141cd
edf774b
 
 
4e141cd
edf774b
 
1df72c3
 
4e141cd
edf774b
 
4e141cd
 
edf774b
4e141cd
edf774b
4e141cd
edf774b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4e141cd
 
edf774b
 
 
4e141cd
edf774b
4e141cd
edf774b
 
 
 
 
4e141cd
edf774b
 
 
 
32a93fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4e141cd
edf774b
 
 
 
 
4e141cd
edf774b
 
 
 
4e141cd
edf774b
 
 
 
4e141cd
edf774b
 
 
4e141cd
edf774b
 
4e141cd
edf774b
 
 
 
4e141cd
 
edf774b
4e141cd
1df72c3
edf774b
 
 
 
 
 
 
 
 
 
 
1df72c3
 
 
4e141cd
edf774b
4e141cd
edf774b
 
357ed4f
edf774b
 
 
357ed4f
edf774b
 
 
357ed4f
 
edf774b
357ed4f
edf774b
357ed4f
edf774b
 
 
 
 
357ed4f
 
edf774b
357ed4f
edf774b
357ed4f
edf774b
4e141cd
 
edf774b
 
 
 
4e141cd
edf774b
4e141cd
edf774b
 
4e141cd
edf774b
 
357ed4f
edf774b
 
 
357ed4f
edf774b
 
 
 
32a93fb
 
 
 
 
 
edf774b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357ed4f
 
 
 
 
 
 
 
 
edf774b
 
357ed4f
edf774b
357ed4f
edf774b
357ed4f
edf774b
 
 
 
 
 
 
 
 
 
e3f32b0
edf774b
 
 
 
 
357ed4f
 
edf774b
 
 
 
 
 
 
 
 
 
 
357ed4f
edf774b
 
 
 
 
 
357ed4f
edf774b
 
1df72c3
32a93fb
 
 
 
 
 
357ed4f
32a93fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1df72c3
4e141cd
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Small But Mighty: Analyzing Compact Math Models</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 1000px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f9f9f9;
        }
        h1, h2, h3, h4 {
            color: #2d3748;
        }
        h1 {
            font-size: 2.5rem;
            margin-bottom: 2rem;
            text-align: center;
            color: #1a365d;
            border-bottom: 3px solid #4299e1;
            padding-bottom: 0.5rem;
        }
        h2 {
            font-size: 1.8rem;
            margin-top: 2rem;
            border-bottom: 1px solid #e2e8f0;
            padding-bottom: 0.5rem;
        }
        .container {
            background-color: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
        }
        .model-card {
            background-color: #f0f5ff;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            border-left: 4px solid #4299e1;
        }
        .model-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        .model-name {
            font-weight: bold;
            font-size: 1.2rem;
            color: #2b6cb0;
        }
        .model-params {
            background-color: #ebf8ff;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.9rem;
            color: #2c5282;
        }
        .performance-highlight {
            background-color: #e6fffa;
            padding: 10px;
            border-radius: 4px;
            margin-top: 10px;
            border-left: 3px solid #38b2ac;
        }
        .chart-container {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 20px;
            margin: 30px 0;
        }
        .chart {
            flex: 1;
            min-width: 300px;
            background: white;
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        .chart img {
            width: 100%;
            height: auto;
            border-radius: 4px;
            cursor: zoom-in;
            transition: transform 0.3s ease;
        }
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.9);
        }
        .modal-content {
            margin: auto;
            display: block;
            max-width: 90%;
            max-height: 90%;
        }
        .close {
            position: absolute;
            top: 15px;
            right: 35px;
            color: #f1f1f1;
            font-size: 40px;
            font-weight: bold;
            transition: 0.3s;
            cursor: pointer;
        }
        .close:hover,
        .close:focus {
            color: #bbb;
            text-decoration: none;
        }
        .chart-caption {
            text-align: center;
            margin-top: 10px;
            font-style: italic;
            color: #718096;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        th, td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
        }
        th {
            background-color: #edf2f7;
            font-weight: bold;
        }
        tr:hover {
            background-color: #f7fafc;
        }
        .highlight {
            background-color: #fffbeb;
        }
        .footer {
            margin-top: 40px;
            text-align: center;
            color: #718096;
            font-size: 0.9rem;
        }
        .key-finding {
            background-color: #ebf8ff;
            padding: 15px;
            border-radius: 8px;
            margin: 20px 0;
            border-left: 4px solid #3182ce;
        }
        .key-finding h3 {
            margin-top: 0;
            color: #2b6cb0;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Small But Mighty: Compact Mathematical Reasoning Models</h1>
        
        <div class="key-finding">
            <h3>Key Insight</h3>
            <p>The data shows that some small language models (under 200M parameters) can demonstrate significant mathematical abilities, challenging the assumption that large parameter counts are required for basic math reasoning.</p>
        </div>

        <h2>Model Overview</h2>
        <p>This analysis compares the performance of various language models on mathematical problems, with a focus on compact models:</p>
        
        <div class="model-card">
            <div class="model-info">
                <span class="model-name">FlameF0X/MathGPT2</span>
                <span class="model-params">81.9M parameters</span>
            </div>
            <p>The highest performer among tested models, demonstrating remarkable mathematical abilities despite its tiny parameter count. Shows particular strength in addition operations with 63.1% accuracy.</p>
            <div class="performance-highlight">
                <strong>Overall math accuracy:</strong> 42.7% on 1000 test questions
            </div>
        </div>
        
        <div class="model-card">
            <div class="model-info">
                <span class="model-name">PingVortex/VLM-1</span>
                <span class="model-params">124M parameters</span>
            </div>
            <p>The second best performer, scoring 4.8% overall accuracy. Shows more balanced performance across operations with particular strength in division (14.2%).</p>
            <div class="performance-highlight">
                <strong>Operation strength:</strong> 14.2% accuracy on division
            </div>
        </div>
        
        <div class="model-card">
            <div class="model-info">
                <span class="model-name">aquiffoo/aquif-r1-1b</span>
                <span class="model-params">1.14B parameters + CoT reasoning</span>
            </div>
            <p>Despite being significantly larger and incorporating chain-of-thought reasoning capabilities, this model shows no measurable performance on the tested mathematical problems.</p>
        </div>

        <h2>Performance Analysis</h2>
        
        <div class="chart-container">
            <div class="chart">
                <img src="6818abac-ba0b-4fae-aaf4-d42a9d4ebc04.png" alt="Chart showing model accuracy by operation type">
                <div class="chart-caption">Figure 1: Accuracy by Operation Type (%)</div>
            </div>
            <div class="chart">
                <img src="284d12f0-c0f1-4e2f-8455-1ad7fefc3e1e.png" alt="Chart showing model performance on math problems">
                <div class="chart-caption">Figure 2: Correct vs Incorrect Answers (1000 questions each)</div>
            </div>
        </div>

        <!-- Modal for image zoom -->
        <div id="imageModal" class="modal">
            <span class="close">&times;</span>
            <img class="modal-content" id="zoomedImage">
        </div>

        <h2>Detailed Accuracy Results</h2>
        
        <table>
            <thead>
                <tr>
                    <th>Model</th>
                    <th>Addition (+)</th>
                    <th>Subtraction (-)</th>
                    <th>Multiplication (*)</th>
                    <th>Division (/)</th>
                    <th>Exponentiation (**)</th>
                    <th>Overall</th>
                </tr>
            </thead>
            <tbody>
                <tr class="highlight">
                    <td>MathGPT2 (81.9M)</td>
                    <td>63.1%</td>
                    <td>59.3%</td>
                    <td>34.9%</td>
                    <td>22.3%</td>
                    <td>8.8%</td>
                    <td>42.7%</td>
                </tr>
                <tr>
                    <td>VLM-1 (124M)</td>
                    <td>2.6%</td>
                    <td>3.1%</td>
                    <td>0.0%</td>
                    <td>14.2%</td>
                    <td>0.0%</td>
                    <td>4.8%</td>
                </tr>
                <tr>
                    <td>aquif-r1-1b (1.14B)</td>
                    <td>0.0%</td>
                    <td>0.0%</td>
                    <td>0.0%</td>
                    <td>0.0%</td>
                    <td>0.0%</td>
                    <td>0.0%</td>
                </tr>
                
            </tbody>
        </table>

        <h2>Key Observations</h2>
        <ul>
            <li><strong>Size doesn't always matter:</strong> MathGPT2 with only 81.9M parameters demonstrates impressive mathematical abilities, outperforming larger models.</li>
            <li><strong>Operation specialization:</strong> MathGPT2 excels at addition (63.1%) and subtraction (59.3%), while VLM-1 shows particular strength in division operations (14.2%).</li>
            <li><strong>Architectural importance:</strong> The results suggest that architecture design and training approach may be more important than raw parameter count for specialized tasks.</li>
            <li><strong>Zero performance:</strong> Four of the tested models showed no measurable mathematical ability on this test set.</li>
            <li><strong>Chain-of-thought limitations:</strong> Despite having CoT capabilities, aquif-r1-1b did not demonstrate mathematical reasoning abilities in this benchmark.</li>
        </ul>

        <div class="key-finding">
            <h3>Research Implications</h3>
            <p>These results challenge conventional wisdom about language model scaling laws for mathematical reasoning capabilities. They suggest that highly specialized, compact models might offer a more efficient approach for specific reasoning tasks compared to general-purpose large models.</p>
        </div>

        <h2>Conclusion</h2>
        <p>This analysis demonstrates that extremely small language models can exhibit significant mathematical reasoning abilities, with models as small as 81.9M parameters showing the ability to solve basic arithmetic problems. The standout performer, MathGPT2 with only 81.9M parameters, achieved an impressive 42.7% accuracy on a diverse set of 1000 mathematical questions.</p>
        
        <p>These findings suggest that efficient architectural design and specialized training approaches may be more important than raw parameter count when optimizing for specific reasoning capabilities. This could have significant implications for resource-constrained applications where deploying massive models is impractical.</p>

        <p>Future research directions could include investigating what specific architectural choices enable these compact models to perform mathematical operations, and how these insights might be applied to develop more efficient specialized models for other reasoning tasks.</p>

        <div class="footer">
            <p>Data analysis based on benchmark results for MathGPT2 (81.9M), VLM-1 (124M), aquif-r1-1b (1.14B), and other models</p>
            <p>© 2025 • Created for educational purposes</p>
        </div>
    </div>

    <script>
        // Get the modal
        var modal = document.getElementById("imageModal");
        
        // Get the image and insert it inside the modal
        var zoomableImages = document.getElementsByClassName("chart").getElementsByTagName("img");
        var modalImg = document.getElementById("zoomedImage");
        
        // Add click event to all zoomable images
        for (var i = 0; i < zoomableImages.length; i++) {
            zoomableImages[i].onclick = function() {
                modal.style.display = "flex";
                modalImg.src = this.src;
            }
        }
        
        // Get the <span> element that closes the modal
        var span = document.getElementsByClassName("close")[0];
        
        // When the user clicks on <span> (x), close the modal
        span.onclick = function() { 
            modal.style.display = "none";
        }
        
        // Close the modal when clicking outside the image
        modal.onclick = function(event) {
            if (event.target === modal) {
                modal.style.display = "none";
            }
        }
    </script>
</body>
</html>