Spaces:
Running
Running
Update index.html
Browse files- index.html +51 -31
index.html
CHANGED
|
@@ -771,7 +771,7 @@
|
|
| 771 |
];
|
| 772 |
|
| 773 |
const BENCHMARKS = [
|
| 774 |
-
{ key: '
|
| 775 |
{ key: 'arc_easy', label: 'ARC-Easy' },
|
| 776 |
{ key: 'arc_challenge', label: 'ARC-Challenge' },
|
| 777 |
{ key: 'hellaswag', label: 'HellaSwag' },
|
|
@@ -779,7 +779,7 @@
|
|
| 779 |
];
|
| 780 |
|
| 781 |
const BENCHMARK_NAMES = {
|
| 782 |
-
|
| 783 |
arc_easy: 'ARC-Easy',
|
| 784 |
arc_challenge: 'ARC-Challenge',
|
| 785 |
hellaswag: 'HellaSwag',
|
|
@@ -787,7 +787,7 @@
|
|
| 787 |
};
|
| 788 |
|
| 789 |
const MIN_PLOT_PARAMS = 500000;
|
| 790 |
-
let activeBenchmark = '
|
| 791 |
let activeSearch = '';
|
| 792 |
let activeOrg = 'all';
|
| 793 |
let activeOrgSearch = '';
|
|
@@ -796,6 +796,8 @@
|
|
| 796 |
let lineEmphasis = false;
|
| 797 |
let activeTheme = 'light';
|
| 798 |
|
|
|
|
|
|
|
| 799 |
const fmtParams = (n) => {
|
| 800 |
if (n >= 1e9) return `${(n / 1e9).toFixed(2)}B`;
|
| 801 |
if (n >= 1e6) return `${(n / 1e6).toFixed(2)}M`;
|
|
@@ -805,6 +807,17 @@
|
|
| 805 |
|
| 806 |
const toPct = (v) => v * 100;
|
| 807 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 808 |
function linearRegression(points) {
|
| 809 |
const n = points.length;
|
| 810 |
let sumX = 0, sumY = 0, sumXY = 0, sumXX = 0;
|
|
@@ -846,13 +859,14 @@
|
|
| 846 |
}
|
| 847 |
|
| 848 |
function getEligibleModels() {
|
| 849 |
-
return MODELS.filter(m =>
|
| 850 |
-
|
| 851 |
-
m.params
|
| 852 |
-
|
| 853 |
-
|
| 854 |
-
|
| 855 |
-
|
|
|
|
| 856 |
}
|
| 857 |
|
| 858 |
function getVisibleModels() {
|
|
@@ -954,28 +968,34 @@
|
|
| 954 |
const fitModels = getEligibleModels();
|
| 955 |
const visibleModels = getVisibleModels();
|
| 956 |
|
| 957 |
-
const fitData = fitModels.map(m =>
|
| 958 |
-
|
| 959 |
-
|
| 960 |
-
|
| 961 |
-
|
| 962 |
-
|
| 963 |
-
|
| 964 |
-
|
| 965 |
-
|
| 966 |
-
|
| 967 |
-
|
| 968 |
-
|
| 969 |
-
|
| 970 |
-
|
| 971 |
-
score
|
| 972 |
-
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 976 |
|
| 977 |
const chartTitleMap = {
|
| 978 |
-
|
| 979 |
arc_easy: 'ARC-Easy vs log parameters',
|
| 980 |
arc_challenge: 'ARC-Challenge vs log parameters',
|
| 981 |
hellaswag: 'HellaSwag vs log parameters',
|
|
@@ -1220,4 +1240,4 @@
|
|
| 1220 |
render();
|
| 1221 |
</script>
|
| 1222 |
</body>
|
| 1223 |
-
</html>
|
|
|
|
| 771 |
];
|
| 772 |
|
| 773 |
const BENCHMARKS = [
|
| 774 |
+
{ key: 'avg', label: 'Avg' },
|
| 775 |
{ key: 'arc_easy', label: 'ARC-Easy' },
|
| 776 |
{ key: 'arc_challenge', label: 'ARC-Challenge' },
|
| 777 |
{ key: 'hellaswag', label: 'HellaSwag' },
|
|
|
|
| 779 |
];
|
| 780 |
|
| 781 |
const BENCHMARK_NAMES = {
|
| 782 |
+
avg: 'Average',
|
| 783 |
arc_easy: 'ARC-Easy',
|
| 784 |
arc_challenge: 'ARC-Challenge',
|
| 785 |
hellaswag: 'HellaSwag',
|
|
|
|
| 787 |
};
|
| 788 |
|
| 789 |
const MIN_PLOT_PARAMS = 500000;
|
| 790 |
+
let activeBenchmark = 'avg';
|
| 791 |
let activeSearch = '';
|
| 792 |
let activeOrg = 'all';
|
| 793 |
let activeOrgSearch = '';
|
|
|
|
| 796 |
let lineEmphasis = false;
|
| 797 |
let activeTheme = 'light';
|
| 798 |
|
| 799 |
+
const META_KEYS = new Set(['name', 'org', 'params', 'url']);
|
| 800 |
+
|
| 801 |
const fmtParams = (n) => {
|
| 802 |
if (n >= 1e9) return `${(n / 1e9).toFixed(2)}B`;
|
| 803 |
if (n >= 1e6) return `${(n / 1e6).toFixed(2)}M`;
|
|
|
|
| 807 |
|
| 808 |
const toPct = (v) => v * 100;
|
| 809 |
|
| 810 |
+
function getMetricValue(model, key) {
|
| 811 |
+
if (key === 'avg') {
|
| 812 |
+
const values = Object.entries(model)
|
| 813 |
+
.filter(([k, v]) => typeof v === 'number' && Number.isFinite(v) && !META_KEYS.has(k) && !k.startsWith('avg'))
|
| 814 |
+
.map(([, v]) => v);
|
| 815 |
+
if (!values.length) return null;
|
| 816 |
+
return values.reduce((a, b) => a + b, 0) / values.length;
|
| 817 |
+
}
|
| 818 |
+
return model[key];
|
| 819 |
+
}
|
| 820 |
+
|
| 821 |
function linearRegression(points) {
|
| 822 |
const n = points.length;
|
| 823 |
let sumX = 0, sumY = 0, sumXY = 0, sumXX = 0;
|
|
|
|
| 859 |
}
|
| 860 |
|
| 861 |
function getEligibleModels() {
|
| 862 |
+
return MODELS.filter(m => {
|
| 863 |
+
const score = getMetricValue(m, activeBenchmark);
|
| 864 |
+
return Number.isFinite(m.params) &&
|
| 865 |
+
m.params >= MIN_PLOT_PARAMS &&
|
| 866 |
+
score !== null &&
|
| 867 |
+
score !== undefined &&
|
| 868 |
+
Number.isFinite(score);
|
| 869 |
+
});
|
| 870 |
}
|
| 871 |
|
| 872 |
function getVisibleModels() {
|
|
|
|
| 968 |
const fitModels = getEligibleModels();
|
| 969 |
const visibleModels = getVisibleModels();
|
| 970 |
|
| 971 |
+
const fitData = fitModels.map(m => {
|
| 972 |
+
const score = getMetricValue(m, activeBenchmark);
|
| 973 |
+
return {
|
| 974 |
+
name: m.name,
|
| 975 |
+
org: m.org,
|
| 976 |
+
params: m.params,
|
| 977 |
+
score: toPct(score),
|
| 978 |
+
url: m.url,
|
| 979 |
+
x: Math.log10(m.params),
|
| 980 |
+
y: toPct(score)
|
| 981 |
+
};
|
| 982 |
+
});
|
| 983 |
+
|
| 984 |
+
const data = visibleModels.map(m => {
|
| 985 |
+
const score = getMetricValue(m, activeBenchmark);
|
| 986 |
+
return {
|
| 987 |
+
name: m.name,
|
| 988 |
+
org: m.org,
|
| 989 |
+
params: m.params,
|
| 990 |
+
score: toPct(score),
|
| 991 |
+
url: m.url,
|
| 992 |
+
x: Math.log10(m.params),
|
| 993 |
+
y: toPct(score)
|
| 994 |
+
};
|
| 995 |
+
});
|
| 996 |
|
| 997 |
const chartTitleMap = {
|
| 998 |
+
avg: 'Average score vs log parameters',
|
| 999 |
arc_easy: 'ARC-Easy vs log parameters',
|
| 1000 |
arc_challenge: 'ARC-Challenge vs log parameters',
|
| 1001 |
hellaswag: 'HellaSwag vs log parameters',
|
|
|
|
| 1240 |
render();
|
| 1241 |
</script>
|
| 1242 |
</body>
|
| 1243 |
+
</html>
|