AashishAIHub commited on
Commit
9fc5a25
·
1 Parent(s): 8c8be69

feat: achieved 100% diagrammatic coverage for all Key Concepts across all 9 CME 295 lectures

Browse files
Files changed (1) hide show
  1. CME295-Transformers/index.html +90 -6
CME295-Transformers/index.html CHANGED
@@ -725,9 +725,11 @@
725
  <div class="list-item">
726
  <div class="list-num">01</div>
727
  <div><strong>Multi-Head Attention (MHA):</strong> By projecting Q, K, and V into multiple lower-dimensional "heads," the model can attend to information from different representation subspaces simultaneously. One head might focus on syntax, while another focuses on sentiment.</div>
 
 
728
  </div>
729
  <div class="list-item">
730
- <div class="list-num">02</div>
731
  <div>
732
  <strong>KV Cache & GQA:</strong> Autoregressive generation requires re-calculating attention. Grouped-Query Attention (GQA) reduces memory bandwidth.
733
 
@@ -780,7 +782,21 @@
780
  </div>
781
  <div class="list-item">
782
  <div class="list-num">04</div>
783
- <div><strong>Normalization (LayerNorm vs RMSNorm):</strong> Llama models utilize RMSNorm (Root Mean Square Layer Normalization) which is computationally cheaper than standard LayerNorm as it avoids calculating the mean and variance, focusing only on the scaling factor.</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
784
  </div>
785
  `
786
  },
@@ -1132,7 +1148,25 @@
1132
  <h3>Agent & Integration Paradigms</h3>
1133
  <div class="list-item">
1134
  <div class="list-num">01</div>
1135
- <div><strong>RAG (Retrieval-Augmented Generation):</strong> Connecting LLMs to private data. Documents are chunked, embedded via models into vectors, and stored in a Vector DB (like Pinecone). When a user queries, semantic search fetches the most relevant text and injects it into the LLM prompt.</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1136
  </div>
1137
  <div class="list-item">
1138
  <div class="list-num">02</div>
@@ -1140,7 +1174,24 @@
1140
  </div>
1141
  <div class="list-item">
1142
  <div class="list-num">03</div>
1143
- <div><strong>The ReAct Pattern:</strong> A looping prompt structure. The LLM produces a <em>Thought</em> (analysis of goal) → outputs an <em>Action</em> (tool call) → receives an <em>Observation</em> (system result) → repeats until the goal is concluded.</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1144
  </div>
1145
  `
1146
  },
@@ -1152,7 +1203,22 @@
1152
  <h3>Benchmarks & Human Calibration</h3>
1153
  <div class="list-item">
1154
  <div class="list-num">01</div>
1155
- <div><strong>The Benchmark Saturation:</strong> Models are getting so good at standard tests (MMLU, GSM8K) that researchers are moving toward "live" leaderboards like Chatbot Arena (LMSYS), where models are ranked via Elo systems based on blind human voting on real-world prompts.</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1156
  </div>
1157
  <div class="list-item">
1158
  <div class="list-num">02</div>
@@ -1204,7 +1270,25 @@
1204
  </div>
1205
  <div class="list-item">
1206
  <div class="list-num">02</div>
1207
- <div><strong>Contrastive Learning (CLIP):</strong> Training an image encoder and text encoder to output similar vectors for the same concept (e.g., a photo of a cat and the word "cat"). This creates the bridge between visual and verbal latent spaces.</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1208
  </div>
1209
  <div class="list-item">
1210
  <div class="list-num">03</div>
 
725
  <div class="list-item">
726
  <div class="list-num">01</div>
727
  <div><strong>Multi-Head Attention (MHA):</strong> By projecting Q, K, and V into multiple lower-dimensional "heads," the model can attend to information from different representation subspaces simultaneously. One head might focus on syntax, while another focuses on sentiment.</div>
728
+ </div>
729
+ <div><strong>Multi-Head Attention (MHA):</strong> By projecting Q, K, and V into multiple lower-dimensional "heads," the model can attend to information from different representation subspaces simultaneously. One head might focus on syntax, while another focuses on sentiment.</div>
730
  </div>
731
  <div class="list-item">
732
+ <div class="list-num">03</div>
733
  <div>
