Main Leaderboard modification
Browse files- frontend/package.json +1 -1
- frontend/public/index.html +8 -8
- frontend/src/pages/LeaderboardPage/LeaderboardPage.js +4 -4
- frontend/src/pages/LeaderboardPage/components/Leaderboard/constants/defaults.js +2 -26
- frontend/src/pages/LeaderboardPage/components/Leaderboard/hooks/useDataUtils.js +31 -1
- frontend/src/pages/LeaderboardPage/components/Leaderboard/utils/columnUtils.js +16 -43
frontend/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"name": "open-
|
3 |
"version": "0.1.0",
|
4 |
"private": true,
|
5 |
"dependencies": {
|
|
|
1 |
{
|
2 |
+
"name": "open-finllm-leaderboard",
|
3 |
"version": "0.1.0",
|
4 |
"private": true,
|
5 |
"dependencies": {
|
frontend/public/index.html
CHANGED
@@ -9,22 +9,22 @@
|
|
9 |
/>
|
10 |
<meta
|
11 |
name="description"
|
12 |
-
content="Interactive leaderboard for comparing LLM performance across
|
13 |
/>
|
14 |
|
15 |
<!-- Open Graph / Facebook -->
|
16 |
<meta property="og:type" content="website" />
|
17 |
<meta
|
18 |
property="og:url"
|
19 |
-
content="https://huggingface.co/spaces/TheFinAI/
|
20 |
/>
|
21 |
<meta
|
22 |
property="og:title"
|
23 |
-
content="Open
|
24 |
/>
|
25 |
<meta
|
26 |
property="og:description"
|
27 |
-
content="Interactive leaderboard for comparing LLM performance across
|
28 |
/>
|
29 |
<meta property="og:image" content="%PUBLIC_URL%/og-image.png" />
|
30 |
|
@@ -32,15 +32,15 @@
|
|
32 |
<meta property="twitter:card" content="summary_large_image" />
|
33 |
<meta
|
34 |
property="twitter:url"
|
35 |
-
content="https://huggingface.co/spaces/TheFinAI/
|
36 |
/>
|
37 |
<meta
|
38 |
property="twitter:title"
|
39 |
-
content="Open
|
40 |
/>
|
41 |
<meta
|
42 |
property="twitter:description"
|
43 |
-
content="Interactive leaderboard for comparing LLM performance across
|
44 |
/>
|
45 |
<meta property="twitter:image" content="%PUBLIC_URL%/og-image.png" />
|
46 |
<!--
|
@@ -53,7 +53,7 @@
|
|
53 |
Learn how to configure a non-root public URL by running `npm run build`.
|
54 |
-->
|
55 |
<title>
|
56 |
-
Open
|
57 |
</title>
|
58 |
<link
|
59 |
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
|
|
|
9 |
/>
|
10 |
<meta
|
11 |
name="description"
|
12 |
+
content="Interactive leaderboard for comparing LLM performance across financial benchmarks."
|
13 |
/>
|
14 |
|
15 |
<!-- Open Graph / Facebook -->
|
16 |
<meta property="og:type" content="website" />
|
17 |
<meta
|
18 |
property="og:url"
|
19 |
+
content="https://huggingface.co/spaces/TheFinAI/open_finllm_leaderboard"
|
20 |
/>
|
21 |
<meta
|
22 |
property="og:title"
|
23 |
+
content="Open Financial LLM Leaderboard - Compare Large Language Models in Financial Domain"
|
24 |
/>
|
25 |
<meta
|
26 |
property="og:description"
|
27 |
+
content="Interactive leaderboard for comparing LLM performance across financial benchmarks."
|
28 |
/>
|
29 |
<meta property="og:image" content="%PUBLIC_URL%/og-image.png" />
|
30 |
|
|
|
32 |
<meta property="twitter:card" content="summary_large_image" />
|
33 |
<meta
|
34 |
property="twitter:url"
|
35 |
+
content="https://huggingface.co/spaces/TheFinAI/open_finllm_leaderboard"
|
36 |
/>
|
37 |
<meta
|
38 |
property="twitter:title"
|
39 |
+
content="Open Financial LLM Leaderboard - Compare Large Language Models in Financial Domain"
|
40 |
/>
|
41 |
<meta
|
42 |
property="twitter:description"
|
43 |
+
content="Interactive leaderboard for comparing LLM performance across financial benchmarks."
|
44 |
/>
|
45 |
<meta property="twitter:image" content="%PUBLIC_URL%/og-image.png" />
|
46 |
<!--
|
|
|
53 |
Learn how to configure a non-root public URL by running `npm run build`.
|
54 |
-->
|
55 |
<title>
|
56 |
+
Open Financial LLM Leaderboard - Compare Large Language Models in Financial Domain
|
57 |
</title>
|
58 |
<link
|
59 |
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
|
frontend/src/pages/LeaderboardPage/LeaderboardPage.js
CHANGED
@@ -32,12 +32,12 @@ function LeaderboardPage() {
|
|
32 |
<Logo height="80px" />
|
33 |
</Box>
|
34 |
<PageHeader
|
35 |
-
title="Open
|
36 |
subtitle={
|
37 |
<>
|
38 |
-
Benchmark for large language
|
39 |
-
<span style={{ fontWeight: 600 }}>
|
40 |
-
|
41 |
</>
|
42 |
}
|
43 |
/>
|
|
|
32 |
<Logo height="80px" />
|
33 |
</Box>
|
34 |
<PageHeader
|
35 |
+
title="Open Financial LLM Leaderboard"
|
36 |
subtitle={
|
37 |
<>
|
38 |
+
Benchmark for large language models in {" "}
|
39 |
+
<span style={{ fontWeight: 600 }}>financial</span> domain {" "}
|
40 |
+
across multiple languages
|
41 |
</>
|
42 |
}
|
43 |
/>
|
frontend/src/pages/LeaderboardPage/components/Leaderboard/constants/defaults.js
CHANGED
@@ -125,35 +125,11 @@ const COLUMNS = {
|
|
125 |
},
|
126 |
},
|
127 |
EVALUATION: {
|
128 |
-
"evaluations.
|
129 |
group: "evaluation",
|
130 |
size: COLUMN_SIZES.BENCHMARK,
|
131 |
defaultVisible: true,
|
132 |
-
label: "
|
133 |
-
},
|
134 |
-
"evaluations.qa.normalized_score": {
|
135 |
-
group: "evaluation",
|
136 |
-
size: COLUMN_SIZES.BENCHMARK,
|
137 |
-
defaultVisible: true,
|
138 |
-
label: "QA",
|
139 |
-
},
|
140 |
-
"evaluations.fns.normalized_score": {
|
141 |
-
group: "evaluation",
|
142 |
-
size: COLUMN_SIZES.BENCHMARK,
|
143 |
-
defaultVisible: true,
|
144 |
-
label: "FNS",
|
145 |
-
},
|
146 |
-
"evaluations.finnum.normalized_score": {
|
147 |
-
group: "evaluation",
|
148 |
-
size: COLUMN_SIZES.BENCHMARK,
|
149 |
-
defaultVisible: true,
|
150 |
-
label: "FinNum",
|
151 |
-
},
|
152 |
-
"evaluations.fintext.normalized_score": {
|
153 |
-
group: "evaluation",
|
154 |
-
size: COLUMN_SIZES.BENCHMARK,
|
155 |
-
defaultVisible: true,
|
156 |
-
label: "FinText",
|
157 |
},
|
158 |
},
|
159 |
MODEL_INFO: {
|
|
|
125 |
},
|
126 |
},
|
127 |
EVALUATION: {
|
128 |
+
"evaluations.greek_average": {
|
129 |
group: "evaluation",
|
130 |
size: COLUMN_SIZES.BENCHMARK,
|
131 |
defaultVisible: true,
|
132 |
+
label: "Greek Financial LLM Leaderboard",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
},
|
134 |
},
|
135 |
MODEL_INFO: {
|
frontend/src/pages/LeaderboardPage/components/Leaderboard/hooks/useDataUtils.js
CHANGED
@@ -39,7 +39,36 @@ export const useColorGenerator = (minAverage, maxAverage) => {
|
|
39 |
export const useProcessedData = (data, averageMode, visibleColumns) => {
|
40 |
return useMemo(() => {
|
41 |
let processed = data.map((item) => {
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
.filter(([key]) => {
|
44 |
if (averageMode === "all") return true;
|
45 |
return visibleColumns.includes(`evaluations.${key}.normalized_score`);
|
@@ -69,6 +98,7 @@ export const useProcessedData = (data, averageMode, visibleColumns) => {
|
|
69 |
return {
|
70 |
...item,
|
71 |
features: standardizedFeatures,
|
|
|
72 |
model: {
|
73 |
...item.model,
|
74 |
has_chat_template: Boolean(item.model.has_chat_template),
|
|
|
39 |
export const useProcessedData = (data, averageMode, visibleColumns) => {
|
40 |
return useMemo(() => {
|
41 |
let processed = data.map((item) => {
|
42 |
+
// 计算希腊语数据集的平均分数
|
43 |
+
const greekDatasets = ['multifin', 'qa', 'fns', 'finnum', 'fintext'];
|
44 |
+
const greekScores = greekDatasets
|
45 |
+
.filter(dataset => item.evaluations[dataset]?.normalized_score !== undefined)
|
46 |
+
.map(dataset => item.evaluations[dataset].normalized_score);
|
47 |
+
|
48 |
+
const greekAverage = greekScores.length > 0
|
49 |
+
? greekScores.reduce((a, b) => a + b, 0) / greekScores.length
|
50 |
+
: null;
|
51 |
+
|
52 |
+
// 添加Greek average到evaluations对象
|
53 |
+
const enhancedEvaluations = {
|
54 |
+
...item.evaluations,
|
55 |
+
greek_average: greekAverage
|
56 |
+
};
|
57 |
+
|
58 |
+
// 计算所有可见评估的平均分 (包括greek_average,但不包括具体的Greek数据集)
|
59 |
+
const includedEvaluations = {};
|
60 |
+
// 复制所有非Greek的评估数据
|
61 |
+
Object.entries(item.evaluations).forEach(([key, value]) => {
|
62 |
+
if (!greekDatasets.includes(key)) {
|
63 |
+
includedEvaluations[key] = value;
|
64 |
+
}
|
65 |
+
});
|
66 |
+
// 添加Greek平均分
|
67 |
+
if (greekAverage !== null) {
|
68 |
+
includedEvaluations.greek_average = { normalized_score: greekAverage };
|
69 |
+
}
|
70 |
+
|
71 |
+
const evaluationScores = Object.entries(includedEvaluations)
|
72 |
.filter(([key]) => {
|
73 |
if (averageMode === "all") return true;
|
74 |
return visibleColumns.includes(`evaluations.${key}.normalized_score`);
|
|
|
98 |
return {
|
99 |
...item,
|
100 |
features: standardizedFeatures,
|
101 |
+
evaluations: enhancedEvaluations, // 使用增强后的evaluations
|
102 |
model: {
|
103 |
...item.model,
|
104 |
has_chat_template: Boolean(item.model.has_chat_template),
|
frontend/src/pages/LeaderboardPage/components/Leaderboard/utils/columnUtils.js
CHANGED
@@ -751,49 +751,22 @@ export const createColumns = (
|
|
751 |
|
752 |
const evaluationColumns = [
|
753 |
{
|
754 |
-
accessorKey: "evaluations.
|
755 |
-
header: createHeaderCell("
|
756 |
cell: ({ row, getValue }) =>
|
757 |
-
createScoreCell(getValue, row, "evaluations.
|
758 |
-
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
},
|
771 |
-
{
|
772 |
-
accessorKey: "evaluations.fns.normalized_score",
|
773 |
-
header: createHeaderCell("FNS", COLUMN_TOOLTIPS.FNS),
|
774 |
-
cell: ({ row, getValue }) =>
|
775 |
-
createScoreCell(getValue, row, "evaluations.fns.normalized_score"),
|
776 |
-
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
777 |
-
"evaluations.fns.normalized_score"
|
778 |
-
],
|
779 |
-
},
|
780 |
-
{
|
781 |
-
accessorKey: "evaluations.finnum.normalized_score",
|
782 |
-
header: createHeaderCell("FinNum", COLUMN_TOOLTIPS.FinNum),
|
783 |
-
cell: ({ row, getValue }) =>
|
784 |
-
createScoreCell(getValue, row, "evaluations.finnum.normalized_score"),
|
785 |
-
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
786 |
-
"evaluations.finnum.normalized_score"
|
787 |
-
],
|
788 |
-
},
|
789 |
-
{
|
790 |
-
accessorKey: "evaluations.fintext.normalized_score",
|
791 |
-
header: createHeaderCell("FinText", COLUMN_TOOLTIPS.FinText),
|
792 |
-
cell: ({ row, getValue }) =>
|
793 |
-
createScoreCell(getValue, row, "evaluations.fintext.normalized_score"),
|
794 |
-
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
795 |
-
"evaluations.fintext.normalized_score"
|
796 |
-
],
|
797 |
},
|
798 |
];
|
799 |
|
@@ -1034,7 +1007,7 @@ export const createColumns = (
|
|
1034 |
// Utiliser directement columnVisibility
|
1035 |
const finalColumns = [
|
1036 |
...baseColumns,
|
1037 |
-
...evaluationColumns
|
1038 |
...optionalColumns
|
1039 |
.filter((col) => columnVisibility[col.accessorKey])
|
1040 |
.sort((a, b) => {
|
|
|
751 |
|
752 |
const evaluationColumns = [
|
753 |
{
|
754 |
+
accessorKey: "evaluations.greek_average",
|
755 |
+
header: createHeaderCell("Greek Leaderboard", "Average performance on Greek financial tasks"),
|
756 |
cell: ({ row, getValue }) =>
|
757 |
+
createScoreCell(getValue, row, "evaluations.greek_average"),
|
758 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["model.average_score"] || 100,
|
759 |
+
meta: {
|
760 |
+
headerStyle: {
|
761 |
+
backgroundColor: (theme) => alpha(theme.palette.info.light, 0.05),
|
762 |
+
},
|
763 |
+
cellStyle: (value) => ({
|
764 |
+
position: "relative",
|
765 |
+
overflow: "hidden",
|
766 |
+
padding: "8px 16px",
|
767 |
+
backgroundColor: (theme) => alpha(theme.palette.info.light, 0.05),
|
768 |
+
}),
|
769 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
},
|
771 |
];
|
772 |
|
|
|
1007 |
// Utiliser directement columnVisibility
|
1008 |
const finalColumns = [
|
1009 |
...baseColumns,
|
1010 |
+
...evaluationColumns,
|
1011 |
...optionalColumns
|
1012 |
.filter((col) => columnVisibility[col.accessorKey])
|
1013 |
.sort((a, b) => {
|