File size: 3,508 Bytes
4106f13
 
 
 
7c06aef
4106f13
 
 
7c06aef
 
4106f13
 
 
7c06aef
4106f13
 
b1e5b40
98c6811
4106f13
7c06aef
4106f13
 
 
 
 
 
 
 
 
7c06aef
 
4106f13
 
 
 
 
 
 
 
 
 
7c06aef
 
4106f13
 
 
 
 
 
b0aa389
4106f13
 
 
7c06aef
 
4106f13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
549360a
4106f13
 
 
 
7c06aef
 
4106f13
 
549360a
b0aa389
 
 
 
 
 
 
7c06aef
 
b0aa389
 
 
549360a
 
 
b0aa389
549360a
 
 
7c06aef
 
549360a
 
 
4106f13
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import { Column } from 'primereact/column'
import ScoreField from './ScoreField'

const scoreBodyTemplate = (field, options = {}) => {
  const { minScore = 0, maxScore = 1, machineTranslatedMetrics = [] } = options

  return rowData => {
    const score = rowData[field]
    const isMachineTranslated = machineTranslatedMetrics.includes(field)
    return ScoreField(score, minScore, maxScore, isMachineTranslated)
  }
}

const ScoreColumns = (machineTranslatedMetrics = []) => [
  <Column
    field='average'
    header='Proficiency'
    headerTooltip='Language Proficiency Score (average of the scores for each task, after min-max normalization)'
    sortable
    body={scoreBodyTemplate('average', { minScore: 0.2, maxScore: 0.5, machineTranslatedMetrics })}
    style={{ minWidth: '5rem', maxWidth: '10rem' }}
  />,
  <Column
    field='translation_from_bleu'
    header='Translation (from)'
    headerTooltip='Translation performance from a language to all other languages (spBLEU score on a sample of the FLORES+ benchmark)'
    sortable
    body={scoreBodyTemplate('translation_from_bleu', {
      minScore: 0,
      maxScore: 0.5,
      machineTranslatedMetrics
    })}
    style={{ minWidth: '5rem', maxWidth: '10rem' }}
  />,
  <Column
    field='translation_to_bleu'
    header='Translation (to)'
    headerTooltip='Translation performance from all other languages to a language (spBLEU score on a sample of the FLORES+ benchmark)'
    sortable
    body={scoreBodyTemplate('translation_to_bleu', {
      minScore: 0,
      maxScore: 0.5,
      machineTranslatedMetrics
    })}
    style={{ minWidth: '5rem', maxWidth: '10rem' }}
  />,
  <Column
    field='classification_accuracy'
    header='Classification'
    headerTooltip='Classification performance (accuracy on a sample of the SIB-200 / FLORES+ classification benchmark)'
    sortable
    body={scoreBodyTemplate('classification_accuracy', {
      minScore: 0,
      maxScore: 0.5,
      machineTranslatedMetrics
    })}
    style={{ minWidth: '5rem', maxWidth: '10rem' }}
  />,
  //   <Column
  //     field='language_modeling_chrf'
  //     header='Language Modeling'
  //     sortable
  //     body={scoreBodyTemplate('language_modeling_chrf', {
  //       minScore: 0.8,
  //       maxScore: 1
  //     })}
  //     style={{ minWidth: '5rem', maxWidth: '10rem' }}
  //   />,
  <Column
    field='mmlu_accuracy'
    header='Q&A'
    headerTooltip='Question Answering performance (accuracy on a sample of multilingual versions of the MMLU benchmark)'
    sortable
    body={scoreBodyTemplate('mmlu_accuracy', {
      minScore: 0,
      maxScore: 1,
      machineTranslatedMetrics
    })}
    style={{ minWidth: '5rem', maxWidth: '10rem' }}
  />,
  <Column
    field='arc_accuracy'
    header='Advanced Q&A'
    headerTooltip='Advanced Question Answering performance (accuracy on a sample of multilingual versions of the ARC-Easy benchmark)'
    sortable
    body={scoreBodyTemplate('arc_accuracy', {
      minScore: 0,
      maxScore: 1,
      machineTranslatedMetrics
    })}
    style={{ minWidth: '5rem', maxWidth: '10rem' }}
  />,
  <Column
    field='mgsm_accuracy'
    header='Math'
    headerTooltip='Math Problem Solving performance (accuracy on a sample of multilingual versions of the GSM8K benchmark)'
    sortable
    body={scoreBodyTemplate('mgsm_accuracy', {
      minScore: 0,
      maxScore: 1,
      machineTranslatedMetrics
    })}
    style={{ minWidth: '5rem', maxWidth: '10rem' }}
  />,
]

export default ScoreColumns