Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# Model_Leaderboard
Leaderboard of AI models.

- `node 18.x.x`
- `pnpm 8.7.x`

## development
```
cd leaderboard
pnpm install
pnpm dev
```

## build
```
pnpm build
move dist/* files to rwkv.com repo /leaderboard folder
```
1 change: 1 addition & 0 deletions index.html

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions leaderboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
98 changes: 21 additions & 77 deletions leaderboard/index.html
Original file line number Diff line number Diff line change
@@ -1,77 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Model Performance</title>
<style>
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
border: 1px solid black;
padding: 5px;
text-align: center;
}
th {
max-width: 30px;
white-space: normal;
word-wrap: break-word;
}
</style>
</head>
<body>
<table id="performanceTable">
<thead>
<tr id="headerRow"></tr>
</thead>
<tbody id="dataRows"></tbody>
</table>

<script type="text/javascript">
fetch("lm_eval.json")
.then((response) => response.json())
.then((src) => {
var headerRow = document.getElementById("headerRow");
var dataRows = document.getElementById("dataRows");

var benchmarks = Array.from(
new Set([].concat(...Object.values(src).map(Object.keys)))
);

headerRow.innerHTML =
"<th>Model</th>" +
benchmarks.map((benchmark) => `<th>${benchmark}</th>`).join("");

function toString(benchmark, score) {
if (benchmark.includes("ppl")) return score.toFixed(2);
else return (src[model][benchmark] * 100).toFixed(1) + "%";
}

var sortedModels = Object.entries(src).sort((a, b) =>
a[0].localeCompare(b[0])
);

for (var i = 0; i < sortedModels.length; i++) {
var model = sortedModels[i][0];
var data = sortedModels[i][1];

var row = document.createElement("tr");
row.innerHTML =
`<td>${model}</td>` +
benchmarks
.map(
(benchmark) =>
`<td>${
data[benchmark]
? toString(benchmark, data[benchmark])
: "-"
}</td>`
)
.join("");
dataRows.appendChild(row);
}
});
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>RWKV</title>
<style>
html,
body {
overflow: hidden;
}
</style>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
29 changes: 29 additions & 0 deletions leaderboard/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "mantine-react-table-example-enable-column-pinning",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite --port 3001",
"build": "vite build",
"serve": "vite preview",
"start": "vite"
},
"dependencies": {
"@emotion/react": "^11.11.1",
"@mantine/core": "^6.0.21",
"@mantine/dates": "^6.0.21",
"@mantine/hooks": "^6.0.21",
"@tabler/icons-react": "2.34.0",
"dayjs": "^1.11.9",
"mantine-react-table": "^1.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react": "^4.0.4",
"typescript": "^5.2.2",
"vite": "^4.4.9"
}
}
Loading