734
  <strong>KV Cache & GQA:</strong> Autoregressive generation requires re-calculating attention. Grouped-Query Attention (GQA) reduces memory bandwidth.
735
 
 
782
  </div>
783
  <div class="list-item">
784
  <div class="list-num">04</div>
785
+ <div>
786
+ <strong>Normalization (RMSNorm):</strong> Faster weight stabilization.
787
+
788
+ <div class="visual-demo" style="margin-top: 15px; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 8px; border: 1px solid var(--cyan);">
789
+ <h4 style="color: var(--cyan); margin-bottom: 10px; font-size: 0.85em;">RMSNorm vs LayerNorm</h4>
790
+ <svg viewBox="0 0 400 100" style="width: 100%; height: auto;">
791
+ <rect x="50" y="30" width="100" height="40" fill="var(--surface)" stroke="var(--text-dim)" />
792
+ <text x="60" y="55" fill="var(--text-dim)" font-size="10">Mean + Var</text>
793
+ <path d="M 160 50 L 200 50" stroke="var(--text-dim)" marker-end="url(#arrow-dim)" />
794
+ <rect x="210" y="30" width="100" height="40" fill="rgba(0, 212, 255, 0.1)" stroke="var(--cyan)" />
795
+ <text x="220" y="55" fill="var(--cyan)" font-size="10">RMS Scaling Only</text>
796
+ </svg>
797
+ <p style="font-size: 0.75em; color: var(--text-dim);">RMSNorm removes the mean-centering step, making it computationally faster for high-throughput models.</p>
798
+ </div>
799
+ </div>
800
  </div>
801
  `
802
  },
 
1148
  <h3>Agent & Integration Paradigms</h3>
1149
  <div class="list-item">
1150
  <div class="list-num">01</div>
1151
+ <div>
1152
+ <strong>RAG (Retrieval-Augmented Generation):</strong> Connecting LLMs to private data via Vector DBs.
1153
+
1154
+ <div class="visual-demo" style="margin-top: 15px; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 8px; border: 1px solid var(--cyan);">
1155
+ <h4 style="color: var(--cyan); margin-bottom: 10px; font-size: 0.85em;">RAG Pipeline</h4>
1156
+ <svg viewBox="0 0 400 80" style="width: 100%; height: auto;">
1157
+ <rect x="20" y="25" width="60" height="30" fill="var(--surface)" stroke="var(--cyan)" />
1158
+ <text x="35" y="45" fill="var(--cyan)" font-size="10">Query</text>
1159
+ <path d="M 80 40 L 120 40" stroke="var(--text-dim)" marker-end="url(#arrow-dim)" />
1160
+
1161
+ <rect x="120" y="15" width="80" height="50" rx="2" fill="var(--surface)" stroke="var(--orange)" />
1162
+ <text x="135" y="45" fill="var(--orange)" font-size="10">Vector DB</text>
1163
+ <path d="M 200 40 L 250 40" stroke="var(--text-dim)" marker-end="url(#arrow-dim)" />
1164
+
1165
+ <rect x="250" y="15" width="100" height="50" rx="4" fill="var(--surface)" stroke="var(--green)" />
1166
+ <text x="260" y="45" fill="var(--green)" font-size="10">Augmented Prompt</text>
1167
+ </svg>
1168
+ </div>
1169
+ </div>
1170
  </div>
1171
  <div class="list-item">
1172
  <div class="list-num">02</div>
 
1174
  </div>
1175
  <div class="list-item">
1176
  <div class="list-num">03</div>
1177
+ <div>
1178
+ <strong>The ReAct Pattern:</strong> The Thought → Action → Observation cycle.
1179
+
1180
+ <div class="visual-demo" style="margin-top: 15px; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 8px; border: 1px solid var(--yellow);">
1181
+ <h4 style="color: var(--yellow); margin-bottom: 10px; font-size: 0.85em;">Agentic ReAct Loop</h4>
1182
+ <svg viewBox="0 0 400 120" style="width: 100%; height: auto;">
1183
+ <!-- Circle of nodes -->
1184
+ <circle cx="200" cy="30" r="15" fill="var(--cyan)" /> <text x="220" y="35" fill="var(--text)" font-size="10">Thought</text>
1185
+ <circle cx="300" cy="80" r="15" fill="var(--orange)" /> <text x="320" y="85" fill="var(--text)" font-size="10">Action</text>
1186
+ <circle cx="100" cy="80" r="15" fill="var(--green)" /> <text x="40" y="85" fill="var(--text)" font-size="10">Observation</text>
1187
+
1188
+ <!-- Connection arrows -->
1189
+ <path d="M 215 35 Q 260 45 290 65" fill="none" stroke="var(--text-dim)" marker-end="url(#arrow-dim)" />
1190
+ <path d="M 285 85 Q 200 100 115 85" fill="none" stroke="var(--text-dim)" marker-end="url(#arrow-dim)" />
1191
+ <path d="M 110 65 Q 140 45 185 35" fill="none" stroke="var(--text-dim)" marker-end="url(#arrow-dim)" />
1192
+ </svg>
1193
+ </div>
1194
+ </div>
1195
  </div>
1196
  `
