joelniklaus HF Staff commited on
Commit
e21a391
·
1 Parent(s): 58221a2

fixed legends for plots

Browse files
app/presentation/se2026/charts/cost-efficiency.html CHANGED
@@ -108,8 +108,11 @@
108
  'distill': 'Distill', 'diverse_qa_pairs': 'Diverse QA',
109
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
110
  'wikipedia_style_rephrasing': 'Wikipedia Style',
111
- 'guided_rewrite_improved': 'Guided Rewrite+', 'guided_rewrite_original': 'Guided Rewrite'
 
112
  };
 
 
113
  const CAT_MAP = { 'format': 'Format', 'nemotron': 'Nemotron', 'rewire': 'REWIRE' };
114
  const getFamily = (m) => {
115
  const ml = m.toLowerCase();
@@ -160,7 +163,7 @@
160
  return {
161
  run: d.run,
162
  cat: CAT_MAP[cat] || cat,
163
- prompt: PROMPT_LABELS[promptKey] || promptKey,
164
  model: d.model.split('/').pop(),
165
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
166
  family: getFamily(d.model),
 
108
  'distill': 'Distill', 'diverse_qa_pairs': 'Diverse QA',
109
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
110
  'wikipedia_style_rephrasing': 'Wikipedia Style',
111
+ 'guided_rewrite_improved': 'Guided Rewrite+', 'guided_rewrite_original': 'Guided Rewrite',
112
+ 'explanation': 'Explanation', 'narrative': 'Narrative'
113
  };
114
+ const resolvePromptLabel = (key) =>
115
+ PROMPT_LABELS[key] || PROMPT_LABELS[Object.keys(PROMPT_LABELS).find(k => key.startsWith(k + '-'))] || key;
116
  const CAT_MAP = { 'format': 'Format', 'nemotron': 'Nemotron', 'rewire': 'REWIRE' };
117
  const getFamily = (m) => {
118
  const ml = m.toLowerCase();
 
163
  return {
164
  run: d.run,
165
  cat: CAT_MAP[cat] || cat,
166
+ prompt: resolvePromptLabel(promptKey),
167
  model: d.model.split('/').pop(),
168
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
169
  family: getFamily(d.model),
app/src/content/embeds/compression-performance.html CHANGED
@@ -98,8 +98,12 @@
98
  'distill': 'Distill', 'diverse_qa_pairs': 'Diverse QA',
99
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
100
  'wikipedia_style_rephrasing': 'Wikipedia Style',
101
- 'guided_rewrite_improved': 'Guided Rewrite+', 'guided_rewrite_original': 'Guided Rewrite'
 
102
  };
 
 
 
103
 
104
  const getFamily = (m) => {
105
  const ml = m.toLowerCase();
@@ -112,11 +116,14 @@
112
  return 'Other';
113
  };
114
 
115
- // Color by prompt type
116
- const allPromptKeys = [...new Set(rawData.map(d => d.prompt.split('/')[1].replace('.md', '')))].sort();
 
 
 
117
  const promptColors = {};
118
- const cat = window.ColorPalettes ? window.ColorPalettes.getColors('categorical', allPromptKeys.length) : d3.schemeTableau10.concat(d3.schemePastel1);
119
- allPromptKeys.forEach((k, i) => { promptColors[PROMPT_LABELS[k] || k] = cat[i % cat.length]; });
120
 
121
  const METRIC_NAMES = {
122
  'agg_score_macro': 'Aggregate Score (Macro)',
@@ -148,7 +155,7 @@
148
  const promptKey = promptFile.replace('.md', '');
149
  return {
150
  run: d.run,
151
- prompt: PROMPT_LABELS[promptKey] || promptKey,
152
  model: d.model.split('/').pop(),
153
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
154
  family: getFamily(d.model),
 
98
  'distill': 'Distill', 'diverse_qa_pairs': 'Diverse QA',
99
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
100
  'wikipedia_style_rephrasing': 'Wikipedia Style',
101
+ 'guided_rewrite_improved': 'Guided Rewrite+', 'guided_rewrite_original': 'Guided Rewrite',
102
+ 'explanation': 'Explanation', 'narrative': 'Narrative'
103
  };
104
+ // Model-specific prompt variants like "explanation-falcon3-1b-hq" -> base "explanation"
105
+ const resolvePromptLabel = (key) =>
106
+ PROMPT_LABELS[key] || PROMPT_LABELS[Object.keys(PROMPT_LABELS).find(k => key.startsWith(k + '-'))] || key;
107
 
108
  const getFamily = (m) => {
109
  const ml = m.toLowerCase();
 
116
  return 'Other';
117
  };
118
 
119
+ // Color by prompt type (using display labels so variants share colors)
120
+ const allPromptLabels = [...new Set(rawData.map(d => {
121
+ const key = d.prompt.split('/')[1].replace('.md', '');
122
+ return resolvePromptLabel(key);
123
+ }))].sort();
124
  const promptColors = {};
125
+ const cat = window.ColorPalettes ? window.ColorPalettes.getColors('categorical', allPromptLabels.length) : d3.schemeTableau10.concat(d3.schemePastel1);
126
+ allPromptLabels.forEach((label, i) => { promptColors[label] = cat[i % cat.length]; });
127
 
128
  const METRIC_NAMES = {
129
  'agg_score_macro': 'Aggregate Score (Macro)',
 
155
  const promptKey = promptFile.replace('.md', '');
156
  return {
157
  run: d.run,
158
+ prompt: resolvePromptLabel(promptKey),
159
  model: d.model.split('/').pop(),
160
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
161
  family: getFamily(d.model),
app/src/content/embeds/cost-efficiency.html CHANGED
@@ -103,8 +103,11 @@
103
  'distill': 'Distill', 'diverse_qa_pairs': 'Diverse QA',
104
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
105
  'wikipedia_style_rephrasing': 'Wikipedia Style',
106
- 'guided_rewrite_improved': 'Guided Rewrite+', 'guided_rewrite_original': 'Guided Rewrite'
 
107
  };
 
 
108
  const CAT_MAP = { 'format': 'Format', 'nemotron': 'Nemotron', 'rewire': 'REWIRE' };
109
  const getFamily = (m) => {
110
  const ml = m.toLowerCase();
@@ -156,7 +159,7 @@
156
  return {
157
  run: d.run,
158
  cat: CAT_MAP[cat] || cat,
159
- prompt: PROMPT_LABELS[promptKey] || promptKey,
160
  model: d.model.split('/').pop(),
161
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
162
  family: getFamily(d.model),
 
103
  'distill': 'Distill', 'diverse_qa_pairs': 'Diverse QA',
104
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
105
  'wikipedia_style_rephrasing': 'Wikipedia Style',
106
+ 'guided_rewrite_improved': 'Guided Rewrite+', 'guided_rewrite_original': 'Guided Rewrite',
107
+ 'explanation': 'Explanation', 'narrative': 'Narrative'
108
  };
109
+ const resolvePromptLabel = (key) =>
110
+ PROMPT_LABELS[key] || PROMPT_LABELS[Object.keys(PROMPT_LABELS).find(k => key.startsWith(k + '-'))] || key;
111
  const CAT_MAP = { 'format': 'Format', 'nemotron': 'Nemotron', 'rewire': 'REWIRE' };
112
  const getFamily = (m) => {
113
  const ml = m.toLowerCase();
 
159
  return {
160
  run: d.run,
161
  cat: CAT_MAP[cat] || cat,
162
+ prompt: resolvePromptLabel(promptKey),
163
  model: d.model.split('/').pop(),
164
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
165
  family: getFamily(d.model),
app/src/content/embeds/score-shift.html CHANGED
@@ -98,8 +98,11 @@
98
  'distill': 'Distill', 'diverse_qa_pairs': 'Diverse QA',
99
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
100
  'wikipedia_style_rephrasing': 'Wikipedia Style',
101
- 'guided_rewrite_improved': 'Guided Rewrite+', 'guided_rewrite_original': 'Guided Rewrite'
 
102
  };
 
 
103
 
104
  const getFamily = (m) => {
105
  const ml = m.toLowerCase();
@@ -112,10 +115,13 @@
112
  return 'Other';
113
  };
114
 
115
- const allPromptKeys = [...new Set(rawData.map(d => d.prompt.split('/')[1].replace('.md', '')))].sort();
 
 
 
116
  const promptColors = {};
117
- const cat = window.ColorPalettes ? window.ColorPalettes.getColors('categorical', allPromptKeys.length) : d3.schemeTableau10.concat(d3.schemePastel1);
118
- allPromptKeys.forEach((k, i) => { promptColors[PROMPT_LABELS[k] || k] = cat[i % cat.length]; });
119
 
120
  const SCORE_MODES = [
121
  { key: 'dclm', label: 'DCLM Score', inputKey: 'input_dclm_score', outputKey: 'output_dclm_score' },
@@ -137,7 +143,7 @@
137
  const promptKey = promptFile.replace('.md', '');
138
  return {
139
  run: d.run,
140
- prompt: PROMPT_LABELS[promptKey] || promptKey,
141
  model: d.model.split('/').pop(),
142
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
143
  family: getFamily(d.model),
 
98
  'distill': 'Distill', 'diverse_qa_pairs': 'Diverse QA',
99
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
100
  'wikipedia_style_rephrasing': 'Wikipedia Style',
101
+ 'guided_rewrite_improved': 'Guided Rewrite+', 'guided_rewrite_original': 'Guided Rewrite',
102
+ 'explanation': 'Explanation', 'narrative': 'Narrative'
103
  };
104
+ const resolvePromptLabel = (key) =>
105
+ PROMPT_LABELS[key] || PROMPT_LABELS[Object.keys(PROMPT_LABELS).find(k => key.startsWith(k + '-'))] || key;
106
 
107
  const getFamily = (m) => {
108
  const ml = m.toLowerCase();
 
115
  return 'Other';
116
  };
117
 
118
+ const allPromptLabels = [...new Set(rawData.map(d => {
119
+ const key = d.prompt.split('/')[1].replace('.md', '');
120
+ return resolvePromptLabel(key);
121
+ }))].sort();
122
  const promptColors = {};
123
+ const cat = window.ColorPalettes ? window.ColorPalettes.getColors('categorical', allPromptLabels.length) : d3.schemeTableau10.concat(d3.schemePastel1);
124
+ allPromptLabels.forEach((label, i) => { promptColors[label] = cat[i % cat.length]; });
125
 
126
  const SCORE_MODES = [
127
  { key: 'dclm', label: 'DCLM Score', inputKey: 'input_dclm_score', outputKey: 'output_dclm_score' },
 
143
  const promptKey = promptFile.replace('.md', '');
144
  return {
145
  run: d.run,
146
+ prompt: resolvePromptLabel(promptKey),
147
  model: d.model.split('/').pop(),
148
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
149
  family: getFamily(d.model),
app/src/content/embeds/verbosity.html CHANGED
@@ -63,8 +63,11 @@
63
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
64
  'wikipedia_style_rephrasing': 'Wikipedia Style',
65
  'guided_rewrite_improved': 'Guided Rewrite+',
66
- 'guided_rewrite_original': 'Guided Rewrite'
 
67
  };
 
 
68
  const CAT_MAP = { 'format': 'Format', 'nemotron': 'Nemotron', 'rewire': 'REWIRE' };
69
 
70
  const getFamily = (m) => {
@@ -84,7 +87,7 @@
84
  return {
85
  idx: i,
86
  cat: CAT_MAP[cat] || cat,
87
- prompt: PROMPT_LABELS[promptKey] || promptKey,
88
  model: d.model.split('/').pop(),
89
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
90
  family: getFamily(d.model),
 
63
  'extract_knowledge': 'Extract Knowledge', 'knowledge_list': 'Knowledge List',
64
  'wikipedia_style_rephrasing': 'Wikipedia Style',
65
  'guided_rewrite_improved': 'Guided Rewrite+',
66
+ 'guided_rewrite_original': 'Guided Rewrite',
67
+ 'explanation': 'Explanation', 'narrative': 'Narrative'
68
  };
69
+ const resolvePromptLabel = (key) =>
70
+ PROMPT_LABELS[key] || PROMPT_LABELS[Object.keys(PROMPT_LABELS).find(k => key.startsWith(k + '-'))] || key;
71
  const CAT_MAP = { 'format': 'Format', 'nemotron': 'Nemotron', 'rewire': 'REWIRE' };
72
 
73
  const getFamily = (m) => {
 
87
  return {
88
  idx: i,
89
  cat: CAT_MAP[cat] || cat,
90
+ prompt: resolvePromptLabel(promptKey),
91
  model: d.model.split('/').pop(),
92
  source: SOURCE_MAP[d.source_dataset] || d.source_dataset,
93
  family: getFamily(d.model),