LH-Tech-AI commited on
Commit
d7fe16f
·
verified ·
1 Parent(s): 107d03c

Create depth-vs-width.html

Browse files
Files changed (1) hide show
  1. depth-vs-width.html +293 -0
depth-vs-width.html ADDED
@@ -0,0 +1,293 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>SupraLabs | Hidden Topology: Depth vs. Width Scaling for SLMs</title>
7
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
8
+ <style>
9
+ :root {
10
+ --bg: #0f0f0f;
11
+ --surface: #1a1a1a;
12
+ --border: #333;
13
+ --text: #e0e0e0;
14
+ --accent: #536bfe; /* Supra Blue */
15
+ --muted: #888;
16
+ --success: #00e676;
17
+ --warning: #ffb300;
18
+ --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
19
+ }
20
+ * { margin: 0; padding: 0; box-sizing: border-box; }
21
+ body {
22
+ background-color: var(--bg);
23
+ color: var(--text);
24
+ font-family: 'Inter', -apple-system, sans-serif;
25
+ line-height: 1.6;
26
+ padding: 2rem;
27
+ }
28
+ code, pre, .mono { font-family: var(--font-mono); }
29
+ .container { max-width: 1000px; margin: 0 auto; }
30
+ header {
31
+ border-bottom: 2px solid var(--border);
32
+ padding-bottom: 2rem;
33
+ margin-bottom: 3rem;
34
+ display: flex;
35
+ justify-content: space-between;
36
+ align-items: flex-end;
37
+ }
38
+ .logo-area a { text-decoration: none; color: inherit; }
39
+ .logo-area h1 {
40
+ font-size: 1.2rem;
41
+ text-transform: uppercase;
42
+ letter-spacing: 2px;
43
+ color: var(--accent);
44
+ line-height: 1;
45
+ display: flex;
46
+ align-items: center;
47
+ gap: 10px;
48
+ }
49
+ nav a {
50
+ color: var(--text);
51
+ text-decoration: none;
52
+ margin-left: 1.5rem;
53
+ font-size: 0.9rem;
54
+ border-bottom: 1px solid transparent;
55
+ }
56
+ nav a:hover { border-bottom: 1px solid var(--accent); }
57
+ .hero { margin-bottom: 4rem; }
58
+ .hero h2 { font-size: 3rem; line-height: 1.1; margin-bottom: 1.5rem; font-weight: 800; }
59
+ .hero p { font-size: 1.2rem; color: var(--muted); max-width: 750px; }
60
+ .section-label {
61
+ display: block;
62
+ font-family: var(--font-mono);
63
+ color: var(--accent);
64
+ font-size: 0.8rem;
65
+ margin-top: 3rem;
66
+ margin-bottom: 1rem;
67
+ text-transform: uppercase;
68
+ }
69
+ .card { background: var(--surface); border: 1px solid var(--border); padding: 2.5rem; margin-bottom: 2rem; }
70
+ h3 { font-size: 1.6rem; margin-bottom: 1rem; font-weight: 700; }
71
+ p { margin-bottom: 1rem; color: #ccc; }
72
+ ul { margin-left: 1.5rem; margin-bottom: 1.5rem; }
73
+ li { margin-bottom: 0.5rem; }
74
+ .winner-badge { color: var(--success); font-weight: bold; font-family: var(--font-mono); }
75
+ .table-container { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--border); }
76
+ table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.95rem; }
77
+ th, td { padding: 1rem; border-bottom: 1px solid var(--border); }
78
+ th { background-color: rgba(26, 26, 26, 0.8); font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; text-transform: uppercase; }
79
+ tr:hover { background-color: rgba(83, 107, 254, 0.05); }
80
+ .highlight-row { border-left: 4px solid var(--success); background-color: rgba(0, 230, 118, 0.02); }
81
+ .chart-box { background: var(--surface); border: 1px solid var(--border); padding: 2rem; margin-bottom: 2rem; }
82
+ .stats-grid {
83
+ display: grid;
84
+ grid-template-columns: 1fr 1fr 1fr;
85
+ gap: 1rem;
86
+ margin-top: 4rem;
87
+ border-top: 1px solid var(--border);
88
+ padding-top: 2rem;
89
+ }
90
+ .stat-box { padding: 1rem; border-left: 2px solid var(--accent); }
91
+ .stat-box small { display: block; color: var(--muted); font-family: var(--font-mono); }
92
+ footer { margin-top: 6rem; padding-bottom: 2rem; font-size: 0.8rem; color: var(--muted); text-align: center; }
93
+ @media (max-width: 768px) {
94
+ .hero h2 { font-size: 2rem; }
95
+ header { flex-direction: column; align-items: flex-start; gap: 1rem; }
96
+ nav a { margin-left: 0; margin-right: 1rem; }
97
+ .stats-grid { grid-template-columns: 1fr; }
98
+ }
99
+ </style>
100
+ </head>
101
+ <body>
102
+ <div class="container">
103
+ <header>
104
+ <div class="logo-area" style="font-size: 1.5em;">
105
+ <a href="index.html"><h1><img src="./image.png" style="height: 2em" alt="Logo"> SupraLabs_</h1></a>
106
+ </div>
107
+ <nav>
108
+ <a href="#summary">Core Learnings</a>
109
+ <a href="#benchmarks">Topology Matrix</a>
110
+ <a href="#charts">Visualizations</a>
111
+ <a href="https://huggingface.co/SupraLabs" target="_blank">HuggingFace</a>
112
+ </nav>
113
+ </header>
114
+
115
+ <section class="hero">
116
+ <h2>Experiment #4:<br>Hidden Topology &mdash; Depth vs. Width</h2>
117
+ <p>An isolated geometric sweep allocating a uniform parameter budget (~5M) to explore structural limits. We stressed tested deep sequential layers against shallow parallel computing layers over <strong>50,000,000 unique tokens</strong> using local bfloat16 hardware accelerator engines.</p>
118
+ </section>
119
+
120
+ <span class="section-label" id="summary">// Structural_Discoveries_&_Compute_Autobahns</span>
121
+ <div class="card">
122
+ <h3>Shallow & Wide Monopolizes the Megabyte Scale</h3>
123
+ <p>Traditional deep-network assumptions state that depth unlocks highly abstract multi-step logic circuits. Our empirical architectural investigation completely reverses this paradigm for Small Language Models (SLMs) under 10M parameters:</p>
124
+ <ul>
125
+ <li><strong>The Bottleneck of Extreme Depth:</strong> Forcing a 4.2M model into a 12-layer deep structure shrinks internal tracking states down to an informational choke point. The layers are too narrow to retain text variations simultaneously.</li>
126
+ <li><strong>Massive Parallel Compute Highways:</strong> Truncating the architecture to 3 layers while expanding layer dimensions (Hidden: 256) establishes optimal neuronal real-estate. The weights map raw token dependencies instantly in parallel graphs.</li>
127
+ <li><strong>Hardware Acceleration Exploitation:</strong> Because sequential deep layer dependencies are cut, GPU execution pipelines run unfettered. Model througput spikes by 91%, delivering optimal performance profiles at minimal energy footprint.</li>
128
+ </ul>
129
+ </div>
130
+
131
+ <span class="section-label" id="benchmarks">// Topology_Evaluation_Data</span>
132
+ <div class="card" style="padding: 1.5rem;">
133
+ <h3>Controlled Architectural Sweeps</h3>
134
+ <p>Pretrained via optimized hyperparameter constants. Perplexity (PPL) and Lower Pretrain Loss track the precision of language acquisition.</p>
135
+
136
+ <div class="table-container">
137
+ <table>
138
+ <thead>
139
+ <tr>
140
+ <th>Structural Metric</th>
141
+ <th>Exp 1: Deep & Narrow</th>
142
+ <th>Exp 2: Balanced Baseline</th>
143
+ <th style="color: var(--success)">Exp 3: Shallow & Wide (🏆 Win)</th>
144
+ </tr>
145
+ </thead>
146
+ <tbody>
147
+ <tr>
148
+ <td class="mono">Layer Configuration</td>
149
+ <td>12 Layers (Hidden: 128)</td>
150
+ <td>6 Layers (Hidden: 192)</td>
151
+ <td style="color: var(--success)">3 Layers (Hidden: 256)</td>
152
+ </tr>
153
+ </tr>
154
+ <tr>
155
+ <td class="mono">Active Model Parameters</td>
156
+ <td>4,197,504</td>
157
+ <td>5,114,304</td>
158
+ <td>5,244,672</td>
159
+ </tr>
160
+ <tr>
161
+ <td class="mono">Pretrain Step Loss (↓)</td>
162
+ <td>4.539</td>
163
+ <td>4.345</td>
164
+ <td style="color: var(--success); font-weight: bold;">4.188</td>
165
+ </tr>
166
+ <tr>
167
+ <td class="mono">Pretrain Train Loss (↓)</td>
168
+ <td>5.567</td>
169
+ <td>5.302</td>
170
+ <td style="color: var(--success);">5.093</td>
171
+ </tr>
172
+ <tr>
173
+ <td class="mono">ARC-Easy Zero-Shot (↑)</td>
174
+ <td>29.17%</td>
175
+ <td>29.63%</td>
176
+ <td class="winner-badge">29.97%</td>
177
+ </tr>
178
+ <tr>
179
+ <td class="mono">Wikitext Word PPL (↓)</td>
180
+ <td>817.8844</td>
181
+ <td>585.5899</td>
182
+ <td class="winner-badge">418.6314</td>
183
+ </tr>
184
+ <tr>
185
+ <td class="mono">Compute Throughput (⚡)</td>
186
+ <td>218.7 samples/sec</td>
187
+ <td>282.9 samples/sec</td>
188
+ <td class="winner-badge">417.9 samples/sec</td>
189
+ </tr>
190
+ <tr class="highlight-row">
191
+ <td style="font-weight: bold;">EFFICIENCY MATRIX</td>
192
+ <td style="color: var(--warning)">Severe Structural Bottleneck</td>
193
+ <td>Intermediate Compression</td>
194
+ <td style="color: var(--success); font-weight: bold;">SOTA TOPOLOGY SWEETSPOT</td>
195
+ </tr>
196
+ </tbody>
197
+ </table>
198
+ </div>
199
+ </div>
200
+
201
+ <span class="section-label" id="charts">// Visualizing_Structural_Performance</span>
202
+ <div class="chart-box">
203
+ <h3>Downstream Perplexity Collapse vs. Topology</h3>
204
+ <div style="position: relative; height:350px; width:100%">
205
+ <canvas id="topologyChart"></canvas>
206
+ </div>
207
+ </div>
208
+
209
+ <div class="chart-box">
210
+ <h3>The Hardware Advantage: Active Processing Speeds</h3>
211
+ <p style="font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem;">Fewer structural steps cut matrix synchronization gaps, unlocking maximum execution parallelization on local Tensor Core engines.</p>
212
+ <div style="position: relative; height:350px; width:100%">
213
+ <canvas id="throughputChart"></canvas>
214
+ </div>
215
+ </div>
216
+
217
+ <section class="stats-grid" id="hardware">
218
+ <div class="stat-box">
219
+ <small>COMPUTE TENSOR ENGINE</small>
220
+ <strong>Local bfloat16 Hardware Run</strong>
221
+ </div>
222
+ <div class="stat-box">
223
+ <small>CONSTANT SEARCH ENGINE</small>
224
+ <strong>Optuna Peak LR 0.001178</strong>
225
+ </div>
226
+ <div class="stat-box">
227
+ <small>OPTIMAL LAYOUT PROFILE</small>
228
+ <strong>3-Layer Wide Configuration</strong>
229
+ </div>
230
+ </section>
231
+
232
+ <footer>
233
+ <p>&copy; 2026 SupraLabs. High performance. Small footprints. Proudly open-source.</p>
234
+ </footer>
235
+ </div>
236
+
237
+ <script>
238
+ // Topology Metrics Chart
239
+ const ctxTopo = document.getElementById('topologyChart').getContext('2d');
240
+ new Chart(ctxTopo, {
241
+ type: 'bar',
242
+ data: {
243
+ labels: ['Deep & Narrow (12L)', 'Balanced (6L)', 'Shallow & Wide (3L)'],
244
+ datasets: [
245
+ {
246
+ label: 'Wikitext Word Perplexity (Lower = Better)',
247
+ data: [817.88, 585.58, 418.63],
248
+ backgroundColor: ['rgba(255, 179, 0, 0.2)', 'rgba(83, 107, 254, 0.2)', 'rgba(0, 230, 118, 0.3)'],
249
+ borderColor: ['#ffb300', '#536bfe', '#00e676'],
250
+ borderWidth: 2
251
+ }
252
+ ]
253
+ },
254
+ options: {
255
+ responsive: true,
256
+ maintainAspectRatio: false,
257
+ plugins: { legend: { labels: { color: '#bbb' } } },
258
+ scales: {
259
+ y: { grid: { color: '#222' }, ticks: { color: '#888' } },
260
+ x: { grid: { display: false }, ticks: { color: '#aaa' } }
261
+ }
262
+ }
263
+ });
264
+
265
+ // Throughput Chart
266
+ const ctxSpeed = document.getElementById('throughputChart').getContext('2d');
267
+ new Chart(ctxSpeed, {
268
+ type: 'line',
269
+ data: {
270
+ labels: ['Deep & Narrow', 'Balanced Baseline', 'Shallow & Wide'],
271
+ datasets: [{
272
+ label: 'Pretrain Throughput (samples/sec)',
273
+ data: [218.7, 282.9, 417.9],
274
+ borderColor: '#536bfe',
275
+ backgroundColor: 'rgba(83, 107, 254, 0.1)',
276
+ fill: true,
277
+ tension: 0.2,
278
+ borderWidth: 3
279
+ }]
280
+ },
281
+ options: {
282
+ responsive: true,
283
+ maintainAspectRatio: false,
284
+ plugins: { legend: { labels: { color: '#bbb' } } },
285
+ scales: {
286
+ y: { grid: { color: '#222' }, ticks: { color: '#888' } },
287
+ x: { grid: { color: '#222' }, ticks: { color: '#aaa' } }
288
+ }
289
+ }
290
+ });
291
+ </script>
292
+ </body>
293
+ </html>