1197
  },
 
1203
  <h3>Benchmarks & Human Calibration</h3>
1204
  <div class="list-item">
1205
  <div class="list-num">01</div>
1206
+ <div>
1207
+ <strong>Chatbot Arena & Elo System:</strong> Crowdsourced human ranking.
1208
+
1209
+ <div class="visual-demo" style="margin-top: 15px; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 8px; border: 1px solid var(--cyan);">
1210
+ <h4 style="color: var(--cyan); margin-bottom: 10px; font-size: 0.85em;">LMSYS Arena Battle</h4>
1211
+ <svg viewBox="0 0 400 100" style="width: 100%; height: auto;">
1212
+ <rect x="40" y="30" width="100" height="50" rx="4" fill="var(--surface)" stroke="var(--cyan)" />
1213
+ <text x="60" y="60" fill="var(--text)" font-size="10">Model A</text>
1214
+ <text x="180" y="60" fill="var(--orange)" font-size="12" font-weight="bold">VS</text>
1215
+ <rect x="260" y="30" width="100" height="50" rx="4" fill="var(--surface)" stroke="var(--green)" />
1216
+ <text x="280" y="60" fill="var(--text)" font-size="10">Model B</text>
1217
+ <path d="M 200 70 L 200 90" stroke="var(--text-dim)" marker-end="url(#arrow-dim)" />
1218
+ <text x="165" y="105" fill="var(--text-dim)" font-size="9">Crowd Voting</text>
1219
+ </svg>
1220
+ </div>
1221
+ </div>
1222
  </div>
1223
  <div class="list-item">
1224
  <div class="list-num">02</div>
 
1270
  </div>
1271
  <div class="list-item">
1272
  <div class="list-num">02</div>
1273
+ <div>
1274
+ <strong>Contrastive Learning (CLIP):</strong> Creating the bridge between eyes and mind.
1275
+
1276
+ <div class="visual-demo" style="margin-top: 15px; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 8px; border: 1px solid var(--orange);">
1277
+ <h4 style="color: var(--orange); margin-bottom: 10px; font-size: 0.85em;">Dual-Encoder Alignment</h4>
1278
+ <svg viewBox="0 0 400 120" style="width: 100%; height: auto;">
1279
+ <rect x="40" y="20" width="60" height="30" fill="var(--surface)" stroke="var(--cyan)" />
1280
+ <text x="50" y="40" fill="var(--cyan)" font-size="10">Text Enc</text>
1281
+ <rect x="40" y="70" width="60" height="30" fill="var(--surface)" stroke="var(--orange)" />
1282
+ <text x="50" y="90" fill="var(--orange)" font-size="10">Img Enc</text>
1283
+
1284
+ <path d="M 110 35 L 200 60" stroke="var(--cyan)" />
1285
+ <path d="M 110 85 L 200 60" stroke="var(--orange)" />
1286
+ <circle cx="210" cy="60" r="15" fill="var(--green)" />
1287
+ <text x="230" y="65" fill="var(--green)" font-size="10">Joint Space</text>
1288
+ </svg>
1289
+ <p style="font-size: 0.75em; color: var(--text-dim);">By training on millions of image-caption pairs, CLIP learns a unified understanding across modalities.</p>
1290
+ </div>
1291
+ </div>
1292
  </div>
1293
  <div class="list-item">
1294
  <div class="list-num">03</div>