SaiMupparaju commited on
Commit
67eac0a
·
1 Parent(s): c6e1c92

Add clearer explanations of visualizations for non-technical users

Browse files
Files changed (1) hide show
  1. templates/index.html +13 -2
templates/index.html CHANGED
@@ -113,12 +113,23 @@
113
  <div class="col-md-12">
114
  <div class="visualization-container">
115
  <h3>Layer Contributions to Log Probability</h3>
116
- <p>This chart shows how each layer in GPT-2 contributes to the log probability of the token "{{ prediction.token }}" (as % of total contribution).</p>
 
 
 
 
 
117
 
118
  <div id="layer-chart"></div>
119
 
120
  <h3>Attention Head Contributions</h3>
121
- <p>This visualization shows how each attention head in GPT-2 contributes to the prediction of the token "{{ prediction.token }}" (as % of total contribution).</p>
 
 
 
 
 
 
122
 
123
  <div class="legend">
124
  <div class="legend-item">
 
113
  <div class="col-md-12">
114
  <div class="visualization-container">
115
  <h3>Layer Contributions to Log Probability</h3>
116
+ <p>This chart shows how each layer in GPT-2 influences the prediction of "{{ prediction.token }}" as your next word. Each bar represents one of GPT-2's 12 layers:</p>
117
+ <ul>
118
+ <li><strong>Green bars (positive)</strong>: These layers push toward predicting this word</li>
119
+ <li><strong>Purple bars (negative)</strong>: These layers push against predicting this word</li>
120
+ <li><strong>Taller bars</strong> have stronger influence than shorter bars</li>
121
+ </ul>
122
 
123
  <div id="layer-chart"></div>
124
 
125
  <h3>Attention Head Contributions</h3>
126
+ <p>This heatmap shows how each of GPT-2's 144 individual attention mechanisms (12 heads in each of 12 layers) influences the prediction:</p>
127
+ <ul>
128
+ <li><strong>Red squares</strong>: These heads strongly support predicting this word</li>
129
+ <li><strong>Blue squares</strong>: These heads work against predicting this word</li>
130
+ <li><strong>White/neutral squares</strong>: These heads have little influence on this prediction</li>
131
+ </ul>
132
+ <p><em>Hover over any square to see its exact contribution. Research has shown certain heads specialize in specific tasks like tracking names or completing patterns.</em></p>
133
 
134
  <div class="legend">
135
  <div class="legend-item">