AashishAIHub commited on
Commit
eb25815
·
1 Parent(s): 5ba22d0

feat: finalized compliant branding pivot and restored full technical content for Transformer Deep-Dive

Browse files
Files changed (1) hide show
  1. Transformer-Deep-Dive/index.html +233 -275
Transformer-Deep-Dive/index.html CHANGED
@@ -4,318 +4,276 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Transformer Deep-Dive: Architectures & Foundations</title>
7
-
8
- <!-- MathJax 3.x -->
9
- <script>
10
- window.MathJax = {
11
- tex: {
12
- inlineMath: [['$', '$'], ['\\(', '\\)']],
13
- displayMath: [['$$', '$$'], ['\\[', '\\]']]
14
- },
15
- svg: { fontCache: 'global' }
16
- };
17
- </script>
18
  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
19
-
20
  <style>
21
  :root {
22
- --bg: #0a0b10;
23
- --surface: #161b22;
24
- --text: #f0f6fc;
25
- --text-dim: #b0b7c3;
26
- --cyan: #a371f7; /* Themed to Purple for Masterclass */
27
- --orange: #00d4ff; /* Themed to Cyan */
28
- --green: #2ecc71;
29
- --yellow: #ffaa00;
30
- }
31
-
32
- body {
33
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
34
- background: var(--bg);
35
- color: var(--text);
36
- line-height: 1.6;
37
- overflow-x: hidden;
38
- margin: 0;
39
- }
40
-
41
- .container {
42
- max-width: 1400px;
43
- margin: 0 auto;
44
- padding: 20px;
45
- }
46
-
47
- header {
48
- text-align: center;
49
- margin-bottom: 40px;
50
- padding: 30px 0;
51
- border-bottom: 2px solid var(--cyan);
52
- }
53
-
54
- h1 {
55
- font-size: 2.5em;
56
- background: linear-gradient(135deg, var(--cyan), var(--orange));
57
- background-clip: text;
58
- -webkit-background-clip: text;
59
- -webkit-text-fill-color: transparent;
60
- margin-bottom: 10px;
61
- }
62
-
63
- .disclaimer {
64
- margin-top: 50px;
65
- padding: 20px;
66
- border-top: 1px solid var(--surface);
67
- color: var(--text-dim);
68
- font-size: 0.85em;
69
- text-align: center;
70
- max-width: 800px;
71
- margin-left: auto;
72
- margin-right: auto;
73
- }
74
-
75
- .subtitle {
76
- color: var(--text-dim);
77
- font-size: 1.1em;
78
- }
79
-
80
- .dashboard {
81
- display: none;
82
- }
83
-
84
- .dashboard.active {
85
- display: block;
86
- }
87
-
88
- .stanford-note {
89
- background: rgba(163, 113, 247, 0.1);
90
- border-left: 4px solid var(--cyan);
91
- padding: 20px;
92
- border-radius: 8px;
93
- margin: 25px 0;
94
- position: relative;
95
- }
96
-
97
- .grid {
98
- display: grid;
99
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
100
- gap: 25px;
101
- margin: 40px 0;
102
- }
103
-
104
- .card {
105
- background: linear-gradient(135deg, rgba(163, 113, 247, 0.15), rgba(0, 212, 255, 0.15));
106
- border: 2px solid var(--cyan);
107
- border-radius: 12px;
108
- padding: 30px;
109
- cursor: pointer;
110
- transition: all 0.3s ease;
111
- text-align: center;
112
- }
113
-
114
- .card:hover {
115
- transform: translateY(-5px);
116
- box-shadow: 0 10px 30px rgba(163, 113, 247, 0.2);
117
- border-color: var(--orange);
118
- }
119
-
120
- .card-icon { font-size: 3em; margin-bottom: 15px; }
121
- .card h3 { color: var(--cyan); font-size: 1.5em; margin-bottom: 10px; }
122
- .card p { color: var(--text-dim); font-size: 0.95em; }
123
-
124
- .module { display: none; }
125
- .module.active { display: block; animation: fadeIn 0.3s ease; }
126
-
127
- @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
128
-
129
- .btn-back {
130
- display: inline-block;
131
- text-decoration: none;
132
- padding: 10px 20px;
133
- background: var(--cyan);
134
- color: var(--bg);
135
- border: none;
136
- border-radius: 6px;
137
- cursor: pointer;
138
- font-weight: 600;
139
- margin-bottom: 25px;
140
- transition: all 0.3s ease;
141
- }
142
-
143
- .tabs {
144
- display: flex;
145
- gap: 10px;
146
- margin-bottom: 30px;
147
- border-bottom: 1px solid rgba(163, 113, 247, 0.2);
148
- padding-bottom: 15px;
149
- overflow-x: auto;
150
- }
151
-
152
- .tab-btn {
153
- padding: 10px 20px;
154
- background: var(--surface);
155
- color: var(--text);
156
- border: none;
157
- border-radius: 6px;
158
- cursor: pointer;
159
- transition: all 0.3s ease;
160
- }
161
-
162
- .tab-btn.active { background: var(--cyan); color: var(--bg); }
163
-
164
- .tab { display: none; }
165
- .tab.active { display: block; }
166
-
167
- .section {
168
- background: var(--surface);
169
- border: 1px solid rgba(163, 113, 247, 0.2);
170
- border-radius: 10px;
171
- padding: 30px;
172
- margin-bottom: 25px;
173
- }
174
-
175
- .list-item {
176
- display: flex;
177
- gap: 15px;
178
- margin: 20px 0;
179
- padding: 20px;
180
- background: rgba(255, 255, 255, 0.03);
181
- border-radius: 8px;
182
- border-left: 4px solid var(--cyan);
183
- }
184
-
185
- .list-num { color: var(--orange); font-weight: bold; font-size: 1.2em; }
186
-
187
- .visual-demo {
188
- margin-top: 15px;
189
- background: rgba(0,0,0,0.3);
190
- padding: 20px;
191
- border-radius: 12px;
192
- }
193
-
194
- .code-block {
195
- background: #0d1117;
196
- padding: 20px;
197
- border-radius: 8px;
198
- font-family: monospace;
199
- overflow-x: auto;
200
- color: #c9d1d9;
201
- }
202
-
203
- .formula {
204
- background: rgba(163, 113, 247, 0.1);
205
- padding: 20px;
206
- border-radius: 8px;
207
- text-align: center;
208
- margin: 20px 0;
209
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  </style>
211
  </head>
212
  <body>
213
- <div class="container">
214
- <!-- HEADER -->
215
- <header>
216
- <h1>🧠 Transformer Deep-Dive</h1>
217
- <p class="subtitle">From Attention to Reasoning: A Masterclass in Modern Architectures (2025 Edition)</p>
218
- </header>
219
-
220
- <!-- DASHBOARD -->
221
- <div id="dashboard" class="dashboard active">
222
- <div style="text-align: center; margin-bottom: 40px;">
223
- <p style="color: var(--text-dim); max-width: 800px; margin: 0 auto;">
224
- Explore the evolution of large language models through 9 specialized modules.
225
- </p>
226
- <div style="margin-top:15px;"><a href="../index.html" class="btn-back">← Dashboard</a></div>
227
- </div>
228
  <div class="grid" id="modulesGrid"></div>
229
  </div>
230
-
231
- <!-- MODULES -->
232
- <div id="modulesContainer"></div>
 
 
 
 
233
  </div>
234
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  <script>
236
  const modules = [
237
- { id: "l1", title: "Foundations: NLP & Attention", icon: "📚", category: "Core", color: "#a371f7", desc: "Tokenization, Embeddings, and Self-Attention Mechanism." },
238
- { id: "l2", title: "Optimized Architectures", icon: "🤖", category: "Architecture", color: "#00d4ff", desc: "MHA, GQA, RoPE, and RMSNorm." },
239
- { id: "l3", title: "LLM Internals & Inference", icon: "🧠", category: "System", color: "#ffaa00", desc: "MoE, vLLM, and Continuous Batching." },
240
- { id: "l4", title: "Training & Scaling Laws", icon: "⚙️", category: "Training", color: "#2ecc71", desc: "Chinchilla, 3D Parallelism, and Data Hygiene." },
241
- { id: "l5", title: "Alignment (RLHF & DPO)", icon: "⚖️", category: "Safety", color: "#f771b6", desc: "Shaping models to human preferences." },
242
- { id: "l6", title: "Deep Reasoning (o1/R1)", icon: "🤔", category: "Reasoning", color: "#ff6b35", desc: "Test-time compute and thinking tokens." },
243
- { id: "l7", title: "Agentic Systems & RAG", icon: "🕵️", category: "Agents", color: "#00c9a7", desc: "Tool use, ReAct loop, and Semantic Retrieval." },
244
- { id: "l8", title: "Evaluation & Judges", icon: "📊", category: "Metrics", color: "#a371f7", desc: "Benchmarks and LLM-as-a-Judge." },
245
- { id: "l9", title: "Multimodal Frontiers", icon: "👁️", category: "Vision", color: "#00d4ff", desc: "ViT, CLIP, and Unified Latent Spaces." }
246
  ];
247
 
248
  const CONTENT = {
249
  l1: {
250
- overview: "<p>The journey from sequential RNNs to parallel Transformers. How Self-Attention solved the vanishing gradient problem.</p>",
251
- concepts: `
252
  <div class="list-item">
253
  <div class="list-num">01</div>
254
- <div><strong>BPE Tokenization:</strong> Sub-word merging for vocabulary efficiency.</div>
 
 
 
 
 
 
 
 
 
 
 
255
  </div>
256
  <div class="list-item">
257
  <div class="list-num">02</div>
258
- <div><strong>Word2Vec Math:</strong> Semantic vectors where distance equals meaning (King - Man + Woman = Queen).</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  </div>
260
  `
261
  }
262
- // ... truncated for brevity, but I will include all visual demos in the real write
263
  };
264
 
265
- function initDashboard() {
266
- const grid = document.getElementById("modulesGrid");
267
- const container = document.getElementById("modulesContainer");
268
-
269
  modules.forEach(m => {
270
- const card = document.createElement("div");
271
- card.className = "card";
272
- card.onclick = () => switchTo(m.id);
273
- card.innerHTML = `<div class="card-icon">${m.icon}</div><h3>${m.title}</h3><p>${m.desc}</p>`;
274
  grid.appendChild(card);
275
-
276
- const modDiv = document.createElement("div");
277
- modDiv.id = m.id + "-module";
278
- modDiv.className = "module";
279
- modDiv.innerHTML = \`
280
- <button class="btn-back" onclick="switchTo('dashboard')">← Overview</button>
281
- <h2>\${m.icon} \${m.title}</h2>
282
- <div class="tabs">
283
- <button class="tab-btn active" onclick="switchTab(event, '\${m.id}-theory')">Key Concepts</button>
284
- </div>
285
- <div id="\${m.id}-theory" class="tab active">
286
- <div class="section">
287
- \${getModuleContent(m.id)}
288
- </div>
289
- </div>
290
- \`;
291
- container.appendChild(modDiv);
292
  });
293
  }
294
 
295
- function getModuleContent(id) {
296
- // Simplified for the example but I will populate it with the rich SVG content
297
- return "Content in development...";
298
- }
299
-
300
- function switchTo(id) {
301
- document.querySelectorAll(".module, .dashboard").forEach(d => d.classList.remove("active"));
302
- if (id === 'dashboard') document.getElementById("dashboard").classList.add("active");
303
- else document.getElementById(id + "-module").classList.add("active");
304
  window.scrollTo(0,0);
 
305
  }
306
 
307
- function switchTab(e, id) {
308
- e.target.parentElement.querySelectorAll(".tab-btn").forEach(b => b.classList.remove("active"));
309
- e.target.parentElement.parentElement.querySelectorAll(".tab").forEach(t => t.classList.remove("active"));
310
- e.target.classList.add("active");
311
- document.getElementById(id).classList.add("active");
312
  }
313
 
314
- initDashboard();
315
  </script>
316
-
317
- <footer class="disclaimer">
318
- <p><strong>Disclaimer:</strong> This content is an independent educational synthesis based on public research papers (e.g., "Attention Is All You Need", "Chinchilla Scaling Laws") and open-source materials. It is not affiliated with, endorsed by, or sponsored by any university or academic institution. Branding is used for informational purposes only. © 2025 AI Engineering Masterclass.</p>
319
- </footer>
320
  </body>
321
  </html>
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Transformer Deep-Dive: Architectures & Foundations</title>
 
 
 
 
 
 
 
 
 
 
 
7
  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
 
8
  <style>
9
  :root {
10
+ --bg: #0a0b10; --surface: #161b22; --text: #f0f6fc; --text-dim: #b0b7c3;
11
+ --cyan: #a371f7; --orange: #00d4ff; --green: #2ecc71; --yellow: #ffaa00;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  }
13
+ body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; margin: 0; }
14
+ .container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
15
+ header { text-align: center; margin-bottom: 60px; padding-bottom: 40px; border-bottom: 1px solid var(--surface); }
16
+ h1 { font-size: 3em; background: linear-gradient(135deg, var(--cyan), var(--orange)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 0; }
17
+ .subtitle { color: var(--text-dim); font-size: 1.2em; margin-top: 10px; }
18
+ .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 40px; }
19
+ .card { background: var(--surface); border: 1px solid rgba(163, 113, 247, 0.2); border-radius: 12px; padding: 30px; cursor: pointer; transition: 0.3s; }
20
+ .card:hover { transform: translateY(-5px); border-color: var(--cyan); box-shadow: 0 10px 30px rgba(163, 113, 247, 0.1); }
21
+ .card-icon { font-size: 2.5em; margin-bottom: 15px; }
22
+ .module { display: none; } .module.active { display: block; }
23
+ .btn-back { background: var(--surface); border: 1px solid var(--cyan); color: var(--cyan); padding: 10px 20px; border-radius: 6px; cursor: pointer; margin-bottom: 30px; }
24
+ .section { background: var(--surface); padding: 30px; border-radius: 12px; margin-bottom: 30px; border: 1px solid rgba(255,255,255,0.05); }
25
+ .list-item { display: flex; gap: 15px; margin: 20px 0; padding: 20px; background: rgba(255,255,255,0.02); border-left: 4px solid var(--cyan); border-radius: 4px; }
26
+ .list-num { color: var(--orange); font-weight: bold; }
27
+ .visual-demo { background: #000; border-radius: 8px; padding: 20px; margin-top: 15px; border: 1px solid rgba(255,255,255,0.1); }
28
+ .disclaimer { border-top: 1px solid var(--surface); margin-top: 80px; padding: 40px 0; color: var(--text-dim); font-size: 0.85em; text-align: center; }
29
+ .tabs { display: flex; gap: 10px; margin-bottom: 25px; border-bottom: 1px solid var(--surface); padding-bottom: 15px; }
30
+ .tab-btn { background: none; border: none; color: var(--text-dim); padding: 8px 16px; cursor: pointer; border-radius: 4px; }
31
+ .tab-btn.active { background: var(--cyan); color: #000; font-weight: bold; }
32
+ .tab-content { display: none; } .tab-content.active { display: block; }
33
+ code { background: #000; padding: 2px 6px; border-radius: 4px; color: var(--orange); }
34
  </style>
35
  </head>
36
  <body>
37
+ <div class="container" id="app">
38
+ <div id="dashboard">
39
+ <header>
40
+ <h1>🧠 Transformer Deep-Dive</h1>
41
+ <p class="subtitle">Advanced Architectures, Scaling Laws, and Alignment (2025 Edition)</p>
42
+ <div style="margin-top: 20px;"><a href="../index.html" style="color: var(--cyan); text-decoration: none;">← Back to Hub</a></div>
43
+ </header>
 
 
 
 
 
 
 
 
44
  <div class="grid" id="modulesGrid"></div>
45
  </div>
46
+ <div id="moduleView" class="module">
47
+ <button class="btn-back" onclick="showDashboard()">← Back Overview</button>
48
+ <div id="moduleContent"></div>
49
+ </div>
50
+ <footer class="disclaimer">
51
+ <p><strong>Disclaimer:</strong> This content is an independent educational synthesis based on public research. Not affiliated with any academic institution. Branding for referential purposes only.</p>
52
+ </footer>
53
  </div>
54
 
55
+ <!-- SVG Market Definitions -->
56
+ <svg style="width:0;height:0;position:absolute;">
57
+ <defs>
58
+ <marker id="arrow-green" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
59
+ <path d="M 0 0 L 10 5 L 0 10 z" fill="var(--green)" />
60
+ </marker>
61
+ <marker id="arrow-cyan" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
62
+ <path d="M 0 0 L 10 5 L 0 10 z" fill="var(--cyan)" />
63
+ </marker>
64
+ </defs>
65
+ </svg>
66
+
67
  <script>
68
  const modules = [
69
+ { id: "l1", title: "Foundations: NLP & Attention", icon: "📚", desc: "Tokenization, Word2Vec, and Self-Attention." },
70
+ { id: "l2", title: "Optimized Architectures", icon: "🤖", desc: "MHA, GQA, RoPE, and RMSNorm." },
71
+ { id: "l3", title: "System: MoE & vLLM", icon: "⚙️", desc: "Sparse Experts and Memory Paging." },
72
+ { id: "l4", title: "Scaling Laws & Training", icon: "📈", desc: "Chinchilla Laws and Data Hygiene." },
73
+ { id: "l5", title: "Safety: Alignment (RLHF)", icon: "⚖️", desc: "SFT, Reward Models, and PPO." },
74
+ { id: "l6", title: "Deep Reasoning", icon: "🤔", desc: "Thinking tokens and Search Trees." },
75
+ { id: "l7", title: "Agentic Systems", icon: "🕵️", desc: "Tool Use and ReAct Loops." },
76
+ { id: "l8", title: "Evaluation & Benchmarks", icon: "📊", desc: "Chatbot Arena and Model Judges." },
77
+ { id: "l9", title: "Multimodal Frontiers", icon: "👁️", desc: "ViT and CLIP Embeddings." }
78
  ];
79
 
80
  const CONTENT = {
81
  l1: {
82
+ theory: `
 
83
  <div class="list-item">
84
  <div class="list-num">01</div>
85
+ <div>
86
+ <strong>BPE Tokenization:</strong> Sub-word merging for efficiency.
87
+ <div class="visual-demo">
88
+ <svg viewBox="0 0 400 100" style="width:100%">
89
+ <rect x="20" y="30" width="40" height="30" rx="4" fill="var(--surface)" stroke="var(--cyan)" />
90
+ <text x="32" y="50" fill="var(--text)" font-size="12">l o</text>
91
+ <path d="M 65 45 L 95 45" stroke="var(--green)" marker-end="url(#arrow-green)" />
92
+ <rect x="100" y="30" width="60" height="30" rx="4" fill="rgba(46, 204, 113, 0.2)" stroke="var(--green)" />
93
+ <text x="115" y="50" fill="var(--text)" font-size="12">"low"</text>
94
+ </svg>
95
+ </div>
96
+ </div>
97
  </div>
98
  <div class="list-item">
99
  <div class="list-num">02</div>
100
+ <div>
101
+ <strong>Word2Vec:</strong> Semantic vector math.
102
+ <div class="visual-demo">
103
+ <svg viewBox="0 0 400 150" style="width:100%">
104
+ <circle cx="50" cy="120" r="4" fill="var(--orange)" /> <text x="60" y="125" fill="var(--text)" font-size="12">Man</text>
105
+ <line x1="50" y1="120" x2="150" y2="40" stroke="var(--orange)" stroke-dasharray="4" />
106
+ <circle cx="150" cy="40" r="4" fill="var(--orange)" /> <text x="160" y="45" fill="var(--text)" font-size="12">King</text>
107
+ <circle cx="200" cy="120" r="4" fill="var(--cyan)" /> <text x="210" y="125" fill="var(--text)" font-size="12">Woman</text>
108
+ <line x1="200" y1="120" x2="300" y2="40" stroke="var(--cyan)" stroke-dasharray="4" />
109
+ <circle cx="300" cy="40" r="4" fill="var(--cyan)" /> <text x="310" y="45" fill="var(--text)" font-size="12">Queen</text>
110
+ </svg>
111
+ </div>
112
+ </div>
113
+ </div>
114
+ `
115
+ },
116
+ l2: {
117
+ theory: `
118
+ <div class="list-item">
119
+ <div class="list-num">01</div>
120
+ <div>
121
+ <strong>Grouped-Query Attention (GQA):</strong> Memory efficiency.
122
+ <div class="visual-demo">
123
+ <svg viewBox="0 0 400 100" style="width:100%">
124
+ <rect x="20" y="30" width="20" height="15" fill="var(--cyan)" />
125
+ <rect x="20" y="55" width="20" height="15" fill="var(--cyan)" />
126
+ <path d="M 45 45 L 80 55" stroke="var(--orange)" />
127
+ <rect x="85" y="45" width="20" height="20" fill="var(--orange)" />
128
+ <text x="115" y="60" fill="var(--text-dim)" font-size="10">Shared KV Head</text>
129
+ </svg>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ <div class="list-item">
134
+ <div class="list-num">02</div>
135
+ <div><strong>RoPE:</strong> Relative distance encoded as rotations in the complex plane.</div>
136
+ </div>
137
+ `
138
+ },
139
+ l3: {
140
+ theory: `
141
+ <div class="list-item">
142
+ <div class="list-num">01</div>
143
+ <div>
144
+ <strong>Mixture of Experts (MoE):</strong> Sparse routing.
145
+ <div class="visual-demo">
146
+ <svg viewBox="0 0 400 100" style="width:100%">
147
+ <rect x="20" y="40" width="60" height="20" fill="var(--cyan)" />
148
+ <path d="M 85 50 L 150 20" stroke="var(--green)" />
149
+ <rect x="160" y="10" width="40" height="30" fill="var(--green)" opacity="0.4" />
150
+ <text x="210" y="30" fill="var(--green)" font-size="10">Expert 1 Active</text>
151
+ </svg>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ <div class="list-item">
156
+ <div class="list-num">02</div>
157
+ <div><strong>PagedAttention:</strong> vLLM's memory management.</div>
158
+ </div>
159
+ `
160
+ },
161
+ l4: {
162
+ theory: `
163
+ <div class="list-item">
164
+ <div class="list-num">01</div>
165
+ <div><strong>Chinchilla Scaling:</strong> Compute-optimal balance.</div>
166
+ </div>
167
+ <div class="list-item">
168
+ <div class="list-num">02</div>
169
+ <div><strong>Parallelism:</strong> TP, PP, and DP strategies.</div>
170
+ </div>
171
+ `
172
+ },
173
+ l5: {
174
+ theory: `
175
+ <div class="list-item">
176
+ <div class="list-num">01</div>
177
+ <div>
178
+ <strong>RLHF Lifecycle:</strong> Aligning models with human values.
179
+ <div class="visual-demo">
180
+ <svg viewBox="0 0 400 100" style="width:100%">
181
+ <rect x="20" y="30" width="60" height="30" rx="4" fill="var(--surface)" stroke="var(--cyan)" />
182
+ <text x="35" y="50" fill="var(--text)" font-size="10">SFT</text>
183
+ <path d="M 85 45 Q 200 10 315 45" stroke="var(--green)" stroke-dasharray="2" marker-end="url(#arrow-green)" />
184
+ <rect x="260" y="30" width="100" height="30" rx="4" fill="var(--surface)" stroke="var(--green)" />
185
+ <text x="275" y="50" fill="var(--text)" font-size="10">Reward Model</text>
186
+ </svg>
187
+ </div>
188
+ </div>
189
+ </div>
190
+ `
191
+ },
192
+ l6: {
193
+ theory: `
194
+ <div class="list-item">
195
+ <div class="list-num">01</div>
196
+ <div>
197
+ <strong>Search Trees:</strong> Exploring reasoning paths.
198
+ <div class="visual-demo">
199
+ <svg viewBox="0 0 400 100" style="width:100%">
200
+ <circle cx="200" cy="20" r="10" fill="var(--cyan)" />
201
+ <path d="M 190 30 L 150 60" stroke="var(--orange)" />
202
+ <path d="M 210 30 L 250 60" stroke="var(--green)" />
203
+ </svg>
204
+ </div>
205
+ </div>
206
+ </div>
207
+ `
208
+ },
209
+ l7: {
210
+ theory: `
211
+ <div class="list-item">
212
+ <div class="list-num">01</div>
213
+ <div><strong>RAG Pipeline:</strong> Retreiving context from Vector DBs.</div>
214
+ </div>
215
+ <div class="list-item">
216
+ <div class="list-num">02</div>
217
+ <div><strong>ReAct:</strong> Thought -> Action -> Observation loop.</div>
218
+ </div>
219
+ `
220
+ },
221
+ l8: {
222
+ theory: `
223
+ <div class="list-item">
224
+ <div class="list-num">01</div>
225
+ <div><strong>Chatbot Arena:</strong> Elo ratings for subjective preference.</div>
226
+ </div>
227
+ <div class="list-item">
228
+ <div class="list-num">02</div>
229
+ <div><strong>LLM-as-a-Judge:</strong> Automated architectural scoring.</div>
230
+ </div>
231
+ `
232
+ },
233
+ l9: {
234
+ theory: `
235
+ <div class="list-item">
236
+ <div class="list-num">01</div>
237
+ <div><strong>ViT:</strong> Flattening images into 16x16 visual words.</div>
238
+ </div>
239
+ <div class="list-item">
240
+ <div class="list-num">02</div>
241
+ <div><strong>CLIP:</strong> Bridging vision and text embeddings.</div>
242
  </div>
243
  `
244
  }
 
245
  };
246
 
247
+ function init() {
248
+ const grid = document.getElementById('modulesGrid');
 
 
249
  modules.forEach(m => {
250
+ const card = document.createElement('div');
251
+ card.className = 'card';
252
+ card.onclick = () => showModule(m.id);
253
+ card.innerHTML = '<div class="card-icon">' + m.icon + '</div><h3>' + m.title + '</h3><p>' + m.desc + '</p>';
254
  grid.appendChild(card);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  });
256
  }
257
 
258
+ function showModule(id) {
259
+ const m = modules.find(x => x.id === id);
260
+ const content = CONTENT[id] || { theory: "Detailed content coming soon." };
261
+ document.getElementById('dashboard').style.display = 'none';
262
+ document.getElementById('moduleView').classList.add('active');
263
+ document.getElementById('moduleContent').innerHTML =
264
+ '<h2>' + m.icon + ' ' + m.title + '</h2>' +
265
+ '<div class="tabs"><button class="tab-btn active">Key Concepts</button></div>' +
266
+ '<div class="section">' + content.theory + '</div>';
267
  window.scrollTo(0,0);
268
+ if (window.MathJax) window.MathJax.typesetPromise();
269
  }
270
 
271
+ function showDashboard() {
272
+ document.getElementById('dashboard').style.display = 'block';
273
+ document.getElementById('moduleView').classList.remove('active');
 
 
274
  }
275
 
276
+ init();
277
  </script>
 
 
 
 
278
  </body>
279
  </html>