Edit text inside embeds

#12
by loubnabnl HF Staff - opened
app/src/content/embeds/ablation-study.html CHANGED
@@ -121,7 +121,7 @@
121
  const leftChart = document.createElement('div');
122
  leftChart.className = 'chart-container';
123
  leftChart.innerHTML = `
124
- <div class="chart-title">From scratch ablation</div>
125
  <div class="chart-card">
126
  <div class="chart-svg"></div>
127
  </div>
@@ -130,7 +130,7 @@
130
  const rightChart = document.createElement('div');
131
  rightChart.className = 'chart-container';
132
  rightChart.innerHTML = `
133
- <div class="chart-title">Annealing ablation (vs Main pretraining)</div>
134
  <div class="chart-card">
135
  <div class="chart-svg"></div>
136
  </div>
 
121
  const leftChart = document.createElement('div');
122
  leftChart.className = 'chart-container';
123
  leftChart.innerHTML = `
124
+ <div class="chart-title">From-scratch ablation</div>
125
  <div class="chart-card">
126
  <div class="chart-svg"></div>
127
  </div>
 
130
  const rightChart = document.createElement('div');
131
  rightChart.className = 'chart-container';
132
  rightChart.innerHTML = `
133
+ <div class="chart-title">Annealing ablation (vs main pretraining)</div>
134
  <div class="chart-card">
135
  <div class="chart-svg"></div>
136
  </div>
app/src/content/embeds/attention-mechanisms.html CHANGED
@@ -573,7 +573,7 @@
573
  .stroke('none');
574
 
575
  // CLKV text below the node (multi-line)
576
- svg.text('Compressed\nLatent KV')
577
  .font({
578
  family: 'Arial, sans-serif',
579
  size: 9,
@@ -607,7 +607,7 @@
607
  // Add single "projection" label centered between both lines
608
  const centerTextX = (clkvX + vGroupRightX) / 2 - 5; // Shifted slightly to the right
609
  const centerTextY = (vGroupTopY + kGroupBottomY) / 2;
610
- svg.text('projection')
611
  .font({
612
  family: 'Arial, sans-serif',
613
  size: 9,
@@ -659,15 +659,15 @@
659
  </div>
660
 
661
  <div class="diagrams-grid">
662
- <!-- DIAGRAM 1: Multi Head Attention -->
663
  <div class="diagram-container">
664
- <div class="diagram-title">Multi head attention</div>
665
  <div class="diagram-svg-container" id="diagram-1"></div>
666
  </div>
667
 
668
- <!-- DIAGRAM 2: Multi Query Attention -->
669
  <div class="diagram-container">
670
- <div class="diagram-title">Multi query attention</div>
671
  <div class="diagram-svg-container" id="diagram-2"></div>
672
  </div>
673
 
@@ -677,9 +677,9 @@
677
  <div class="diagram-svg-container" id="diagram-3"></div>
678
  </div>
679
 
680
- <!-- DIAGRAM 4: Multi Head Latent Attention -->
681
  <div class="diagram-container">
682
- <div class="diagram-title">Multi head latent attention</div>
683
  <div class="diagram-svg-container" id="diagram-4"></div>
684
  </div>
685
  </div>
 
573
  .stroke('none');
574
 
575
  // CLKV text below the node (multi-line)
576
+ svg.text('Compressed\nlatent KV')
577
  .font({
578
  family: 'Arial, sans-serif',
579
  size: 9,
 
607
  // Add single "projection" label centered between both lines
608
  const centerTextX = (clkvX + vGroupRightX) / 2 - 5; // Shifted slightly to the right
609
  const centerTextY = (vGroupTopY + kGroupBottomY) / 2;
610
+ svg.text('Projection')
611
  .font({
612
  family: 'Arial, sans-serif',
613
  size: 9,
 
659
  </div>
660
 
661
  <div class="diagrams-grid">
662
+ <!-- DIAGRAM 1: Multi-head Attention -->
663
  <div class="diagram-container">
664
+ <div class="diagram-title">Multi-head attention</div>
665
  <div class="diagram-svg-container" id="diagram-1"></div>
666
  </div>
667
 
668
+ <!-- DIAGRAM 2: Multi-query Attention -->
669
  <div class="diagram-container">
670
+ <div class="diagram-title">Multi-query attention</div>
671
  <div class="diagram-svg-container" id="diagram-2"></div>
672
  </div>
673
 
 
677
  <div class="diagram-svg-container" id="diagram-3"></div>
678
  </div>
679
 
680
+ <!-- DIAGRAM 4: Multi-head Latent Attention -->
681
  <div class="diagram-container">
682
+ <div class="diagram-title">Multi-head latent attention</div>
683
  <div class="diagram-svg-container" id="diagram-4"></div>
684
  </div>
685
  </div>
app/src/content/embeds/model-architecture-decision-flowchart.html CHANGED
@@ -144,9 +144,9 @@
144
  // Define the flowchart structure - Model Architecture Decision
145
  const nodes = [
146
  { id: 'A', label: 'Where will this model run?', type: 'question', x: 400, y: 100 },
147
- { id: 'B', label: 'Edge/Phones\nMemory-constrained environments', type: 'decision', x: 180, y: 320 },
148
  { id: 'C', label: 'Other\nMore memory available', type: 'decision', x: 620, y: 320 },
149
- { id: 'D', label: 'Dense (most cases)\nHybrid or other (for experienced teams)', type: 'success', x: 180, y: 540 },
150
  { id: 'E', label: 'What\'s your team\'s expertise?', type: 'question', x: 620, y: 540 },
151
  { id: 'F', label: 'First LLM training', type: 'decision', x: 380, y: 760 },
152
  { id: 'G', label: 'Experienced\nComfortable with dense', type: 'decision', x: 620, y: 760 },
 
144
  // Define the flowchart structure - Model Architecture Decision
145
  const nodes = [
146
  { id: 'A', label: 'Where will this model run?', type: 'question', x: 400, y: 100 },
147
+ { id: 'B', label: 'Edge/phones\nMemory-constrained environments', type: 'decision', x: 180, y: 320 },
148
  { id: 'C', label: 'Other\nMore memory available', type: 'decision', x: 620, y: 320 },
149
+ { id: 'D', label: 'Dense (most cases)\nHybrid (for experienced teams)', type: 'success', x: 180, y: 540 },
150
  { id: 'E', label: 'What\'s your team\'s expertise?', type: 'question', x: 620, y: 540 },
151
  { id: 'F', label: 'First LLM training', type: 'decision', x: 380, y: 760 },
152
  { id: 'G', label: 'Experienced\nComfortable with dense', type: 'decision', x: 620, y: 760 },
app/src/content/embeds/train-model-decision-flowchart.html CHANGED
@@ -149,15 +149,15 @@
149
  { id: 'B', label: 'Can existing models handle your use case?', type: 'question', x: 400, y: 240 },
150
  { id: 'C', label: 'Existing models work well just with prompting', type: 'decision', x: 200, y: 400 },
151
  { id: 'D', label: 'Prompting isn\'t enough', type: 'decision', x: 600, y: 400 },
152
- { id: 'E', label: '❌\nDon\'t train. Use existing models', type: 'success', x: 200, y: 560 },
153
- { id: 'F', label: 'Can finetuning solve your problem?', type: 'question', x: 600, y: 600 },
154
- { id: 'G', label: 'Finetuning works (post-training/continual pretraining)', type: 'decision', x: 450, y: 760 },
155
- { id: 'H', label: 'Finetuning cannot solve your problem', type: 'decision', x: 750, y: 760 },
156
  { id: 'I', label: '❌\nDon\'t train from scratch', type: 'success', x: 450, y: 920 },
157
  { id: 'J', label: 'Train a model under one of these categories', type: 'category', x: 750, y: 960 },
158
  { id: 'K', label: 'πŸ”¬\nResearch', type: 'category', x: 600, y: 1120 },
159
  { id: 'L', label: '🏭\nProduction', type: 'category', x: 750, y: 1120 },
160
- { id: 'N', label: '🌐\nStrategic Open-Source', type: 'category', x: 970, y: 1120 }
161
  ];
162
 
163
  const links = [
 
149
  { id: 'B', label: 'Can existing models handle your use case?', type: 'question', x: 400, y: 240 },
150
  { id: 'C', label: 'Existing models work well just with prompting', type: 'decision', x: 200, y: 400 },
151
  { id: 'D', label: 'Prompting isn\'t enough', type: 'decision', x: 600, y: 400 },
152
+ { id: 'E', label: '❌\nDon\'t train; use existing models', type: 'success', x: 200, y: 560 },
153
+ { id: 'F', label: 'Can fine-tuning solve your problem?', type: 'question', x: 600, y: 600 },
154
+ { id: 'G', label: 'Fine-tuning works (post-training/continual pretraining)', type: 'decision', x: 450, y: 760 },
155
+ { id: 'H', label: 'Fine-tuning cannot solve your problem', type: 'decision', x: 750, y: 760 },
156
  { id: 'I', label: '❌\nDon\'t train from scratch', type: 'success', x: 450, y: 920 },
157
  { id: 'J', label: 'Train a model under one of these categories', type: 'category', x: 750, y: 960 },
158
  { id: 'K', label: 'πŸ”¬\nResearch', type: 'category', x: 600, y: 1120 },
159
  { id: 'L', label: '🏭\nProduction', type: 'category', x: 750, y: 1120 },
160
+ { id: 'N', label: '🌐\nStrategic Open Source', type: 'category', x: 970, y: 1120 }
161
  ];
162
 
163
  const links = [
app/src/content/embeds/training-compass.html CHANGED
@@ -176,7 +176,7 @@
176
  <div class="compass-stage">
177
  <div class="stage-header">How to train?</div>
178
  <div class="stage-items">
179
- <div class="stage-item">Setup infra</div>
180
  <div class="stage-item">Training framework</div>
181
  <div class="stage-item">Handling loss spikes</div>
182
  <div class="stage-item">Midtraining</div>
 
176
  <div class="compass-stage">
177
  <div class="stage-header">How to train?</div>
178
  <div class="stage-items">
179
+ <div class="stage-item">Infrastructure setup</div>
180
  <div class="stage-item">Training framework</div>
181
  <div class="stage-item">Handling loss spikes</div>
182
  <div class="stage-item">Midtraining</div>