Upload 32 files
Browse files- .dockerignore +25 -0
- .editorconfig +9 -0
- .gitattributes +2 -35
- .gitignore +35 -0
- .prettierrc.json +6 -0
- Dockerfile +31 -0
- config.app.json +12 -0
- docker-compose.yml +10 -0
- env.d.ts +1 -0
- eslint.config.ts +22 -0
- index.html +12 -18
- nginx.conf +18 -0
- package-lock.json +0 -0
- package.json +34 -0
- postcss.config.js +6 -0
- public/filtered.csv +246 -0
- public/logo.png +3 -0
- scripts/count_column.js +135 -0
- scripts/filter_by_series.js +143 -0
- scripts/merge_csv.js +248 -0
- src/App.vue +13 -0
- src/components/Chart.vue +329 -0
- src/components/star-solid-full.svg +1 -0
- src/composables/useLeaderboardData.js +492 -0
- src/main.css +8 -0
- src/main.js +8 -0
- src/router/index.js +17 -0
- src/utils/csvUtils.js +63 -0
- src/utils/mk2html.js +45 -0
- src/views/Leaderboard.vue +376 -0
- tailwind.config.js +12 -0
- vite.config.ts +19 -0
.dockerignore
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 忽略所有 .log 文件
|
| 2 |
+
*.log
|
| 3 |
+
|
| 4 |
+
# 忽略 node_modules(通常不需要从主机复制进去)
|
| 5 |
+
node_modules/
|
| 6 |
+
|
| 7 |
+
# 忽略构建输出目录
|
| 8 |
+
dist/
|
| 9 |
+
|
| 10 |
+
# 忽略 .git 目录
|
| 11 |
+
.git/
|
| 12 |
+
|
| 13 |
+
# 忽略环境变量文件
|
| 14 |
+
.env
|
| 15 |
+
.env.local
|
| 16 |
+
|
| 17 |
+
# 忽略测试目录
|
| 18 |
+
tests/
|
| 19 |
+
__pycache__/
|
| 20 |
+
*.pyc
|
| 21 |
+
|
| 22 |
+
# 忽略 macOS 元数据
|
| 23 |
+
.DS_Store
|
| 24 |
+
|
| 25 |
+
.vscode
|
.editorconfig
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
|
| 2 |
+
charset = utf-8
|
| 3 |
+
indent_size = 2
|
| 4 |
+
indent_style = space
|
| 5 |
+
insert_final_newline = true
|
| 6 |
+
trim_trailing_whitespace = true
|
| 7 |
+
|
| 8 |
+
end_of_line = lf
|
| 9 |
+
max_line_length = 100
|
.gitattributes
CHANGED
|
@@ -1,35 +1,2 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
* text=auto eol=lf
|
| 2 |
+
public/logo.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.gitignore
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Logs
|
| 2 |
+
logs
|
| 3 |
+
*.log
|
| 4 |
+
npm-debug.log*
|
| 5 |
+
yarn-debug.log*
|
| 6 |
+
yarn-error.log*
|
| 7 |
+
pnpm-debug.log*
|
| 8 |
+
lerna-debug.log*
|
| 9 |
+
|
| 10 |
+
node_modules
|
| 11 |
+
.DS_Store
|
| 12 |
+
dist
|
| 13 |
+
dist-ssr
|
| 14 |
+
coverage
|
| 15 |
+
*.local
|
| 16 |
+
|
| 17 |
+
/cypress/videos/
|
| 18 |
+
/cypress/screenshots/
|
| 19 |
+
|
| 20 |
+
# Editor directories and files
|
| 21 |
+
.vscode/*
|
| 22 |
+
!.vscode/extensions.json
|
| 23 |
+
.idea
|
| 24 |
+
*.suo
|
| 25 |
+
*.ntvs*
|
| 26 |
+
*.njsproj
|
| 27 |
+
*.sln
|
| 28 |
+
*.sw?
|
| 29 |
+
|
| 30 |
+
*.tsbuildinfo
|
| 31 |
+
|
| 32 |
+
data
|
| 33 |
+
outdata
|
| 34 |
+
|
| 35 |
+
pnpm-lock.yaml
|
.prettierrc.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "https://json.schemastore.org/prettierrc",
|
| 3 |
+
"semi": false,
|
| 4 |
+
"singleQuote": true,
|
| 5 |
+
"printWidth": 100
|
| 6 |
+
}
|
Dockerfile
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 第一阶段:构建应用
|
| 2 |
+
FROM node:18-alpine as build
|
| 3 |
+
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# 复制依赖文件
|
| 7 |
+
COPY package*.json ./
|
| 8 |
+
|
| 9 |
+
# 安装 pnpm 并安装依赖
|
| 10 |
+
RUN npm install -g pnpm && pnpm install
|
| 11 |
+
|
| 12 |
+
# 复制源代码
|
| 13 |
+
COPY . .
|
| 14 |
+
|
| 15 |
+
# 构建应用
|
| 16 |
+
RUN pnpm build
|
| 17 |
+
|
| 18 |
+
# 第二阶段:运行 nginx 服务器
|
| 19 |
+
FROM nginx:alpine
|
| 20 |
+
|
| 21 |
+
# 复制构建产物到 nginx 目录
|
| 22 |
+
COPY --from=build /app/dist /usr/share/nginx/html
|
| 23 |
+
|
| 24 |
+
# 复制自定义 nginx 配置(让 nginx 在 7860 端口监听)
|
| 25 |
+
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
| 26 |
+
|
| 27 |
+
# 暴露端口 7860(宿主或平台需将此端口映射/开放)
|
| 28 |
+
EXPOSE 7860
|
| 29 |
+
|
| 30 |
+
# 启动 nginx
|
| 31 |
+
CMD ["nginx", "-g", "daemon off;"]
|
config.app.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
| 3 |
+
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
| 4 |
+
"exclude": ["src/**/__tests__/*"],
|
| 5 |
+
"compilerOptions": {
|
| 6 |
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
| 7 |
+
|
| 8 |
+
"paths": {
|
| 9 |
+
"@/*": ["./src/*"]
|
| 10 |
+
}
|
| 11 |
+
}
|
| 12 |
+
}
|
docker-compose.yml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: '3.8'
|
| 2 |
+
|
| 3 |
+
services:
|
| 4 |
+
web:
|
| 5 |
+
build: .
|
| 6 |
+
image: information-capacity-leaderboard:latest
|
| 7 |
+
container_name: information-capacity-leaderboard
|
| 8 |
+
ports:
|
| 9 |
+
- "7860:7860"
|
| 10 |
+
restart: unless-stopped
|
env.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="vite/client" />
|
eslint.config.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { globalIgnores } from 'eslint/config'
|
| 2 |
+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
| 3 |
+
import pluginVue from 'eslint-plugin-vue'
|
| 4 |
+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
| 5 |
+
|
| 6 |
+
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
|
| 7 |
+
// import { configureVueProject } from '@vue/eslint-config-typescript'
|
| 8 |
+
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
|
| 9 |
+
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
|
| 10 |
+
|
| 11 |
+
export default defineConfigWithVueTs(
|
| 12 |
+
{
|
| 13 |
+
name: 'app/files-to-lint',
|
| 14 |
+
files: ['**/*.{ts,mts,tsx,vue}'],
|
| 15 |
+
},
|
| 16 |
+
|
| 17 |
+
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
| 18 |
+
|
| 19 |
+
pluginVue.configs['flat/essential'],
|
| 20 |
+
vueTsConfigs.recommended,
|
| 21 |
+
skipFormatting,
|
| 22 |
+
)
|
index.html
CHANGED
|
@@ -1,19 +1,13 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
<p>
|
| 14 |
-
Also don't forget to check the
|
| 15 |
-
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
|
| 16 |
-
</p>
|
| 17 |
-
</div>
|
| 18 |
-
</body>
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<link rel="icon" href="">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>Information Capacity Leaderboard - TeleAI</title>
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<div id="app"></div>
|
| 11 |
+
<script type="module" src="/src/main.js"></script>
|
| 12 |
+
</body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
</html>
|
nginx.conf
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
server {
|
| 2 |
+
listen 7860;
|
| 3 |
+
server_name localhost;
|
| 4 |
+
|
| 5 |
+
root /usr/share/nginx/html;
|
| 6 |
+
index index.html;
|
| 7 |
+
|
| 8 |
+
# Single Page App: 如果找不到请求的静态文件,则返回 index.html
|
| 9 |
+
location / {
|
| 10 |
+
try_files $uri $uri/ /index.html;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
# 可选:短时间缓存静态资源
|
| 14 |
+
location ~* \.(?:css|js|jpg|jpeg|gif|png|svg|ico|woff2?|ttf|eot)$ {
|
| 15 |
+
expires 7d;
|
| 16 |
+
add_header Cache-Control "public";
|
| 17 |
+
}
|
| 18 |
+
}
|
package-lock.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "vue",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"private": true,
|
| 5 |
+
"type": "module",
|
| 6 |
+
"scripts": {
|
| 7 |
+
"dev": "vite",
|
| 8 |
+
"build": "vite build",
|
| 9 |
+
"preview": "vite preview --host 0.0.0.0",
|
| 10 |
+
"lint": "eslint . --fix",
|
| 11 |
+
"format": "prettier --write src/"
|
| 12 |
+
},
|
| 13 |
+
"dependencies": {
|
| 14 |
+
"echarts": "^6.0.0",
|
| 15 |
+
"pinia": "^3.0.1",
|
| 16 |
+
"vue": "^3.5.13",
|
| 17 |
+
"vue-router": "^4.5.0"
|
| 18 |
+
},
|
| 19 |
+
"devDependencies": {
|
| 20 |
+
"@vitejs/plugin-vue": "^5.2.3",
|
| 21 |
+
"@vue/eslint-config-prettier": "^10.2.0",
|
| 22 |
+
"@vue/tsconfig": "^0.7.0",
|
| 23 |
+
"autoprefixer": "^10.4.21",
|
| 24 |
+
"eslint": "^9.22.0",
|
| 25 |
+
"eslint-plugin-vue": "~10.0.0",
|
| 26 |
+
"jiti": "^2.4.2",
|
| 27 |
+
"npm-run-all2": "^7.0.2",
|
| 28 |
+
"postcss": "^8.5.6",
|
| 29 |
+
"prettier": "3.5.3",
|
| 30 |
+
"tailwindcss": "^3.3.3",
|
| 31 |
+
"vite": "^6.2.4",
|
| 32 |
+
"vite-plugin-vue-devtools": "^7.7.2"
|
| 33 |
+
}
|
| 34 |
+
}
|
postcss.config.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export default {
|
| 2 |
+
plugins: {
|
| 3 |
+
tailwindcss: {},
|
| 4 |
+
autoprefixer: {},
|
| 5 |
+
},
|
| 6 |
+
}
|
public/filtered.csv
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model_name,model_series,model_size (B),data_name,seq_len,uniform_entropy,constant,conditional_entropy,entropy_gain,BF16_TFLOPs,information_capacity,ic
|
| 2 |
+
DeepSeek-V2-236B-A21B,DeepSeek-V2,236.0,data_part_0000,1024,16.643856189774723,32.12,2.251732349395752,29.868267650604245,37.7957122048,0.8508680957071698,0.16717145364366684
|
| 3 |
+
DeepSeek-V3.1-Base-671B-A37B,DeepSeek-V3.1-Base,671.0,data_part_0000,1024,16.980139577639157,34.94,2.2772045135498047,32.66279548645019,78.006806642688,0.9035685069448164,0.2396435781777227
|
| 4 |
+
GLM-4-32B-Base-0414,GLM-4,32.0,data_part_0000,1024,17.20945336562895,34.82,2.760892629623413,32.05910737037659,65.5704981504,0.8930583115634292,0.22449947647473625
|
| 5 |
+
GLM-4.5-Air-Base-106B-A12B,GLM-4.5-Air-Base,106.0,data_part_0000,1024,17.20945336562895,34.82,2.5816900730133057,32.238309926986695,17.749377810432,0.9478278177014319,0.2422118075460074
|
| 6 |
+
GLM-4.5-Base-355B-A32B,GLM-4.5-Base,355.0,data_part_0000,1024,17.20945336562895,34.82,2.2813751697540283,32.53862483024597,48.828658745344,0.9172839724996397,0.2407091186192849
|
| 7 |
+
Hunyuan-0.5B-Pretrain,Hunyuan,0.5,data_part_0000,1024,16.882475884200698,34.95,3.9885313510894775,30.961468648910525,1.000647688192,1.0367464096541894,0.23310514464022852
|
| 8 |
+
Hunyuan-1.8B-Pretrain,Hunyuan,1.8,data_part_0000,1024,16.882475884200698,34.95,3.584585189819336,31.365414810180667,3.805148086272,0.9866102441707987,0.23168173442848555
|
| 9 |
+
Hunyuan-4B-Pretrain,Hunyuan,4.0,data_part_0000,1024,16.882475884200698,34.95,3.2984426021575928,31.65155739784241,8.297562243072,0.961590897404844,0.23245832273762004
|
| 10 |
+
Hunyuan-7B-Pretrain,Hunyuan,7.0,data_part_0000,1024,16.967654067617747,34.95,2.9976937770843506,31.952306222915652,15.643394965504,0.9444789153560366,0.23506239279253738
|
| 11 |
+
Llama-3.1-8B,Llama-3.1,8.0,data_part_0000,1024,16.968666793195208,32.84,2.821995973587036,30.018004026412967,15.644149940224,0.8873010085049908,0.177885945951797
|
| 12 |
+
Llama-3.1-70B,Llama-3.1,70.0,data_part_0000,1024,16.968666793195208,32.84,2.4085302352905273,30.431469764709476,143.712558514176,0.8218018438545803,0.1736818416001239
|
| 13 |
+
Llama-3.2-1B,Llama-3.2,1.0,data_part_0000,1024,16.968666793195208,32.84,3.366785764694214,29.47321423530579,2.59946184704,0.9434039861539558,0.1751913478264881
|
| 14 |
+
Llama-3.2-3B,Llama-3.2,3.0,data_part_0000,1024,16.968666793195208,32.84,3.0805253982543945,29.75947460174561,6.759565492224,0.91230572910113,0.17656231321626759
|
| 15 |
+
Llama-4-109B-A17B,Llama-4,109.0,data_part_0000,1024,17.624338545312984,34.45,3.977431058883667,30.472568941116336,41.80362133504,0.8645020910276588,0.18362578470913662
|
| 16 |
+
Qwen1.5-0.5B,Qwen1.5,0.5,data_part_0000,1024,17.213104219641906,33.8,3.7239813804626465,30.07601861953735,1.001482354688,1.0070565057479184,0.20344760911524865
|
| 17 |
+
Qwen1.5-1.8B,Qwen1.5,1.8,data_part_0000,1024,17.213104219641906,33.8,3.41902232170105,30.380977678298947,3.227030388736,0.9628449329246426,0.20222825248457876
|
| 18 |
+
Qwen1.5-4B,Qwen1.5,4.0,data_part_0000,1024,17.213104219641906,33.8,3.1751632690429688,30.62483673095703,7.50725890048,0.9344982175271936,0.20215285295643626
|
| 19 |
+
Qwen1.5-7B,Qwen1.5,7.0,data_part_0000,1024,17.213104219641906,33.8,3.0355875492095947,30.764412450790402,14.812000026624,0.9114886780861936,0.2004161585293765
|
| 20 |
+
Qwen1.5-14B,Qwen1.5,14.0,data_part_0000,1024,17.214319120800766,33.8,2.944247007369995,30.855752992630002,27.84707477504,0.8901744527733408,0.1977853585365842
|
| 21 |
+
Qwen1.5-14.3B-A2.7B,Qwen1.5,14.3,data_part_0000,1024,17.213104219641906,33.8,2.895214319229126,30.90478568077087,4.966492143616,0.960510822111029,0.2145985233239858
|
| 22 |
+
Qwen1.5-32B,Qwen1.5,32.0,data_part_0000,1024,17.214319120800766,33.8,2.716146230697632,31.083853769302365,65.67474757632,0.865835765616715,0.19731961157010755
|
| 23 |
+
Qwen1.5-72B,Qwen1.5,72.0,data_part_0000,1024,17.214319120800766,33.8,2.5710153579711914,31.228984642028806,146.860769542144,0.8426273405857749,0.19505405551515287
|
| 24 |
+
Qwen2-0.5B,Qwen2,0.5,data_part_0000,1024,17.213104219641906,33.8,3.6743340492248535,30.125665950775144,1.056685686784,1.0061110923598948,0.2045797251830582
|
| 25 |
+
Qwen2-1.5B,Qwen2,1.5,data_part_0000,1024,17.213104219641906,33.8,3.2716164588928223,30.528383541107175,3.251336380416,0.9671847407204981,0.2068289313132992
|
| 26 |
+
Qwen2-7B,Qwen2,7.0,data_part_0000,1024,17.214319120800766,33.8,2.885551691055298,30.9144483089447,14.69019324416,0.9162573469250713,0.20493375782388282
|
| 27 |
+
Qwen2-57B-A14B,Qwen2,57.0,data_part_0000,1024,17.213104219641906,33.8,2.667733907699585,31.132266092300412,27.316457570304,0.8988714835216332,0.20592752818731272
|
| 28 |
+
Qwen2-72B,Qwen2,72.0,data_part_0000,1024,17.214319120800766,33.8,2.5179216861724854,31.282078313827512,147.719763001344,0.8438683484691111,0.19644204385857722
|
| 29 |
+
Qwen2.5-0.5B,Qwen2.5,0.5,data_part_0000,1024,17.213104219641906,33.8,3.647934675216675,30.152065324783322,1.056685686784,1.0069927559574525,0.20546138878061604
|
| 30 |
+
Qwen2.5-1.5B,Qwen2.5,1.5,data_part_0000,1024,17.213104219641906,33.8,3.237604856491089,30.56239514350891,3.251336380416,0.96826227903189,0.20790646962469111
|
| 31 |
+
Qwen2.5-3B,Qwen2.5,3.0,data_part_0000,1024,17.213104219641906,33.8,3.0671043395996094,30.732895660400388,6.473975332864,0.943949100891232,0.20679830743116587
|
| 32 |
+
Qwen2.5-7B,Qwen2.5,7.0,data_part_0000,1024,17.214319120800766,33.8,2.9005396366119385,30.89946036338806,14.69019324416,0.9158131269572962,0.20448953785610768
|
| 33 |
+
Qwen2.5-14B,Qwen2.5,14.0,data_part_0000,1024,17.214319120800766,33.8,2.7024266719818115,31.097573328018186,29.16769333248,0.8954240676966669,0.20436764994853804
|
| 34 |
+
Qwen2.5-32B,Qwen2.5,32.0,data_part_0000,1024,17.214319120800766,33.8,2.6616430282592773,31.13835697174072,66.19014365184,0.8670815610326332,0.19877534681365405
|
| 35 |
+
Qwen2.5-72B,Qwen2.5,72.0,data_part_0000,1024,17.214319120800766,33.8,2.5070900917053223,31.292909908294675,147.719763001344,0.8441605426015659,0.19673423799103204
|
| 36 |
+
Qwen3-0.6B-Base,Qwen3,0.6,data_part_0000,1024,17.213104219641906,33.8,3.590059757232666,30.20994024276733,1.100258213888,1.0069651380399516,0.2069912513406959
|
| 37 |
+
Qwen3-1.7B-Base,Qwen3,1.7,data_part_0000,1024,17.213104219641906,33.8,3.2383148670196533,30.561685132980344,3.643625439232,0.9632246645425145,0.20680721411621455
|
| 38 |
+
Qwen3-4B-Base,Qwen3,4.0,data_part_0000,1024,17.213104219641906,33.8,3.0264272689819336,30.773572731018064,7.70592210944,0.9379583189755558,0.2064540554902994
|
| 39 |
+
Qwen3-8B-Base,Qwen3,8.0,data_part_0000,1024,17.213104219641906,33.8,2.868133306503296,30.9318666934967,15.808398884864,0.9139067907596993,0.20480755676991014
|
| 40 |
+
Qwen3-14B-Base,Qwen3,14.0,data_part_0000,1024,17.213104219641906,33.8,2.75136661529541,31.048633384704587,29.08053569536,0.8941260450111758,0.20298370665500431
|
| 41 |
+
Seed-OSS-36B-Base,Seed-OSS,36.0,data_part_0000,1024,17.24317398347295,32.94,2.6119723320007324,30.328027667999265,65.5351611392,0.8448545883860521,0.17628126923611978
|
| 42 |
+
gemma-3-0.27b-pt,gemma-3,0.27,data_part_0000,1024,18.0,32.35,4.019983768463135,28.330016231536867,0.550436864,0.9768369471156615,0.14930170890150166
|
| 43 |
+
gemma-3-1b-pt,gemma-3,1.0,data_part_0000,1024,18.0,32.35,3.4504594802856445,28.899540519714357,2.129873338368,0.9336314991259737,0.15828505499348264
|
| 44 |
+
gemma-3-4b-pt,gemma-3,4.0,data_part_0000,1024,18.000352177480302,32.35,3.0016162395477295,29.348383760452272,8.4021870592,0.8911298673762733,0.16239751224568966
|
| 45 |
+
gemma-3-12b-pt,gemma-3,12.0,data_part_0000,1024,18.000352177480302,32.35,2.7593374252319336,29.590662574768068,24.19152912384,0.8587067389873845,0.1622383282641156
|
| 46 |
+
gemma-3-27b-pt,gemma-3,27.0,data_part_0000,1024,18.000352177480302,32.35,2.646754026412964,29.703245973587038,58.631962755072,0.8311680223788541,0.15959049328217387
|
| 47 |
+
glm-4-9b-hf,glm-4,9.0,data_part_0000,1024,17.20945336562895,34.82,3.027162790298462,31.79283720970154,18.321994940416,0.9334734300010908,0.2288064582471567
|
| 48 |
+
internlm2.5-1.8b,internlm2.5,1.8,data_part_0000,1024,16.497851836951117,33.59,3.6355276107788086,29.954472389221195,3.583512674304,0.944801571812738,0.18781151607517943
|
| 49 |
+
internlm2.5-7b,internlm2.5,7.0,data_part_0000,1024,16.497851836951117,33.59,3.1548197269439697,30.435180273056034,15.344575971328,0.9003746927416127,0.1903742119845155
|
| 50 |
+
internlm2.5-20b,internlm2.5,20.0,data_part_0000,1024,16.497851836951117,33.59,2.840322256088257,30.749677743911747,40.127812337664,0.8738268849599932,0.19180851020833786
|
| 51 |
+
DeepSeek-V2-236B-A21B,DeepSeek-V2,236.0,eng_Latn_000_00027_long,1024,16.643856189774723,33.77,2.3624660968780518,31.40753390312195,37.7957122048,0.8947177277108376,0.1255590053893968
|
| 52 |
+
DeepSeek-V3.1-Base-671B-A37B,DeepSeek-V3.1-Base,671.0,eng_Latn_000_00027_long,1024,16.980139577639157,37.28,2.3429439067840576,34.93705609321594,78.006806642688,0.9664826032508479,0.21956705838786758
|
| 53 |
+
GLM-4-32B-Base-0414,GLM-4,32.0,eng_Latn_000_00027_long,1024,17.20945336562895,36.64,2.7358038425445557,33.904196157455445,65.5704981504,0.9444562453186229,0.19232755584384342
|
| 54 |
+
GLM-4.5-Air-Base-106B-A12B,GLM-4.5-Air-Base,106.0,eng_Latn_000_00027_long,1024,17.20945336562895,36.64,2.6314516067504883,34.00854839324951,17.749377810432,0.9998740095175996,0.20605599809274716
|
| 55 |
+
GLM-4.5-Base-355B-A32B,GLM-4.5-Base,355.0,eng_Latn_000_00027_long,1024,17.20945336562895,36.64,2.410081386566162,34.22991861343384,48.828658745344,0.9649625910091848,0.20381588039378568
|
| 56 |
+
Hunyuan-0.5B-Pretrain,Hunyuan,0.5,eng_Latn_000_00027_long,1024,16.882475884200698,36.61,3.9755191802978516,32.63448081970215,1.000647688192,1.0927673103758033,0.18867088723509726
|
| 57 |
+
Hunyuan-1.8B-Pretrain,Hunyuan,1.8,eng_Latn_000_00027_long,1024,16.882475884200698,36.61,3.5614101886749268,33.04858981132507,3.805148086272,1.0395551106395262,0.190260537179424
|
| 58 |
+
Hunyuan-4B-Pretrain,Hunyuan,4.0,eng_Latn_000_00027_long,1024,16.882475884200698,36.61,3.2879159450531006,33.3220840549469,8.297562243072,1.0123423725108784,0.1920682260102515
|
| 59 |
+
Hunyuan-7B-Pretrain,Hunyuan,7.0,eng_Latn_000_00027_long,1024,16.967654067617747,36.61,3.0015690326690674,33.60843096733093,15.643394965504,0.9934323427358054,0.19533875485186877
|
| 60 |
+
Llama-3.1-8B,Llama-3.1,8.0,eng_Latn_000_00027_long,1024,16.968666793195208,36.74,2.777745246887207,33.962254753112795,15.644149940224,1.003888961671959,0.20579701629961603
|
| 61 |
+
Llama-3.1-70B,Llama-3.1,70.0,eng_Latn_000_00027_long,1024,16.968666793195208,36.74,2.4633891582489014,34.2766108417511,143.712558514176,0.9256398790012853,0.19650487646502188
|
| 62 |
+
Llama-3.2-1B,Llama-3.2,1.0,eng_Latn_000_00027_long,1024,16.968666793195208,36.74,3.2581868171691895,33.48181318283081,2.59946184704,1.071714668382077,0.2074754502636758
|
| 63 |
+
Llama-3.2-3B,Llama-3.2,3.0,eng_Latn_000_00027_long,1024,16.968666793195208,36.74,3.0010647773742676,33.738935222625734,6.759565492224,1.0342999770421983,0.20658863417172807
|
| 64 |
+
Llama-4-109B-A17B,Llama-4,109.0,eng_Latn_000_00027_long,1024,17.624338545312984,37.49,3.8621890544891357,33.627810945510866,41.80362133504,0.9540158210898754,0.18802997648153794
|
| 65 |
+
Qwen1.5-0.5B,Qwen1.5,0.5,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.7834298610687256,31.676570138931275,1.001482354688,1.0606488991022474,0.15658889039049387
|
| 66 |
+
Qwen1.5-1.8B,Qwen1.5,1.8,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.4750893115997314,31.98491068840027,3.227030388736,1.0136773579992886,0.15798359250421692
|
| 67 |
+
Qwen1.5-4B,Qwen1.5,4.0,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.1637372970581055,32.296262702941895,7.50725890048,0.9855007618107892,0.161612226668687
|
| 68 |
+
Qwen1.5-7B,Qwen1.5,7.0,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.029648780822754,32.43035121917725,14.812000026624,0.9608471479805359,0.16089056347911662
|
| 69 |
+
Qwen1.5-14B,Qwen1.5,14.0,eng_Latn_000_00027_long,1024,17.214319120800766,35.46,2.9397261142730713,32.52027388572693,27.84707477504,0.9381951241695716,0.1592573931532204
|
| 70 |
+
Qwen1.5-14.3B-A2.7B,Qwen1.5,14.3,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,2.9040884971618652,32.555911502838136,4.966492143616,1.0118272828412307,0.17267594670580705
|
| 71 |
+
Qwen1.5-32B,Qwen1.5,32.0,eng_Latn_000_00027_long,1024,17.214319120800766,35.46,2.746184825897217,32.713815174102784,65.67474757632,0.9112380793492809,0.1591574060468475
|
| 72 |
+
Qwen1.5-72B,Qwen1.5,72.0,eng_Latn_000_00027_long,1024,17.214319120800766,35.46,2.643311023712158,32.81668897628784,146.860769542144,0.8854671285631495,0.15694718285869966
|
| 73 |
+
Qwen2-0.5B,Qwen2,0.5,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.685828685760498,31.774171314239503,1.056685686784,1.0611664572672252,0.1594436691932843
|
| 74 |
+
Qwen2-1.5B,Qwen2,1.5,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.272855758666992,32.18714424133301,3.251336380416,1.0197367546718759,0.16433646908877708
|
| 75 |
+
Qwen2-7B,Qwen2,7.0,eng_Latn_000_00027_long,1024,17.214319120800766,35.46,2.875864267349243,32.58413573265076,14.69019324416,0.965744349046226,0.16550531130738882
|
| 76 |
+
Qwen2-57B-A14B,Qwen2,57.0,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,2.706306219100952,32.75369378089905,27.316457570304,0.945686421681055,0.16612447192994448
|
| 77 |
+
Qwen2-72B,Qwen2,72.0,eng_Latn_000_00027_long,1024,17.214319120800766,35.46,2.5860800743103027,32.8739199256897,147.719763001344,0.8868100206479949,0.15845542796114429
|
| 78 |
+
Qwen2.5-0.5B,Qwen2.5,0.5,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.5750572681427,31.8849427318573,1.056685686784,1.06486590584253,0.16314311776858886
|
| 79 |
+
Qwen2.5-1.5B,Qwen2.5,1.5,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.1653454303741455,32.294654569625855,3.251336380416,1.0231428422839066,0.16774255670080795
|
| 80 |
+
Qwen2.5-3B,Qwen2.5,3.0,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.0068860054016113,32.45311399459839,6.473975332864,0.9967849471403407,0.1674903044977664
|
| 81 |
+
Qwen2.5-7B,Qwen2.5,7.0,eng_Latn_000_00027_long,1024,17.214319120800766,35.46,2.85302734375,32.60697265625,14.69019324416,0.9664212008153361,0.16618216307649897
|
| 82 |
+
Qwen2.5-14B,Qwen2.5,14.0,eng_Latn_000_00027_long,1024,17.214319120800766,35.46,2.686429977416992,32.77357002258301,29.16769333248,0.9436827456926532,0.16624427572600822
|
| 83 |
+
Qwen2.5-32B,Qwen2.5,32.0,eng_Latn_000_00027_long,1024,17.214319120800766,35.46,2.6482460498809814,32.81175395011902,66.19014365184,0.913679127678695,0.16183463668234332
|
| 84 |
+
Qwen2.5-72B,Qwen2.5,72.0,eng_Latn_000_00027_long,1024,17.214319120800766,35.46,2.540452718734741,32.91954728126526,147.719763001344,0.888040868573388,0.15968627588653747
|
| 85 |
+
Qwen3-0.6B-Base,Qwen3,0.6,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.4984476566314697,31.96155234336853,1.100258213888,1.0653503022110928,0.16537967967443015
|
| 86 |
+
Qwen3-1.7B-Base,Qwen3,1.7,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,3.1593053340911865,32.300694665908814,3.643625439232,1.018033712757714,0.1670640810281264
|
| 87 |
+
Qwen3-4B-Base,Qwen3,4.0,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,2.9608263969421387,32.49917360305786,7.70592210944,0.9905535020993471,0.16761120567843357
|
| 88 |
+
Qwen3-8B-Base,Qwen3,8.0,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,2.8185057640075684,32.64149423599243,15.808398884864,0.9644191066260146,0.16668246838750186
|
| 89 |
+
Qwen3-14B-Base,Qwen3,14.0,eng_Latn_000_00027_long,1024,17.213104219641906,35.46,2.720139265060425,32.739860734939576,29.08053569536,0.9428293294083975,0.16529419875770462
|
| 90 |
+
Seed-OSS-36B-Base,Seed-OSS,36.0,eng_Latn_000_00027_long,1024,17.24317398347295,34.98,2.6390929222106934,32.3409070777893,65.5351611392,0.9009278162215472,0.14878283217787336
|
| 91 |
+
gemma-3-0.27b-pt,gemma-3,0.27,eng_Latn_000_00027_long,1024,18.0,35.77,3.8199846744537354,31.950015325546268,0.550436864,1.101656814307166,0.17067967131623638
|
| 92 |
+
gemma-3-1b-pt,gemma-3,1.0,eng_Latn_000_00027_long,1024,18.0,35.77,3.2813682556152344,32.48863174438477,2.129873338368,1.0495810457391124,0.17731629609006008
|
| 93 |
+
gemma-3-4b-pt,gemma-3,4.0,eng_Latn_000_00027_long,1024,18.000352177480302,35.77,2.840498447418213,32.92950155258179,8.4021870592,0.9998663841537142,0.18004248463180753
|
| 94 |
+
gemma-3-12b-pt,gemma-3,12.0,eng_Latn_000_00027_long,1024,18.000352177480302,35.77,2.6129720211029053,33.1570279788971,24.19152912384,0.9622009408653925,0.17867397880171507
|
| 95 |
+
gemma-3-27b-pt,gemma-3,27.0,eng_Latn_000_00027_long,1024,18.000352177480302,35.77,2.5094683170318604,33.26053168296814,58.631962755072,0.9307094035037331,0.17518468326996775
|
| 96 |
+
glm-4-9b-hf,glm-4,9.0,eng_Latn_000_00027_long,1024,17.20945336562895,36.64,2.98236083984375,33.65763916015625,18.321994940416,0.9882261109739138,0.19547576775073794
|
| 97 |
+
internlm2.5-1.8b,internlm2.5,1.8,eng_Latn_000_00027_long,1024,16.497851836951117,35.25,3.5973238945007324,31.652676105499268,3.583512674304,0.9983650437226992,0.14675123101794574
|
| 98 |
+
internlm2.5-7b,internlm2.5,7.0,eng_Latn_000_00027_long,1024,16.497851836951117,35.25,3.087465524673462,32.16253447532654,15.344575971328,0.9514756224936899,0.15272508164195545
|
| 99 |
+
internlm2.5-20b,internlm2.5,20.0,eng_Latn_000_00027_long,1024,16.497851836951117,35.25,2.8226184844970703,32.42738151550293,40.127812337664,0.921502918277299,0.15423224668168684
|
| 100 |
+
DeepSeek-V2-236B-A21B,DeepSeek-V2,236.0,IndustryCorpus_batch_aa_long,1024,16.643856189774723,30.81,2.1160805225372314,28.693919477462767,37.7957122048,0.8174140164325766,0.28470038282476384
|
| 101 |
+
DeepSeek-V3.1-Base-671B-A37B,DeepSeek-V3.1-Base,671.0,IndustryCorpus_batch_aa_long,1024,16.980139577639157,33.98,2.5056979656219482,31.47430203437805,78.006806642688,0.8706905723403515,0.3533823986759911
|
| 102 |
+
GLM-4-32B-Base-0414,GLM-4,32.0,IndustryCorpus_batch_aa_long,1024,17.20945336562895,33.23,3.1385788917541504,30.091421108245846,65.5704981504,0.8382452267621728,0.3173264677555663
|
| 103 |
+
GLM-4.5-Air-Base-106B-A12B,GLM-4.5-Air-Base,106.0,IndustryCorpus_batch_aa_long,1024,17.20945336562895,33.23,2.8672702312469482,30.36272976875305,17.749377810432,0.8926845098689524,0.3428920352895176
|
| 104 |
+
GLM-4.5-Base-355B-A32B,GLM-4.5-Base,355.0,IndustryCorpus_batch_aa_long,1024,17.20945336562895,33.23,2.4935522079467773,30.73644779205322,48.828658745344,0.866479486404565,0.3393149127561219
|
| 105 |
+
Hunyuan-0.5B-Pretrain,Hunyuan,0.5,IndustryCorpus_batch_aa_long,1024,16.882475884200698,35.12,4.691961765289307,30.42803823471069,1.000647688192,1.0188844641181696,0.39271397846145845
|
| 106 |
+
Hunyuan-1.8B-Pretrain,Hunyuan,1.8,IndustryCorpus_batch_aa_long,1024,16.882475884200698,35.12,4.18785285949707,30.932147140502927,3.805148086272,0.9729816559962429,0.3847665254886905
|
| 107 |
+
Hunyuan-4B-Pretrain,Hunyuan,4.0,IndustryCorpus_batch_aa_long,1024,16.882475884200698,35.12,3.870864152908325,31.249135847091672,8.297562243072,0.9493651198464914,0.3812493220849461
|
| 108 |
+
Hunyuan-7B-Pretrain,Hunyuan,7.0,IndustryCorpus_batch_aa_long,1024,16.967654067617747,35.12,3.29822039604187,31.821779603958127,15.643394965504,0.9406206761842525,0.3878669690201927
|
| 109 |
+
Llama-3.1-8B,Llama-3.1,8.0,IndustryCorpus_batch_aa_long,1024,16.968666793195208,23.9,3.213531494140625,20.686468505859374,15.644149940224,0.6114705145453709,0.05871794497267406
|
| 110 |
+
Llama-3.1-70B,Llama-3.1,70.0,IndustryCorpus_batch_aa_long,1024,16.968666793195208,23.9,2.785083770751953,21.114916229248045,143.712558514176,0.5702083147542876,0.06521481299769029
|
| 111 |
+
Llama-3.2-1B,Llama-3.2,1.0,IndustryCorpus_batch_aa_long,1024,16.968666793195208,23.9,3.962632656097412,19.937367343902586,2.59946184704,0.6381723986901376,0.039606717993319066
|
| 112 |
+
Llama-3.2-3B,Llama-3.2,3.0,IndustryCorpus_batch_aa_long,1024,16.968666793195208,23.9,3.5783565044403076,20.32164349555969,6.759565492224,0.6229798084090618,0.04971306353210651
|
| 113 |
+
Llama-4-109B-A17B,Llama-4,109.0,IndustryCorpus_batch_aa_long,1024,17.624338545312984,29.49,4.475708484649658,25.01429151535034,41.80362133504,0.7096516005061037,0.17913547849958852
|
| 114 |
+
Qwen1.5-0.5B,Qwen1.5,0.5,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,4.202773571014404,26.957226428985596,1.001482354688,0.9026277911197566,0.27648252582680144
|
| 115 |
+
Qwen1.5-1.8B,Qwen1.5,1.8,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.8544676303863525,27.305532369613648,3.227030388736,0.8653768078593433,0.27272964434979374
|
| 116 |
+
Qwen1.5-4B,Qwen1.5,4.0,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.698274850845337,27.461725149154663,7.50725890048,0.8379777965041504,0.2673586999427686
|
| 117 |
+
Qwen1.5-7B,Qwen1.5,7.0,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.5112204551696777,27.648779544830322,14.812000026624,0.8191786389005619,0.26513463407920856
|
| 118 |
+
Qwen1.5-14B,Qwen1.5,14.0,IndustryCorpus_batch_aa_long,1024,17.214319120800766,31.16,3.409911870956421,27.75008812904358,27.84707477504,0.8005774326941106,0.26109093010130446
|
| 119 |
+
Qwen1.5-14.3B-A2.7B,Qwen1.5,14.3,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.3413312435150146,27.818668756484985,4.966492143616,0.8645952983893754,0.28340529891780436
|
| 120 |
+
Qwen1.5-32B,Qwen1.5,32.0,IndustryCorpus_batch_aa_long,1024,17.214319120800766,31.16,3.0849609375,28.0750390625,65.67474757632,0.7820257141154489,0.2611402107541339
|
| 121 |
+
Qwen1.5-72B,Qwen1.5,72.0,IndustryCorpus_batch_aa_long,1024,17.214319120800766,31.16,2.940380811691284,28.219619188308716,146.860769542144,0.7614279792172932,0.2568604612664335
|
| 122 |
+
Qwen2-0.5B,Qwen2,0.5,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,4.184194564819336,26.975805435180664,1.056685686784,0.9009147587981956,0.27638823520624384
|
| 123 |
+
Qwen2-1.5B,Qwen2,1.5,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.7292630672454834,27.430736932754517,3.251336380416,0.8690466742975209,0.2766027728010786
|
| 124 |
+
Qwen2-7B,Qwen2,7.0,IndustryCorpus_batch_aa_long,1024,17.214319120800766,31.16,3.2501893043518066,27.909810695648194,14.69019324416,0.8272044464651339,0.27296481662379113
|
| 125 |
+
Qwen2-57B-A14B,Qwen2,57.0,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.0333728790283203,28.12662712097168,27.316457570304,0.8120906769758203,0.27217184511116227
|
| 126 |
+
Qwen2-72B,Qwen2,72.0,IndustryCorpus_batch_aa_long,1024,17.214319120800766,31.16,2.81121826171875,28.34878173828125,147.719763001344,0.764739458376084,0.2602864627003764
|
| 127 |
+
Qwen2.5-0.5B,Qwen2.5,0.5,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,4.130499839782715,27.029500160217285,1.056685686784,0.9027080090635617,0.27818148547161
|
| 128 |
+
Qwen2.5-1.5B,Qwen2.5,1.5,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.6513099670410156,27.508690032958985,3.251336380416,0.8715163448225947,0.2790724433261523
|
| 129 |
+
Qwen2.5-3B,Qwen2.5,3.0,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.4603397846221924,27.699660215377808,6.473975332864,0.8507844377641656,0.2764211111931975
|
| 130 |
+
Qwen2.5-7B,Qwen2.5,7.0,IndustryCorpus_batch_aa_long,1024,17.214319120800766,31.16,3.2639808654785156,27.896019134521485,14.69019324416,0.8267956855168023,0.27255605567545954
|
| 131 |
+
Qwen2.5-14B,Qwen2.5,14.0,IndustryCorpus_batch_aa_long,1024,17.214319120800766,31.16,3.025247812271118,28.134752187728882,29.16769333248,0.8101125442118022,0.27166441871638514
|
| 132 |
+
Qwen2.5-32B,Qwen2.5,32.0,IndustryCorpus_batch_aa_long,1024,17.214319120800766,31.16,2.9765195846557617,28.18348041534424,66.19014365184,0.7847997958288938,0.26407787058327253
|
| 133 |
+
Qwen2.5-72B,Qwen2.5,72.0,IndustryCorpus_batch_aa_long,1024,17.214319120800766,31.16,2.777780532836914,28.382219467163086,147.719763001344,0.765641477761273,0.2611884820855654
|
| 134 |
+
Qwen3-0.6B-Base,Qwen3,0.6,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.992006778717041,27.16799322128296,1.100258213888,0.9055702137936984,0.28225722707386164
|
| 135 |
+
Qwen3-1.7B-Base,Qwen3,1.7,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.562650203704834,27.597349796295166,3.643625439232,0.869796540476515,0.28042127701935626
|
| 136 |
+
Qwen3-4B-Base,Qwen3,4.0,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.315218687057495,27.844781312942505,7.70592210944,0.8486906769263349,0.2787269382940727
|
| 137 |
+
Qwen3-8B-Base,Qwen3,8.0,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,3.1017580032348633,28.058241996765137,15.808398884864,0.8290032461252621,0.2764967596415514
|
| 138 |
+
Qwen3-14B-Base,Qwen3,14.0,IndustryCorpus_batch_aa_long,1024,17.213104219641906,31.16,2.942368745803833,28.217631254196167,29.08053569536,0.8125999853290552,0.2740849133598717
|
| 139 |
+
Seed-OSS-36B-Base,Seed-OSS,36.0,IndustryCorpus_batch_aa_long,1024,17.24317398347295,31.93,2.844463586807251,29.08553641319275,65.5351611392,0.8102422341260206,0.2893121896216983
|
| 140 |
+
gemma-3-0.27b-pt,gemma-3,0.27,IndustryCorpus_batch_aa_long,1024,18.0,28.58,5.01190185546875,23.56809814453125,0.550436864,0.8126429880120569,0.16785511490352403
|
| 141 |
+
gemma-3-1b-pt,gemma-3,1.0,IndustryCorpus_batch_aa_long,1024,18.0,28.58,4.134049415588379,24.44595058441162,2.129873338368,0.7897533691275891,0.18562926474102326
|
| 142 |
+
gemma-3-4b-pt,gemma-3,4.0,IndustryCorpus_batch_aa_long,1024,18.000352177480302,28.58,3.670428991317749,24.90957100868225,8.4021870592,0.7563504311020635,0.18854647106281708
|
| 143 |
+
gemma-3-12b-pt,gemma-3,12.0,IndustryCorpus_batch_aa_long,1024,18.000352177480302,28.58,3.340955972671509,25.23904402732849,24.19152912384,0.7324248700786702,0.18975990005678986
|
| 144 |
+
gemma-3-27b-pt,gemma-3,27.0,IndustryCorpus_batch_aa_long,1024,18.000352177480302,28.58,3.1846868991851807,25.395313100814818,58.631962755072,0.7106217342867404,0.18735090953224365
|
| 145 |
+
glm-4-9b-hf,glm-4,9.0,IndustryCorpus_batch_aa_long,1024,17.20945336562895,33.23,3.481240749359131,29.748759250640866,18.321994940416,0.8734570039410805,0.3244039884494736
|
| 146 |
+
internlm2.5-1.8b,internlm2.5,1.8,IndustryCorpus_batch_aa_long,1024,16.497851836951117,32.52,4.206731796264648,28.313268203735355,3.583512674304,0.893035936485753,0.3032145180569053
|
| 147 |
+
internlm2.5-7b,internlm2.5,7.0,IndustryCorpus_batch_aa_long,1024,16.497851836951117,32.52,3.602144718170166,28.917855281829837,15.344575971328,0.8554871313568062,0.3022784234335679
|
| 148 |
+
internlm2.5-20b,internlm2.5,20.0,IndustryCorpus_batch_aa_long,1024,16.497851836951117,32.52,3.216423988342285,29.303576011657718,40.127812337664,0.8327323869117662,0.3013264032511015
|
| 149 |
+
DeepSeek-V2-236B-A21B,DeepSeek-V2,236.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.643856189774723,36.61,2.476067304611206,34.13393269538879,37.7957122048,0.9723856318441222,0.20322690952268135
|
| 150 |
+
DeepSeek-V3.1-Base-671B-A37B,DeepSeek-V3.1-Base,671.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.980139577639157,38.51,2.215646266937256,36.29435373306274,78.006806642688,1.0040302590363075,0.25711471417332715
|
| 151 |
+
GLM-4-32B-Base-0414,GLM-4,32.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.20945336562895,37.99,2.6497623920440674,35.340237607955935,65.5704981504,0.984459503622193,0.23233081414741358
|
| 152 |
+
GLM-4.5-Air-Base-106B-A12B,GLM-4.5-Air-Base,106.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.20945336562895,37.99,2.375840187072754,35.61415981292725,17.749377810432,1.0470800563431408,0.2532620449182884
|
| 153 |
+
GLM-4.5-Base-355B-A32B,GLM-4.5-Base,355.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.20945336562895,37.99,1.9201092720031738,36.06989072799683,48.828658745344,1.0168325436989507,0.2556858330835516
|
| 154 |
+
Hunyuan-0.5B-Pretrain,Hunyuan,0.5,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.882475884200698,38.16,4.17264461517334,33.98735538482666,1.000647688192,1.138068386497548,0.23397196335684195
|
| 155 |
+
Hunyuan-1.8B-Pretrain,Hunyuan,1.8,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.882475884200698,38.16,3.7287282943725586,34.43127170562744,3.805148086272,1.0830478598859163,0.23375328642581414
|
| 156 |
+
Hunyuan-4B-Pretrain,Hunyuan,4.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.882475884200698,38.16,3.449779510498047,34.71022048950195,8.297562243072,1.054514684699066,0.23424053819843918
|
| 157 |
+
Hunyuan-7B-Pretrain,Hunyuan,7.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.967654067617747,38.16,3.1347908973693848,35.02520910263061,15.643394965504,1.0353109184853178,0.23721733060138117
|
| 158 |
+
Llama-3.1-8B,Llama-3.1,8.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.968666793195208,38.02,2.9178566932678223,35.10214330673218,15.644149940224,1.0375828829040243,0.2394909375316813
|
| 159 |
+
Llama-3.1-70B,Llama-3.1,70.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.968666793195208,38.02,2.35628604888916,35.66371395111084,143.712558514176,0.9630985985998436,0.2339635960635802
|
| 160 |
+
Llama-3.2-1B,Llama-3.2,1.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.968666793195208,38.02,3.465826988220215,34.55417301177979,2.59946184704,1.1060396839417972,0.241800465823396
|
| 161 |
+
Llama-3.2-3B,Llama-3.2,3.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.968666793195208,38.02,3.1911160945892334,34.82888390541077,6.759565492224,1.0677134173343428,0.2400020744638726
|
| 162 |
+
Llama-4-109B-A17B,Llama-4,109.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.624338545312984,38.38,4.081301689147949,34.29869831085205,41.80362133504,0.9730487923927618,0.2070629477844243
|
| 163 |
+
Qwen1.5-0.5B,Qwen1.5,0.5,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,4.016155242919922,33.27384475708008,1.001482354688,1.114131569665161,0.21007156095340754
|
| 164 |
+
Qwen1.5-1.8B,Qwen1.5,1.8,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.6896677017211914,33.60033229827881,3.227030388736,1.0648738839333285,0.20918011843825682
|
| 165 |
+
Qwen1.5-4B,Qwen1.5,4.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.4003915786743164,33.88960842132568,7.50725890048,1.034120734769832,0.2102321996277299
|
| 166 |
+
Qwen1.5-7B,Qwen1.5,7.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.2589685916900635,34.031031408309936,14.812000026624,1.0082721352760053,0.20831555077458594
|
| 167 |
+
Qwen1.5-14B,Qwen1.5,14.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.214319120800766,37.29,3.168458938598633,34.121541061401366,27.84707477504,0.9843909545610829,0.20545322354473175
|
| 168 |
+
Qwen1.5-14.3B-A2.7B,Qwen1.5,14.3,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.10791015625,34.18208984375,4.966492143616,1.0623683838623668,0.22321704772694323
|
| 169 |
+
Qwen1.5-32B,Qwen1.5,32.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.214319120800766,37.29,2.9246299266815186,34.36537007331848,65.67474757632,0.9572418764084689,0.20516120310603542
|
| 170 |
+
Qwen1.5-72B,Qwen1.5,72.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.214319120800766,37.29,2.7939274311065674,34.49607256889343,146.860769542144,0.9307806264780372,0.20226068077358736
|
| 171 |
+
Qwen2-0.5B,Qwen2,0.5,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.9345626831054688,33.35543731689453,1.056685686784,1.1139762198079894,0.21225343173404826
|
| 172 |
+
Qwen2-1.5B,Qwen2,1.5,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.5078747272491455,33.782125272750854,3.251336380416,1.070268133552411,0.21486784796931227
|
| 173 |
+
Qwen2-7B,Qwen2,7.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.214319120800766,37.29,3.1015849113464355,34.188415088653564,14.69019324416,1.0132927552725952,0.21305371753375799
|
| 174 |
+
Qwen2-57B-A14B,Qwen2,57.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,2.859682321548462,34.43031767845154,27.316457570304,0.9940950214801411,0.21453307172903058
|
| 175 |
+
Qwen2-72B,Qwen2,72.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.214319120800766,37.29,2.7257165908813477,34.56428340911865,147.719763001344,0.9324094282948697,0.20405483560801915
|
| 176 |
+
Qwen2.5-0.5B,Qwen2.5,0.5,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.751422166824341,33.53857783317566,1.056685686784,1.1200925893246678,0.21836980125072677
|
| 177 |
+
Qwen2.5-1.5B,Qwen2.5,1.5,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.292654037475586,33.99734596252441,3.251336380416,1.0770866461263255,0.22168636054322688
|
| 178 |
+
Qwen2.5-3B,Qwen2.5,3.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.1040964126586914,34.18590358734131,6.473975332864,1.0500069147732485,0.22071227213067415
|
| 179 |
+
Qwen2.5-7B,Qwen2.5,7.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.214319120800766,37.29,2.892796277999878,34.39720372200012,14.69019324416,1.019480933607412,0.21924189586857487
|
| 180 |
+
Qwen2.5-14B,Qwen2.5,14.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.214319120800766,37.29,2.553492784500122,34.73650721549988,29.16769333248,1.000203593392724,0.22276512342607901
|
| 181 |
+
Qwen2.5-32B,Qwen2.5,32.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.214319120800766,37.29,2.436856508255005,34.853143491744994,66.19014365184,0.9705238491916229,0.21867935819527135
|
| 182 |
+
Qwen2.5-72B,Qwen2.5,72.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.214319120800766,37.29,2.0375590324401855,35.252440967559814,147.719763001344,0.9509732326720101,0.22261863998515952
|
| 183 |
+
Qwen3-0.6B-Base,Qwen3,0.6,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.7444427013397217,33.54555729866028,1.100258213888,1.1181487439042437,0.21817812136758097
|
| 184 |
+
Qwen3-1.7B-Base,Qwen3,1.7,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.383861541748047,33.90613845825195,3.643625439232,1.0686331169330026,0.217663485203415
|
| 185 |
+
Qwen3-4B-Base,Qwen3,4.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,3.1635825634002686,34.12641743659973,7.70592210944,1.0401508271812625,0.21720853076034896
|
| 186 |
+
Qwen3-8B-Base,Qwen3,8.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,2.99318528175354,34.29681471824646,15.808398884864,1.0133268768749288,0.21559023863641597
|
| 187 |
+
Qwen3-14B-Base,Qwen3,14.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.213104219641906,37.29,2.8621976375579834,34.427802362442016,29.08053569536,0.9914379928850957,0.21390286223440289
|
| 188 |
+
Seed-OSS-36B-Base,Seed-OSS,36.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.24317398347295,36.91,2.808408737182617,34.10159126281738,65.5351611392,0.9499755857865061,0.1978306017428323
|
| 189 |
+
gemma-3-0.27b-pt,gemma-3,0.27,CC-MAIN-2013-20_train-00000-of-00014_long,1024,18.0,37.53,4.112582206726074,33.41741779327393,0.550436864,1.1522537830857935,0.22127664009486364
|
| 190 |
+
gemma-3-1b-pt,gemma-3,1.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,18.0,37.53,3.5602779388427734,33.96972206115723,2.129873338368,1.0974293003453037,0.22516455069625135
|
| 191 |
+
gemma-3-4b-pt,gemma-3,4.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,18.000352177480302,37.53,3.136937379837036,34.393062620162965,8.4021870592,1.044305730139375,0.22448183061746838
|
| 192 |
+
gemma-3-12b-pt,gemma-3,12.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,18.000352177480302,37.53,2.879539966583252,34.65046003341675,24.19152912384,1.0055396179293294,0.22201265586565205
|
| 193 |
+
gemma-3-27b-pt,gemma-3,27.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,18.000352177480302,37.53,2.744044065475464,34.78595593452454,58.631962755072,0.9733944305739163,0.2178697103401509
|
| 194 |
+
glm-4-9b-hf,glm-4,9.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,17.20945336562895,37.99,3.060659170150757,34.929340829849245,18.321994940416,1.025564701163788,0.23281435794061228
|
| 195 |
+
internlm2.5-1.8b,internlm2.5,1.8,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.497851836951117,36.59,3.7362446784973145,32.85375532150269,3.583512674304,1.0362485863338513,0.18463477362909794
|
| 196 |
+
internlm2.5-7b,internlm2.5,7.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.497851836951117,36.59,3.211712121963501,33.3782878780365,15.344575971328,0.9874416850106128,0.18869114415887844
|
| 197 |
+
internlm2.5-20b,internlm2.5,20.0,CC-MAIN-2013-20_train-00000-of-00014_long,1024,16.497851836951117,36.59,2.9276952743530273,33.662304725646976,40.127812337664,0.9565962649741965,0.1893255933785843
|
| 198 |
+
DeepSeek-V2-236B-A21B,DeepSeek-V2,236.0,NextCoderDataset_v1_long,1024,16.643856189774723,28.37,0.4581535756587982,27.911846424341203,37.7957122048,0.7951348197547613,0.025976097433320515
|
| 199 |
+
DeepSeek-V3.1-Base-671B-A37B,DeepSeek-V3.1-Base,671.0,NextCoderDataset_v1_long,1024,16.980139577639157,32.97,0.41526371240615845,32.55473628759384,78.006806642688,0.9005792071155108,0.15366366225253045
|
| 200 |
+
GLM-4-32B-Base-0414,GLM-4,32.0,NextCoderDataset_v1_long,1024,17.20945336562895,35.01,0.47286882996559143,34.53713117003441,65.5704981504,0.9620876742643162,0.20995898478953665
|
| 201 |
+
GLM-4.5-Air-Base-106B-A12B,GLM-4.5-Air-Base,106.0,NextCoderDataset_v1_long,1024,17.20945336562895,35.01,0.5217994451522827,34.488200554847715,17.749377810432,1.013976103039656,0.22015809161480335
|
| 202 |
+
GLM-4.5-Base-355B-A32B,GLM-4.5-Base,355.0,NextCoderDataset_v1_long,1024,17.20945336562895,35.01,0.47699496150016785,34.53300503849983,48.828658745344,0.9735067849155241,0.21236007430012496
|
| 203 |
+
Hunyuan-0.5B-Pretrain,Hunyuan,0.5,NextCoderDataset_v1_long,1024,16.882475884200698,33.73,0.8001349568367004,32.929865043163296,1.000647688192,1.1026582666677818,0.19856184352707576
|
| 204 |
+
Hunyuan-1.8B-Pretrain,Hunyuan,1.8,NextCoderDataset_v1_long,1024,16.882475884200698,33.73,0.6687179803848267,33.06128201961517,3.805148086272,1.0399543485516005,0.19065977509149828
|
| 205 |
+
Hunyuan-4B-Pretrain,Hunyuan,4.0,NextCoderDataset_v1_long,1024,16.882475884200698,33.73,0.5728369951248169,33.15716300487518,8.297562243072,1.0073319846002278,0.1870578380996009
|
| 206 |
+
Hunyuan-7B-Pretrain,Hunyuan,7.0,NextCoderDataset_v1_long,1024,16.967654067617747,33.73,0.5430698990821838,33.18693010091781,15.643394965504,0.9809731894479596,0.18287960156402308
|
| 207 |
+
Llama-3.1-8B,Llama-3.1,8.0,NextCoderDataset_v1_long,1024,16.968666793195208,34.97,0.5863305926322937,34.383669407367705,15.644149940224,1.016345540976504,0.21825359560416102
|
| 208 |
+
Llama-3.1-70B,Llama-3.1,70.0,NextCoderDataset_v1_long,1024,16.968666793195208,34.97,0.5053007006645203,34.46469929933548,143.712558514176,0.9307192078160197,0.20158420527975623
|
| 209 |
+
Llama-3.2-1B,Llama-3.2,1.0,NextCoderDataset_v1_long,1024,16.968666793195208,34.97,0.7732560038566589,34.19674399614334,2.59946184704,1.0945987886452613,0.23035957052685993
|
| 210 |
+
Llama-3.2-3B,Llama-3.2,3.0,NextCoderDataset_v1_long,1024,16.968666793195208,34.97,0.658105731010437,34.31189426898956,6.759565492224,1.0518645956227757,0.22415325275230538
|
| 211 |
+
Llama-4-109B-A17B,Llama-4,109.0,NextCoderDataset_v1_long,1024,17.624338545312984,34.67,0.6906706690788269,33.979329330921175,41.80362133504,0.9639883435840929,0.1980024989757555
|
| 212 |
+
Qwen1.5-0.5B,Qwen1.5,0.5,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,1.0023809671401978,33.7276190328598,1.001482354688,1.1293256132101457,0.22526560449839214
|
| 213 |
+
Qwen1.5-1.8B,Qwen1.5,1.8,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.8330395221710205,33.896960477828976,3.227030388736,1.0742747314855965,0.21858096599052468
|
| 214 |
+
Qwen1.5-4B,Qwen1.5,4.0,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.7091187834739685,34.02088121652603,7.50725890048,1.0381264440639661,0.21423790892186406
|
| 215 |
+
Qwen1.5-7B,Qwen1.5,7.0,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.6437075138092041,34.08629248619079,14.812000026624,1.0099094116877623,0.20995282718634287
|
| 216 |
+
Qwen1.5-14B,Qwen1.5,14.0,NextCoderDataset_v1_long,1024,17.214319120800766,34.73,0.6092844605445862,34.12071553945541,27.84707477504,0.9843671386280649,0.20542940761171372
|
| 217 |
+
Qwen1.5-14.3B-A2.7B,Qwen1.5,14.3,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.6294852495193481,34.10051475048065,4.966492143616,1.0598330561396874,0.2206817200042637
|
| 218 |
+
Qwen1.5-32B,Qwen1.5,32.0,NextCoderDataset_v1_long,1024,17.214319120800766,34.73,0.5840258002281189,34.14597419977188,65.67474757632,0.9511306395085909,0.19904996620615747
|
| 219 |
+
Qwen1.5-72B,Qwen1.5,72.0,NextCoderDataset_v1_long,1024,17.214319120800766,34.73,0.5431849360466003,34.1868150639534,146.860769542144,0.9224361723777554,0.19391622667330558
|
| 220 |
+
Qwen2-0.5B,Qwen2,0.5,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.8169111013412476,33.91308889865875,1.056685686784,1.1326001879221477,0.2308773998482066
|
| 221 |
+
Qwen2-1.5B,Qwen2,1.5,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.6744095087051392,34.05559049129486,3.251336380416,1.0789319197020253,0.22353163411892654
|
| 222 |
+
Qwen2-7B,Qwen2,7.0,NextCoderDataset_v1_long,1024,17.214319120800766,34.73,0.5678777694702148,34.16212223052978,14.69019324416,1.0125134748472477,0.21227443710841062
|
| 223 |
+
Qwen2-57B-A14B,Qwen2,57.0,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.5394113063812256,34.19058869361877,27.316457570304,0.9871734068568786,0.20761145710576814
|
| 224 |
+
Qwen2-72B,Qwen2,72.0,NextCoderDataset_v1_long,1024,17.214319120800766,34.73,0.498881459236145,34.23111854076385,147.719763001344,0.9234219408138279,0.19506734812697735
|
| 225 |
+
Qwen2.5-0.5B,Qwen2.5,0.5,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.7577647566795349,33.97223524332046,1.056685686784,1.13457550669299,0.23285271861904888
|
| 226 |
+
Qwen2.5-1.5B,Qwen2.5,1.5,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.6171697378158569,34.11283026218414,3.251336380416,1.080745361048892,0.22534507546579333
|
| 227 |
+
Qwen2.5-3B,Qwen2.5,3.0,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.5702103972434998,34.1597896027565,6.473975332864,1.0492048337542028,0.21991019111162846
|
| 228 |
+
Qwen2.5-7B,Qwen2.5,7.0,NextCoderDataset_v1_long,1024,17.214319120800766,34.73,0.518409252166748,34.21159074783325,14.69019324416,1.0139796466504067,0.21374060891156962
|
| 229 |
+
Qwen2.5-14B,Qwen2.5,14.0,NextCoderDataset_v1_long,1024,17.214319120800766,34.73,0.4861307442188263,34.24386925578117,29.16769333248,0.9860185674056425,0.2085800974389975
|
| 230 |
+
Qwen2.5-32B,Qwen2.5,32.0,NextCoderDataset_v1_long,1024,17.214319120800766,34.73,0.46853765845298767,34.26146234154701,66.19014365184,0.9540478412952252,0.20220335029887357
|
| 231 |
+
Qwen2.5-72B,Qwen2.5,72.0,NextCoderDataset_v1_long,1024,17.214319120800766,34.73,0.4511546492576599,34.27884535074234,147.719763001344,0.9247094238227954,0.19635483113594485
|
| 232 |
+
Qwen3-0.6B-Base,Qwen3,0.6,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.7059367895126343,34.02406321048736,1.100258213888,1.1340984203247806,0.23412779778811782
|
| 233 |
+
Qwen3-1.7B-Base,Qwen3,1.7,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.5859696269035339,34.14403037309646,3.643625439232,1.076130850087324,0.22516121835773648
|
| 234 |
+
Qwen3-4B-Base,Qwen3,4.0,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.5191898941993713,34.210810105800626,7.70592210944,1.0427230604032356,0.2197807639823221
|
| 235 |
+
Qwen3-8B-Base,Qwen3,8.0,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.4935953617095947,34.2364046382904,15.808398884864,1.0115420126490078,0.21380537441049505
|
| 236 |
+
Qwen3-14B-Base,Qwen3,14.0,NextCoderDataset_v1_long,1024,17.213104219641906,34.73,0.47131988406181335,34.25868011593818,29.08053569536,0.9865676785135663,0.2090325478628734
|
| 237 |
+
Seed-OSS-36B-Base,Seed-OSS,36.0,NextCoderDataset_v1_long,1024,17.24317398347295,30.29,0.4337354302406311,29.856264569759368,65.5351611392,0.8317125792009394,0.0795675951572656
|
| 238 |
+
gemma-3-0.27b-pt,gemma-3,0.27,NextCoderDataset_v1_long,1024,18.0,29.05,1.393586277961731,27.65641372203827,0.550436864,0.9536107049006791,0.022633561909749286
|
| 239 |
+
gemma-3-1b-pt,gemma-3,1.0,NextCoderDataset_v1_long,1024,18.0,29.05,0.951468288898468,28.098531711101533,2.129873338368,0.9077540269811087,0.035489277332056424
|
| 240 |
+
gemma-3-4b-pt,gemma-3,4.0,NextCoderDataset_v1_long,1024,18.000352177480302,29.05,0.5508195757865906,28.49918042421341,8.4021870592,0.8653447862428527,0.04552088672094608
|
| 241 |
+
gemma-3-12b-pt,gemma-3,12.0,NextCoderDataset_v1_long,1024,18.000352177480302,29.05,0.48889875411987305,28.561101245880128,24.19152912384,0.8288293663843544,0.045302404320676976
|
| 242 |
+
gemma-3-27b-pt,gemma-3,27.0,NextCoderDataset_v1_long,1024,18.000352177480302,29.05,0.4688594937324524,28.58114050626755,58.631962755072,0.799768821665175,0.04424410143140975
|
| 243 |
+
glm-4-9b-hf,glm-4,9.0,NextCoderDataset_v1_long,1024,17.20945336562895,35.01,0.6237372159957886,34.38626278400421,18.321994940416,1.0096193194141354,0.21686897619095954
|
| 244 |
+
internlm2.5-1.8b,internlm2.5,1.8,NextCoderDataset_v1_long,1024,16.497851836951117,34.28,0.9094681143760681,33.37053188562393,3.583512674304,1.0525483663371016,0.20093455363234813
|
| 245 |
+
internlm2.5-7b,internlm2.5,7.0,NextCoderDataset_v1_long,1024,16.497851836951117,34.28,0.6683759689331055,33.611624031066896,15.344575971328,0.9943445508785125,0.19559401002677804
|
| 246 |
+
internlm2.5-20b,internlm2.5,20.0,NextCoderDataset_v1_long,1024,16.497851836951117,34.28,0.5986665487289429,33.68133345127106,40.127812337664,0.9571370124960186,0.18986634090040644
|
public/logo.png
ADDED
|
Git LFS Details
|
scripts/count_column.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env node
|
| 2 |
+
import fs from 'fs/promises'
|
| 3 |
+
import path from 'path'
|
| 4 |
+
|
| 5 |
+
function usage() {
|
| 6 |
+
console.log(`Usage:
|
| 7 |
+
node scripts/count_column.js --file <file.csv> --column <columnName|index> [--out <out.txt>]
|
| 8 |
+
|
| 9 |
+
Options:
|
| 10 |
+
--file CSV 文件路径(必需)。
|
| 11 |
+
--column 指定列名或列序号(1 表示第一列)。如果为数字则按 1-based 处理。
|
| 12 |
+
--out 可选,将统计结果写入指定文件(默认:打印到控制台)。
|
| 13 |
+
--help 显示帮助。
|
| 14 |
+
`)
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
function parseArgs(argv) {
|
| 18 |
+
const args = argv.slice(2)
|
| 19 |
+
const opts = { file: null, column: null, out: null }
|
| 20 |
+
for (let i = 0; i < args.length; i++) {
|
| 21 |
+
const a = args[i]
|
| 22 |
+
if (a === '--help' || a === '-h') { opts.help = true; break }
|
| 23 |
+
if (a === '--file') { opts.file = args[++i]; continue }
|
| 24 |
+
if (a === '--column') { opts.column = args[++i]; continue }
|
| 25 |
+
if (a === '--out') { opts.out = args[++i]; continue }
|
| 26 |
+
// positional file
|
| 27 |
+
if (!opts.file) opts.file = a
|
| 28 |
+
}
|
| 29 |
+
return opts
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
// 重用一个简单的 CSV 单行解析(支持双引号与双引号转义)
|
| 33 |
+
function parseCSVLine(line) {
|
| 34 |
+
const res = []
|
| 35 |
+
let cur = ''
|
| 36 |
+
let inQuotes = false
|
| 37 |
+
for (let i = 0; i < line.length; i++) {
|
| 38 |
+
const ch = line[i]
|
| 39 |
+
if (inQuotes) {
|
| 40 |
+
if (ch === '"') {
|
| 41 |
+
if (i + 1 < line.length && line[i + 1] === '"') { cur += '"'; i++ } else { inQuotes = false }
|
| 42 |
+
} else { cur += ch }
|
| 43 |
+
} else {
|
| 44 |
+
if (ch === ',') { res.push(cur); cur = '' }
|
| 45 |
+
else if (ch === '"') { inQuotes = true }
|
| 46 |
+
else { cur += ch }
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
res.push(cur)
|
| 50 |
+
return res
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
async function readCSV(filePath) {
|
| 54 |
+
const txt = await fs.readFile(filePath, 'utf8')
|
| 55 |
+
const lines = txt.split(/\r?\n/)
|
| 56 |
+
let headerLineIndex = null
|
| 57 |
+
for (let i = 0; i < lines.length; i++) { if (lines[i].trim().length > 0) { headerLineIndex = i; break } }
|
| 58 |
+
if (headerLineIndex === null) return { headers: [], rows: [] }
|
| 59 |
+
const headers = parseCSVLine(lines[headerLineIndex])
|
| 60 |
+
const rows = []
|
| 61 |
+
for (let i = headerLineIndex + 1; i < lines.length; i++) {
|
| 62 |
+
const l = lines[i]
|
| 63 |
+
if (l == null || l.trim() === '') continue
|
| 64 |
+
const vals = parseCSVLine(l)
|
| 65 |
+
rows.push(vals)
|
| 66 |
+
}
|
| 67 |
+
return { headers, rows }
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
function normalizeKey(k) {
|
| 71 |
+
if (k == null) return ''
|
| 72 |
+
return String(k).trim()
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
async function main() {
|
| 76 |
+
const opts = parseArgs(process.argv)
|
| 77 |
+
if (opts.help) { usage(); return }
|
| 78 |
+
if (!opts.file || !opts.column) { console.error('Missing --file or --column'); usage(); process.exit(1) }
|
| 79 |
+
|
| 80 |
+
const filePath = path.isAbsolute(opts.file) ? opts.file : path.join(process.cwd(), opts.file)
|
| 81 |
+
let stat
|
| 82 |
+
try { stat = await fs.stat(filePath) } catch (e) { console.error('File not found:', filePath); process.exit(2) }
|
| 83 |
+
if (!stat.isFile()) { console.error('Not a file:', filePath); process.exit(3) }
|
| 84 |
+
|
| 85 |
+
const { headers, rows } = await readCSV(filePath)
|
| 86 |
+
if (!headers || headers.length === 0) { console.error('No header found in CSV'); process.exit(4) }
|
| 87 |
+
|
| 88 |
+
// 决定列索引:如果 opts.column 是纯数字则按 1-based 处理,否则按列名匹配(优先精确匹配,其次大小写忽略)
|
| 89 |
+
let colIndex = -1
|
| 90 |
+
if (/^\d+$/.test(opts.column)) {
|
| 91 |
+
const idx = parseInt(opts.column, 10)
|
| 92 |
+
colIndex = idx - 1
|
| 93 |
+
if (colIndex < 0 || colIndex >= headers.length) { console.error('Column index out of range'); process.exit(5) }
|
| 94 |
+
} else {
|
| 95 |
+
// 尝试精确匹配
|
| 96 |
+
colIndex = headers.indexOf(opts.column)
|
| 97 |
+
if (colIndex === -1) {
|
| 98 |
+
// 尝试不区分大小写匹配
|
| 99 |
+
const lower = opts.column.toLowerCase()
|
| 100 |
+
colIndex = headers.findIndex(h => String(h).toLowerCase() === lower)
|
| 101 |
+
if (colIndex === -1) { console.error(`Column name not found: ${opts.column}`); process.exit(6) }
|
| 102 |
+
}
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
const counts = new Map()
|
| 106 |
+
for (const vals of rows) {
|
| 107 |
+
const v = normalizeKey(vals[colIndex])
|
| 108 |
+
counts.set(v, (counts.get(v) || 0) + 1)
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
// 排序:按计数降序,再按值字母升序
|
| 112 |
+
const items = Array.from(counts.entries()).sort((a, b) => {
|
| 113 |
+
if (b[1] !== a[1]) return b[1] - a[1]
|
| 114 |
+
return String(a[0]).localeCompare(String(b[0]))
|
| 115 |
+
})
|
| 116 |
+
|
| 117 |
+
const outLines = []
|
| 118 |
+
outLines.push(`File: ${filePath}`)
|
| 119 |
+
outLines.push(`Column: ${headers[colIndex]} (index ${colIndex + 1})`)
|
| 120 |
+
outLines.push(`Total distinct classes: ${items.length}`)
|
| 121 |
+
outLines.push('')
|
| 122 |
+
outLines.push('Value,Count')
|
| 123 |
+
for (const [val, cnt] of items) outLines.push(`${val},${cnt}`)
|
| 124 |
+
|
| 125 |
+
if (opts.out) {
|
| 126 |
+
const outPath = path.isAbsolute(opts.out) ? opts.out : path.join(process.cwd(), opts.out)
|
| 127 |
+
await fs.mkdir(path.dirname(outPath), { recursive: true })
|
| 128 |
+
await fs.writeFile(outPath, outLines.join('\n'), 'utf8')
|
| 129 |
+
console.log(`Wrote counts to ${outPath} (${items.length} distinct)`)
|
| 130 |
+
} else {
|
| 131 |
+
console.log(outLines.join('\n'))
|
| 132 |
+
}
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
main().catch(err => { console.error('Error:', err && err.stack ? err.stack : err); process.exit(10) })
|
scripts/filter_by_series.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env node
|
| 2 |
+
import fs from 'fs/promises'
|
| 3 |
+
import path from 'path'
|
| 4 |
+
|
| 5 |
+
function usage() {
|
| 6 |
+
console.log(`Usage:
|
| 7 |
+
node scripts/filter_by_series.js --file <merged.csv> --series <p3_list.txt> --out <out.csv>
|
| 8 |
+
|
| 9 |
+
Options:
|
| 10 |
+
--file 合并后的 CSV 文件(默认: outdata/merged.csv)
|
| 11 |
+
--series 包含待匹配 series 列表的文件(每行一个值,默认: outdata/p3_model_series.csv)
|
| 12 |
+
--out 输出筛选后的 CSV(默认: outdata/filtered.csv)
|
| 13 |
+
--help 显示帮助
|
| 14 |
+
`)
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
function parseArgs(argv) {
|
| 18 |
+
const args = argv.slice(2)
|
| 19 |
+
const opts = { file: null, series: null, out: null }
|
| 20 |
+
for (let i = 0; i < args.length; i++) {
|
| 21 |
+
const a = args[i]
|
| 22 |
+
if (a === '--help' || a === '-h') { opts.help = true; break }
|
| 23 |
+
if (a === '--file') { opts.file = args[++i]; continue }
|
| 24 |
+
if (a === '--series') { opts.series = args[++i]; continue }
|
| 25 |
+
if (a === '--out') { opts.out = args[++i]; continue }
|
| 26 |
+
if (!opts.file) opts.file = a
|
| 27 |
+
}
|
| 28 |
+
return opts
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
function parseCSVLine(line) {
|
| 32 |
+
const res = []
|
| 33 |
+
let cur = ''
|
| 34 |
+
let inQuotes = false
|
| 35 |
+
for (let i = 0; i < line.length; i++) {
|
| 36 |
+
const ch = line[i]
|
| 37 |
+
if (inQuotes) {
|
| 38 |
+
if (ch === '"') {
|
| 39 |
+
if (i + 1 < line.length && line[i + 1] === '"') { cur += '"'; i++ } else { inQuotes = false }
|
| 40 |
+
} else { cur += ch }
|
| 41 |
+
} else {
|
| 42 |
+
if (ch === ',') { res.push(cur); cur = '' }
|
| 43 |
+
else if (ch === '"') { inQuotes = true }
|
| 44 |
+
else { cur += ch }
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
res.push(cur)
|
| 48 |
+
return res
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
function csvEscape(val) {
|
| 52 |
+
if (val == null) return ''
|
| 53 |
+
const s = String(val)
|
| 54 |
+
if (s.includes('"')) return '"' + s.replace(/"/g, '""') + '"'
|
| 55 |
+
if (s.includes(',') || s.includes('\n') || s.includes('\r')) return '"' + s + '"'
|
| 56 |
+
return s
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
async function readLinesTrim(filePath) {
|
| 60 |
+
const txt = await fs.readFile(filePath, 'utf8')
|
| 61 |
+
return txt.split(/\r?\n/).map(l => l.trim()).filter(l => l.length > 0)
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
async function readCSV(filePath) {
|
| 65 |
+
const txt = await fs.readFile(filePath, 'utf8')
|
| 66 |
+
const lines = txt.split(/\r?\n/)
|
| 67 |
+
let headerIdx = null
|
| 68 |
+
for (let i = 0; i < lines.length; i++) if (lines[i].trim().length > 0) { headerIdx = i; break }
|
| 69 |
+
if (headerIdx === null) return { headers: [], rows: [] }
|
| 70 |
+
const headers = parseCSVLine(lines[headerIdx])
|
| 71 |
+
const rows = []
|
| 72 |
+
for (let i = headerIdx + 1; i < lines.length; i++) {
|
| 73 |
+
const l = lines[i]
|
| 74 |
+
if (!l || l.trim() === '') continue
|
| 75 |
+
rows.push(parseCSVLine(l))
|
| 76 |
+
}
|
| 77 |
+
return { headers, rows }
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
async function main() {
|
| 81 |
+
const opts = parseArgs(process.argv)
|
| 82 |
+
if (opts.help) { usage(); return }
|
| 83 |
+
const cwd = process.cwd()
|
| 84 |
+
const file = opts.file ? (path.isAbsolute(opts.file) ? opts.file : path.join(cwd, opts.file)) : path.join(cwd, 'outdata', 'merged.csv')
|
| 85 |
+
const seriesFile = opts.series ? (path.isAbsolute(opts.series) ? opts.series : path.join(cwd, opts.series)) : path.join(cwd, 'outdata', 'p3_model_series.csv')
|
| 86 |
+
const outPath = opts.out ? (path.isAbsolute(opts.out) ? opts.out : path.join(cwd, opts.out)) : path.join(cwd, 'outdata', 'filtered.csv')
|
| 87 |
+
|
| 88 |
+
// read series list
|
| 89 |
+
let seriesList
|
| 90 |
+
try { seriesList = await readLinesTrim(seriesFile) } catch (e) { console.error('Failed to read series list:', seriesFile); process.exit(2) }
|
| 91 |
+
// normalize to lowercase for case-insensitive contains
|
| 92 |
+
const seriesLower = seriesList.map(s => s.toLowerCase())
|
| 93 |
+
|
| 94 |
+
// read CSV
|
| 95 |
+
let headers, rows
|
| 96 |
+
try { ({ headers, rows } = await readCSV(file)) } catch (e) { console.error('Failed to read CSV:', file); process.exit(3) }
|
| 97 |
+
if (!headers || headers.length === 0) { console.error('No header found in CSV'); process.exit(4) }
|
| 98 |
+
|
| 99 |
+
// find model_series column index (case-insensitive)
|
| 100 |
+
let colIndex = headers.indexOf('model_series')
|
| 101 |
+
if (colIndex === -1) {
|
| 102 |
+
colIndex = headers.findIndex(h => String(h).toLowerCase() === 'model_series')
|
| 103 |
+
}
|
| 104 |
+
if (colIndex === -1) {
|
| 105 |
+
console.error('Could not find column "model_series" in CSV headers:', headers)
|
| 106 |
+
process.exit(5)
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
const kept = []
|
| 110 |
+
const removed = []
|
| 111 |
+
for (let i = 0; i < rows.length; i++) {
|
| 112 |
+
const row = rows[i]
|
| 113 |
+
const cell = (row[colIndex] || '').toString()
|
| 114 |
+
const cellLower = cell.toLowerCase()
|
| 115 |
+
const matched = seriesLower.some(s => cellLower.includes(s))
|
| 116 |
+
if (matched) kept.push(row)
|
| 117 |
+
else removed.push({ index: i + 1, row, value: cell })
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
// write out CSV: header then kept rows
|
| 121 |
+
const outLines = []
|
| 122 |
+
outLines.push(headers.map(csvEscape).join(','))
|
| 123 |
+
for (const r of kept) outLines.push(r.map(csvEscape).join(','))
|
| 124 |
+
await fs.mkdir(path.dirname(outPath), { recursive: true })
|
| 125 |
+
await fs.writeFile(outPath, outLines.join('\n'), 'utf8')
|
| 126 |
+
console.log(`Wrote filtered CSV to ${outPath} (${kept.length} rows kept, ${removed.length} removed)`)
|
| 127 |
+
|
| 128 |
+
// write removed rows log
|
| 129 |
+
if (removed.length > 0) {
|
| 130 |
+
const logPath = path.join(path.dirname(outPath), 'filtered_removed_rows.log')
|
| 131 |
+
const logLines = []
|
| 132 |
+
logLines.push(`Removed ${removed.length} rows from ${file} by series filtering:`)
|
| 133 |
+
for (const it of removed) {
|
| 134 |
+
logLines.push(`row=${it.index} value="${it.value}" csv=${JSON.stringify(it.row)}`)
|
| 135 |
+
}
|
| 136 |
+
await fs.writeFile(logPath, logLines.join('\n'), 'utf8')
|
| 137 |
+
console.log(`Wrote removal log to ${logPath}`)
|
| 138 |
+
} else {
|
| 139 |
+
console.log('No rows were removed by series filtering.')
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
main().catch(err => { console.error('Error:', err && err.stack ? err.stack : err); process.exit(10) })
|
scripts/merge_csv.js
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env node
|
| 2 |
+
/*
|
| 3 |
+
scripts/merge_csv.js
|
| 4 |
+
简单的 Node 脚本:合并指定目录或指定多个 CSV 文件为一个 CSV 文件(基本合并,处理不同表头)
|
| 5 |
+
|
| 6 |
+
用法示例:
|
| 7 |
+
node scripts/merge_csv.js --inputDir ./data --out merged.csv
|
| 8 |
+
node scripts/merge_csv.js file1.csv file2.csv --out merged.csv
|
| 9 |
+
|
| 10 |
+
限制说明:这是一个轻量实现,处理常见 CSV(含双引号字段)。不保证对包含任意换行的复杂嵌套引用字段 100% 兼容。
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
import fs from 'fs/promises'
|
| 14 |
+
import path from 'path'
|
| 15 |
+
|
| 16 |
+
function usage() {
|
| 17 |
+
console.log(`Usage:\n node scripts/merge_csv.js --inputDir <dir> --out <out.csv>\n node scripts/merge_csv.js <file1.csv> <file2.csv> --out <out.csv>\n\nOptions:\n --inputDir 读取指定目录下的所有 .csv 文件(非递归)\n --out 输出文件路径(默认: merged.csv)\n --help 显示帮助\n`)
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
function parseArgs(argv) {
|
| 21 |
+
const args = argv.slice(2)
|
| 22 |
+
const opts = { files: [], inputDir: null, out: 'merged.csv' }
|
| 23 |
+
for (let i = 0; i < args.length; i++) {
|
| 24 |
+
const a = args[i]
|
| 25 |
+
if (a === '--help' || a === '-h') { opts.help = true; break }
|
| 26 |
+
if (a === '--inputDir') { opts.inputDir = args[++i]; continue }
|
| 27 |
+
if (a === '--out') { opts.out = args[++i]; continue }
|
| 28 |
+
if (a.startsWith('--')) {
|
| 29 |
+
console.warn('Unknown option', a)
|
| 30 |
+
continue
|
| 31 |
+
}
|
| 32 |
+
opts.files.push(a)
|
| 33 |
+
}
|
| 34 |
+
return opts
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
// 基本的单行 CSV 字段解析,支持双引号包含和双引号转义("")
|
| 38 |
+
function parseCSVLine(line) {
|
| 39 |
+
const res = []
|
| 40 |
+
let cur = ''
|
| 41 |
+
let inQuotes = false
|
| 42 |
+
for (let i = 0; i < line.length; i++) {
|
| 43 |
+
const ch = line[i]
|
| 44 |
+
if (inQuotes) {
|
| 45 |
+
if (ch === '"') {
|
| 46 |
+
if (i + 1 < line.length && line[i + 1] === '"') {
|
| 47 |
+
cur += '"'
|
| 48 |
+
i++
|
| 49 |
+
} else {
|
| 50 |
+
inQuotes = false
|
| 51 |
+
}
|
| 52 |
+
} else {
|
| 53 |
+
cur += ch
|
| 54 |
+
}
|
| 55 |
+
} else {
|
| 56 |
+
if (ch === ',') {
|
| 57 |
+
res.push(cur)
|
| 58 |
+
cur = ''
|
| 59 |
+
} else if (ch === '"') {
|
| 60 |
+
inQuotes = true
|
| 61 |
+
} else {
|
| 62 |
+
cur += ch
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
res.push(cur)
|
| 67 |
+
return res
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
function csvEscape(value) {
|
| 71 |
+
if (value == null) return ''
|
| 72 |
+
const s = String(value)
|
| 73 |
+
if (s.includes('"')) return '"' + s.replace(/"/g, '""') + '"'
|
| 74 |
+
if (s.includes(',') || s.includes('\n') || s.includes('\r')) return '"' + s + '"'
|
| 75 |
+
return s
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
async function readCSVFile(filePath) {
|
| 79 |
+
const txt = await fs.readFile(filePath, 'utf8')
|
| 80 |
+
// 兼容 CRLF
|
| 81 |
+
const lines = txt.split(/\r?\n/)
|
| 82 |
+
// 找到第一行非空作为 header
|
| 83 |
+
let headerLineIndex = null
|
| 84 |
+
for (let i = 0; i < lines.length; i++) {
|
| 85 |
+
if (lines[i].trim().length > 0) { headerLineIndex = i; break }
|
| 86 |
+
}
|
| 87 |
+
if (headerLineIndex === null) return { headers: [], rows: [] }
|
| 88 |
+
const headers = parseCSVLine(lines[headerLineIndex])
|
| 89 |
+
const rows = []
|
| 90 |
+
for (let i = headerLineIndex + 1; i < lines.length; i++) {
|
| 91 |
+
const l = lines[i]
|
| 92 |
+
if (l == null || l.trim() === '') continue
|
| 93 |
+
const vals = parseCSVLine(l)
|
| 94 |
+
const obj = {}
|
| 95 |
+
for (let j = 0; j < headers.length; j++) {
|
| 96 |
+
obj[headers[j]] = vals[j] ?? ''
|
| 97 |
+
}
|
| 98 |
+
rows.push(obj)
|
| 99 |
+
}
|
| 100 |
+
return { headers, rows }
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
async function main() {
|
| 104 |
+
const opts = parseArgs(process.argv)
|
| 105 |
+
if (opts.help) { usage(); return }
|
| 106 |
+
|
| 107 |
+
const cwd = process.cwd()
|
| 108 |
+
let files = []
|
| 109 |
+
if (opts.inputDir) {
|
| 110 |
+
const dir = path.isAbsolute(opts.inputDir) ? opts.inputDir : path.join(cwd, opts.inputDir)
|
| 111 |
+
try {
|
| 112 |
+
const names = await fs.readdir(dir)
|
| 113 |
+
files = names.filter(n => n.toLowerCase().endsWith('.csv')).map(n => path.join(dir, n))
|
| 114 |
+
} catch (e) {
|
| 115 |
+
console.error('Failed to read inputDir', e.message)
|
| 116 |
+
process.exit(2)
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
if (opts.files && opts.files.length) {
|
| 120 |
+
const explicit = opts.files.map(f => path.isAbsolute(f) ? f : path.join(cwd, f))
|
| 121 |
+
files = files.concat(explicit)
|
| 122 |
+
}
|
| 123 |
+
// 去重并保持顺序
|
| 124 |
+
files = [...new Set(files)]
|
| 125 |
+
if (files.length === 0) {
|
| 126 |
+
console.error('No CSV files specified. Use --inputDir or pass file paths.')
|
| 127 |
+
usage();
|
| 128 |
+
process.exit(1)
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
const allRows = []
|
| 132 |
+
const headerOrder = []
|
| 133 |
+
const headerSet = new Set()
|
| 134 |
+
|
| 135 |
+
// 先读取所有文件内容到内存,标记文件名最后字符
|
| 136 |
+
const fileDatas = []
|
| 137 |
+
for (const f of files) {
|
| 138 |
+
try {
|
| 139 |
+
const stat = await fs.stat(f)
|
| 140 |
+
if (!stat.isFile()) { console.warn('Skipping (not a file):', f); continue }
|
| 141 |
+
} catch (e) { console.warn('Skipping (not found):', f); continue }
|
| 142 |
+
const { headers, rows } = await readCSVFile(f)
|
| 143 |
+
const base = path.basename(f)
|
| 144 |
+
const nameNoExt = base.replace(/\.[^/.]+$/, '')
|
| 145 |
+
const lastChar = nameNoExt.slice(-1)
|
| 146 |
+
fileDatas.push({ path: f, headers, rows, nameNoExt, lastChar })
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
// 找到文件3(末尾字符为 '3')并创建第一列值的集合
|
| 150 |
+
let file3Set = null
|
| 151 |
+
const file3 = fileDatas.find(d => d.lastChar === '3')
|
| 152 |
+
if (file3) {
|
| 153 |
+
const firstHdr = file3.headers && file3.headers.length > 0 ? file3.headers[0] : null
|
| 154 |
+
file3Set = new Set()
|
| 155 |
+
if (firstHdr) {
|
| 156 |
+
for (const r of file3.rows) {
|
| 157 |
+
const v = r[firstHdr]
|
| 158 |
+
if (v != null) file3Set.add(String(v))
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
// 现在按原顺序合并表头并收集行。对文件0(末尾字符为 '0')如果存在 file3Set,进行过滤:
|
| 164 |
+
const removedRows = []
|
| 165 |
+
for (const d of fileDatas) {
|
| 166 |
+
const { headers, rows, lastChar } = d
|
| 167 |
+
for (const h of headers) {
|
| 168 |
+
if (!headerSet.has(h)) {
|
| 169 |
+
headerSet.add(h)
|
| 170 |
+
headerOrder.push(h)
|
| 171 |
+
}
|
| 172 |
+
}
|
| 173 |
+
if (lastChar === '0' && file3Set) {
|
| 174 |
+
// 使用此文件自身的第一列作为 model_name 字段
|
| 175 |
+
const firstHdr = headers && headers.length > 0 ? headers[0] : null
|
| 176 |
+
if (!firstHdr) continue
|
| 177 |
+
for (const r of rows) {
|
| 178 |
+
const val = r[firstHdr]
|
| 179 |
+
if (val != null && file3Set.has(String(val))) {
|
| 180 |
+
allRows.push(r)
|
| 181 |
+
} else {
|
| 182 |
+
// 记录被删除的行信息,便于日志输出
|
| 183 |
+
removedRows.push({ source: d.path, key: firstHdr, value: val, row: r })
|
| 184 |
+
}
|
| 185 |
+
}
|
| 186 |
+
} else {
|
| 187 |
+
for (const r of rows) allRows.push(r)
|
| 188 |
+
}
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
// 另外一遍,确保所有行都有 headerOrder 中的字段(填空)
|
| 192 |
+
const outRows = allRows.map(r => {
|
| 193 |
+
const o = {}
|
| 194 |
+
for (const h of headerOrder) o[h] = (h in r) ? r[h] : ''
|
| 195 |
+
// 也把那些在 headerOrder 之后才出现的字段加上(理论上我们已把所有文件头收集到 headerOrder)
|
| 196 |
+
for (const k of Object.keys(r)) if (!headerSet.has(k)) { headerSet.add(k); headerOrder.push(k); o[k] = r[k] }
|
| 197 |
+
return o
|
| 198 |
+
})
|
| 199 |
+
|
| 200 |
+
// 写出 CSV
|
| 201 |
+
let outPath = path.isAbsolute(opts.out) ? opts.out : path.join(cwd, opts.out)
|
| 202 |
+
// 如果用户传入的 out 以路径分隔符结尾或显式是目录,写入该目录下的 merged.csv
|
| 203 |
+
const looksLikeDir = opts.out.endsWith('/') || opts.out.endsWith('\\')
|
| 204 |
+
if (looksLikeDir) {
|
| 205 |
+
outPath = path.join(outPath, 'merged.csv')
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
try {
|
| 209 |
+
const st = await fs.stat(outPath)
|
| 210 |
+
if (st.isDirectory()) {
|
| 211 |
+
outPath = path.join(outPath, 'merged.csv')
|
| 212 |
+
}
|
| 213 |
+
} catch (e) {
|
| 214 |
+
// not exists -> will create parent directory below
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
const headerLine = headerOrder.map(csvEscape).join(',')
|
| 218 |
+
const lines = [headerLine]
|
| 219 |
+
for (const r of outRows) {
|
| 220 |
+
const vals = headerOrder.map(h => csvEscape(r[h]))
|
| 221 |
+
lines.push(vals.join(','))
|
| 222 |
+
}
|
| 223 |
+
await fs.mkdir(path.dirname(outPath), { recursive: true })
|
| 224 |
+
await fs.writeFile(outPath, lines.join('\n'), 'utf8')
|
| 225 |
+
console.log(`Wrote merged CSV to ${outPath} (${outRows.length} rows, ${headerOrder.length} columns)`)
|
| 226 |
+
|
| 227 |
+
// 如果有被删除的行,打印并写日志
|
| 228 |
+
if (removedRows.length > 0) {
|
| 229 |
+
console.log(`Removed ${removedRows.length} rows from files (not present in file3). Logging to removed_rows.log`)
|
| 230 |
+
const logLines = []
|
| 231 |
+
logLines.push(`Removed ${removedRows.length} rows - details:`)
|
| 232 |
+
for (const it of removedRows) {
|
| 233 |
+
logLines.push(`source=${it.source} ${it.key}=${it.value} row=${JSON.stringify(it.row)}`)
|
| 234 |
+
}
|
| 235 |
+
// 写入到输出目录下的 removed_rows.log
|
| 236 |
+
const logPath = path.join(path.dirname(outPath), 'removed_rows.log')
|
| 237 |
+
await fs.writeFile(logPath, logLines.join('\n'), 'utf8')
|
| 238 |
+
for (let i = 0; i < Math.min(50, logLines.length); i++) console.log(logLines[i])
|
| 239 |
+
if (logLines.length > 50) console.log(`... see ${logPath} for full log`)
|
| 240 |
+
} else {
|
| 241 |
+
console.log('No rows were removed by file3 filtering.')
|
| 242 |
+
}
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
main().catch(err => {
|
| 246 |
+
console.error('Error:', err && err.stack ? err.stack : err)
|
| 247 |
+
process.exit(3)
|
| 248 |
+
})
|
src/App.vue
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<script setup>
|
| 2 |
+
// 这里可以添加全局的逻辑,比如主题切换等,如果需要的话
|
| 3 |
+
</script>
|
| 4 |
+
|
| 5 |
+
<template>
|
| 6 |
+
<div id="app">
|
| 7 |
+
<router-view />
|
| 8 |
+
</div>
|
| 9 |
+
</template>
|
| 10 |
+
|
| 11 |
+
<style>
|
| 12 |
+
/* 全局样式 */
|
| 13 |
+
</style>
|
src/components/Chart.vue
ADDED
|
@@ -0,0 +1,329 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<script setup>
|
| 2 |
+
import { ref, onMounted, onBeforeUnmount, watch } from 'vue'
|
| 3 |
+
import { useLeaderboardData } from '@/composables/useLeaderboardData.js'
|
| 4 |
+
import * as echarts from 'echarts'
|
| 5 |
+
|
| 6 |
+
const chartRef = ref(null)
|
| 7 |
+
let chart = null
|
| 8 |
+
|
| 9 |
+
// 独立监听主题变化
|
| 10 |
+
const isDarkChart = ref(document.documentElement.classList.contains('dark'))
|
| 11 |
+
|
| 12 |
+
let themeObserver = null
|
| 13 |
+
|
| 14 |
+
const { leaderboard, selectedDataNameChart, modelTypeGroups, strtSymbolSeries } = useLeaderboardData()
|
| 15 |
+
|
| 16 |
+
// 接受一个可选 prop:autoShowSeries(数组),用于指定哪些模型类型在图表加载时自动显示。
|
| 17 |
+
// 例如:<Chart :autoShowSeries="['gemma-3','Hunyuan']" />
|
| 18 |
+
const props = defineProps({
|
| 19 |
+
autoShowSeries: { type: Array, default: () => [] }
|
| 20 |
+
})
|
| 21 |
+
|
| 22 |
+
// 把 leaderboard 转成 ECharts 所需的 series 数组(每个 model_series 一条线)
|
| 23 |
+
function buildSeriesFromLeaderboard(rows = []) {
|
| 24 |
+
const groups = {}
|
| 25 |
+
rows.forEach(r => {
|
| 26 |
+
// 按 model_type 分组;如果 model_type 未填则标记为 未知
|
| 27 |
+
// 优化:如果行上有 _isMoE 标记,则把其归为 "<model_type> (MoE)" 系列,且保留 model_series_base
|
| 28 |
+
const baseType = r.model_type || '未知'
|
| 29 |
+
const isMoE = !!r._isMoE
|
| 30 |
+
const seriesName = isMoE ? `${baseType} (MoE)` : baseType
|
| 31 |
+
if (!groups[seriesName]) groups[seriesName] = []
|
| 32 |
+
// 数据原本单位为 FLOPs (G),转换为 FLOPs(1 TFLOP = 1e12 FLOPs)用于对数尺度显示
|
| 33 |
+
const xRaw = parseFloat(r.BF16_TFLOPs) || 0
|
| 34 |
+
const x = xRaw > 0 ? xRaw * 1e12 / 1024 : 0
|
| 35 |
+
// const x = xRaw
|
| 36 |
+
const y = parseFloat(r.ic) || 0
|
| 37 |
+
const rank = Number(r.rank) || 0
|
| 38 |
+
groups[seriesName].push({ x, y, rank })
|
| 39 |
+
})
|
| 40 |
+
|
| 41 |
+
return Object.keys(groups).map(name => {
|
| 42 |
+
// 过滤掉 x<=0 的点(对数坐标轴不能显示 0 或负值),并按 x 轴值排序
|
| 43 |
+
const data = groups[name]
|
| 44 |
+
.filter(p => Number.isFinite(p.x) && p.x > 0 && Number.isFinite(p.y))
|
| 45 |
+
.sort((a, b) => a.x - b.x)
|
| 46 |
+
.map(d => [d.x, d.y])
|
| 47 |
+
// 根据该系列的样本点数量适度放大 symbolSize,避免点太小难以点击
|
| 48 |
+
const count = groups[name].length || 1
|
| 49 |
+
const symbolSize = Math.min(18, 6 + Math.sqrt(count) * 1.6)
|
| 50 |
+
return { name, rawCount: count, type: 'line', showSymbol: true, symbolSize, data }
|
| 51 |
+
})
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
function getChartOption(series, isDark = false) {
|
| 55 |
+
// 根据主题设置颜色
|
| 56 |
+
const titleColor = isDark ? '#cfd8dc' : '#333333'
|
| 57 |
+
const legendColor = isDark ? '#cfd8dc' : '#333333'
|
| 58 |
+
const axisLineColor = isDark ? '#78909c' : '#666666'
|
| 59 |
+
const axisLabelColor = isDark ? '#b0bec5' : '#666666'
|
| 60 |
+
const splitLineColor = isDark ? '#37474f' : '#cccccc'
|
| 61 |
+
// 计算数据范围以自动缩放坐标轴,避免留太多空白
|
| 62 |
+
const allX = []
|
| 63 |
+
const allY = []
|
| 64 |
+
series.forEach(s => {
|
| 65 |
+
if (Array.isArray(s.data)) {
|
| 66 |
+
s.data.forEach(d => {
|
| 67 |
+
const x = Number(d[0])
|
| 68 |
+
const y = Number(d[1])
|
| 69 |
+
if (Number.isFinite(x)) allX.push(x)
|
| 70 |
+
if (Number.isFinite(y)) allY.push(y)
|
| 71 |
+
})
|
| 72 |
+
}
|
| 73 |
+
})
|
| 74 |
+
let xMin = allX.length ? Math.min(...allX) : undefined
|
| 75 |
+
let xMax = allX.length ? Math.max(...allX) : undefined
|
| 76 |
+
let yMin = allY.length ? Math.min(...allY) : undefined
|
| 77 |
+
let yMax = allY.length ? Math.max(...allY) : undefined
|
| 78 |
+
|
| 79 |
+
// 对数轴不能为 0 或负值,确保 min>0;并添加一些 padding
|
| 80 |
+
if (xMin !== undefined && xMax !== undefined) {
|
| 81 |
+
// 防止极值过于接近或相等
|
| 82 |
+
if (xMin <= 0) xMin = Math.min(...allX.filter(v => v > 0)) || xMax
|
| 83 |
+
if (xMin === xMax) {
|
| 84 |
+
xMin = xMin / 10
|
| 85 |
+
xMax = xMax * 10
|
| 86 |
+
} else {
|
| 87 |
+
xMin = xMin * 0.8
|
| 88 |
+
xMax = xMax * 1.15
|
| 89 |
+
}
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
if (yMin !== undefined && yMax !== undefined) {
|
| 93 |
+
if (yMin === yMax) {
|
| 94 |
+
// small symmetric padding
|
| 95 |
+
// 如果只有单一数值,使用该值作为中心;但若该值为 0,则不要把区间提升到以 1 为中心(之前用 `yMin || 1` 会导致 0 -> 1)
|
| 96 |
+
const v = (yMin !== undefined ? yMin : 1)
|
| 97 |
+
if (v === 0) {
|
| 98 |
+
// 为 0 时给一个小的对称 padding(之后如果原始数据全为正,会被下限为 0)
|
| 99 |
+
const pad = 0.05
|
| 100 |
+
yMin = -pad
|
| 101 |
+
yMax = pad
|
| 102 |
+
} else {
|
| 103 |
+
yMin = v - Math.abs(v) * 0.05
|
| 104 |
+
yMax = v + Math.abs(v) * 0.05
|
| 105 |
+
}
|
| 106 |
+
} else {
|
| 107 |
+
const pad = (yMax - yMin) * 0.08
|
| 108 |
+
yMin = yMin - pad
|
| 109 |
+
yMax = yMax + pad
|
| 110 |
+
}
|
| 111 |
+
// 如果 yMin 变为负但原数据全为正,可以下限为 0
|
| 112 |
+
if (yMin < 0 && Math.min(...allY) >= 0) yMin = 0
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
// helper: 将整数指数转换为 Unicode 上标字符,例如 9 -> '⁹', -3 -> '⁻³'
|
| 116 |
+
function toSuperscript(n) {
|
| 117 |
+
const map = { '0': '⁰', '1': '¹', '2': '²', '3': '³', '4': '⁴', '5': '⁵', '6': '⁶', '7': '⁷', '8': '⁸', '9': '⁹', '-': '⁻' }
|
| 118 |
+
const s = String(n)
|
| 119 |
+
return s.split('').map(ch => map[ch] || ch).join('')
|
| 120 |
+
}
|
| 121 |
+
// 可循环使用的视觉样式(颜色/符号/线型)
|
| 122 |
+
// 7 种颜色从红到紫,重复使用
|
| 123 |
+
const colors = ['#1F77B4', '#ff7f0e', '#2CA02C', '#D62728', '#9467BD', '#8C564B', '#E377C2', '#7F7F7F', '#BCBD22', '#17BECF']
|
| 124 |
+
const lineStyles = ['solid', 'solid', 'solid', 'solid', 'dash', 'solid', 'solid']
|
| 125 |
+
|
| 126 |
+
// 先构建不带颜色/符号的基础 series(rawSeries),后面会在排序后按顺序分配颜色和符号
|
| 127 |
+
const rawSeries = series.map(s => {
|
| 128 |
+
const baseSize = Number(s.symbolSize) || 8
|
| 129 |
+
return Object.assign({}, s, { symbolSize: baseSize, hoverAnimation: true })
|
| 130 |
+
})
|
| 131 |
+
|
| 132 |
+
// 构建 legend.selected 映射:只有 props.autoShowSeries 中的系列会默认显示,其他需手动点击 legend 打开
|
| 133 |
+
const legendSelected = {}
|
| 134 |
+
if (props.autoShowSeries.includes("*")) {
|
| 135 |
+
rawSeries.forEach(s => {
|
| 136 |
+
const name = String(s.name)
|
| 137 |
+
legendSelected[name] = true
|
| 138 |
+
})
|
| 139 |
+
}
|
| 140 |
+
else {
|
| 141 |
+
rawSeries.forEach(s => {
|
| 142 |
+
const name = String(s.name)
|
| 143 |
+
legendSelected[name] = Array.isArray(props.autoShowSeries) && props.autoShowSeries.includes(name)
|
| 144 |
+
})
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
// 按 modelTypeMapping 的定义顺序对 series 排序(使用来自 useLeaderboardData 的 modelTypeGroups)
|
| 149 |
+
const preferredOrder = (modelTypeGroups && Array.isArray(modelTypeGroups.value)) ? modelTypeGroups.value : []
|
| 150 |
+
const orderIndex = {}
|
| 151 |
+
preferredOrder.forEach((n, i) => { orderIndex[String(n)] = i })
|
| 152 |
+
// console.log('Preferred series order:', preferredOrder)
|
| 153 |
+
const inOrder = []
|
| 154 |
+
const rest = []
|
| 155 |
+
rawSeries.forEach(s => {
|
| 156 |
+
const name = String(s.name)
|
| 157 |
+
if (Object.prototype.hasOwnProperty.call(orderIndex, name)) {
|
| 158 |
+
inOrder.push(s)
|
| 159 |
+
} else {
|
| 160 |
+
rest.push(s)
|
| 161 |
+
}
|
| 162 |
+
})
|
| 163 |
+
// 按映射顺序排序 inOrder
|
| 164 |
+
inOrder.sort((a, b) => orderIndex[String(a.name)] - orderIndex[String(b.name)])
|
| 165 |
+
// 其余的按名字字母序 (目前全部指定映射了)
|
| 166 |
+
rest.sort((a, b) => String(a.name).localeCompare(String(b.name)))
|
| 167 |
+
|
| 168 |
+
// console.log('Final series order:', inOrder.map(s => s.name), rest.map(s => s.name))
|
| 169 |
+
|
| 170 |
+
const finalSeries = [...inOrder, ...rest]
|
| 171 |
+
|
| 172 |
+
// 现在按 finalSeries 顺序分配颜色和符号,保证颜色顺序与 modelTypeMapping 一致
|
| 173 |
+
const finalSeriesStyled = finalSeries.map((s, idx) => {
|
| 174 |
+
const color = colors[idx % colors.length]
|
| 175 |
+
const lineType = lineStyles[idx % lineStyles.length] || 'solid'
|
| 176 |
+
// 如果 series 名称包含 (MoE) 则使用星形
|
| 177 |
+
const isMoESeries = String(s.name).includes('(MoE)')
|
| 178 |
+
const symbolShape = strtSymbolSeries.includes(String(s.name)) ?
|
| 179 |
+
'path://M341.5 45.1C337.4 37.1 329.1 32 320.1 32C311.1 32 302.8 37.1 298.7 45.1L225.1 189.3L65.2 214.7C56.3 216.1 48.9 222.4 46.1 231C43.3 239.6 45.6 249 51.9 255.4L166.3 369.9L141.1 529.8C139.7 538.7 143.4 547.7 150.7 553C158 558.3 167.6 559.1 175.7 555L320.1 481.6L464.4 555C472.4 559.1 482.1 558.3 489.4 553C496.7 547.7 500.4 538.8 499 529.8L473.7 369.9L588.1 255.4C594.5 249 596.7 239.6 593.9 231C591.1 222.4 583.8 216.1 574.8 214.7L415 189.3L341.5 45.1z'
|
| 180 |
+
: 'circle'
|
| 181 |
+
// console.log(`Series "${s.name}" uses symbol "${symbolShape}"`)
|
| 182 |
+
const baseSize = Number(s.symbolSize) || 8
|
| 183 |
+
const emphasisSize = Math.max(12, Math.round(baseSize * 1.6))
|
| 184 |
+
// 如果是星形,增大尺寸以匹配视觉效果
|
| 185 |
+
const adjustedBaseSize = symbolShape !== 'circle' ? baseSize * 1.5 : baseSize
|
| 186 |
+
const adjustedEmphasisSize = symbolShape !== 'circle' ? emphasisSize * 1.5 : emphasisSize
|
| 187 |
+
return Object.assign({}, s, {
|
| 188 |
+
lineStyle: { width: 2, type: lineType, color },
|
| 189 |
+
itemStyle: {
|
| 190 |
+
borderColor: '#f3f3f3', // 高亮时拐点边框颜色
|
| 191 |
+
borderWidth: symbolShape !== 'circle' ? 1 : 0, // 拐点边框宽度
|
| 192 |
+
borderCap: 'round',
|
| 193 |
+
borderRadius: 1,
|
| 194 |
+
shadowBlur: 0, // 阴影大小
|
| 195 |
+
shadowColor: '#45DB76'
|
| 196 |
+
}, // 阴影颜色 },
|
| 197 |
+
symbol: symbolShape,
|
| 198 |
+
symbolSize: adjustedBaseSize,
|
| 199 |
+
hoverAnimation: true,
|
| 200 |
+
emphasis: {
|
| 201 |
+
focus: 'series',
|
| 202 |
+
symbolSize: adjustedEmphasisSize,
|
| 203 |
+
itemStyle: { borderWidth: 2, borderColor: '#ffffff' }
|
| 204 |
+
}
|
| 205 |
+
})
|
| 206 |
+
})
|
| 207 |
+
const legendData = finalSeriesStyled.map(s => String(s.name))
|
| 208 |
+
|
| 209 |
+
return {
|
| 210 |
+
color: colors,
|
| 211 |
+
tooltip: {
|
| 212 |
+
trigger: 'item',
|
| 213 |
+
formatter: params => {
|
| 214 |
+
if (!params) return ''
|
| 215 |
+
const x = params.data && Array.isArray(params.data) ? params.data[0] : ''
|
| 216 |
+
const y = params.data && Array.isArray(params.data) ? params.data[1] : ''
|
| 217 |
+
// 显示 X 为 mantissa×10^n,并把指数用上标显示
|
| 218 |
+
let xStr = ''
|
| 219 |
+
if (typeof x === 'number' && Number.isFinite(x) && x > 0) {
|
| 220 |
+
const exp = Math.floor(Math.log10(x))
|
| 221 |
+
const mant = x / Math.pow(10, exp)
|
| 222 |
+
const mantStr = mant >= 10 ? mant.toFixed(0) : mant.toFixed(2)
|
| 223 |
+
xStr = `${mantStr}×10${toSuperscript(exp)}`
|
| 224 |
+
} else {
|
| 225 |
+
xStr = String(x)
|
| 226 |
+
}
|
| 227 |
+
const yStr = (typeof y === 'number' && Number.isFinite(y)) ? Number(y).toFixed(4) : String(y)
|
| 228 |
+
return `${params.seriesName}<br/>FLOPs: ${xStr}<br/>IC: ${yStr}`
|
| 229 |
+
}
|
| 230 |
+
},
|
| 231 |
+
legend: Object.assign({
|
| 232 |
+
orient: 'vertical',
|
| 233 |
+
right: 10,
|
| 234 |
+
top: '10%',
|
| 235 |
+
align: 'left',
|
| 236 |
+
itemWidth: 14,
|
| 237 |
+
itemHeight: 10,
|
| 238 |
+
textStyle: { color: legendColor },
|
| 239 |
+
tooltip: { show: true }
|
| 240 |
+
}, { selected: legendSelected, data: legendData }),
|
| 241 |
+
grid: { left: '6%', right: '20%', bottom: '8%', containLabel: true },
|
| 242 |
+
xAxis: {
|
| 243 |
+
type: 'log',
|
| 244 |
+
name: 'FLOPs',
|
| 245 |
+
nameLocation: 'middle',
|
| 246 |
+
nameGap: 30,
|
| 247 |
+
axisLine: { lineStyle: { color: axisLineColor } },
|
| 248 |
+
axisLabel: {
|
| 249 |
+
color: axisLabelColor,
|
| 250 |
+
formatter: value => {
|
| 251 |
+
if (!Number.isFinite(value) || value <= 0) return String(value)
|
| 252 |
+
const exp = Math.floor(Math.log10(value))
|
| 253 |
+
const mant = value / Math.pow(10, exp)
|
| 254 |
+
if (Math.abs(mant - 1) < 1e-6) return `10${toSuperscript(exp)}`
|
| 255 |
+
return `${mant.toFixed(2)}×10${toSuperscript(exp)}`
|
| 256 |
+
}
|
| 257 |
+
},
|
| 258 |
+
splitLine: { show: true, lineStyle: { type: 'dashed', color: splitLineColor } },
|
| 259 |
+
min: xMin,
|
| 260 |
+
max: xMax
|
| 261 |
+
},
|
| 262 |
+
yAxis: {
|
| 263 |
+
type: 'value',
|
| 264 |
+
name: 'Information capacity',
|
| 265 |
+
axisLine: { lineStyle: { color: axisLineColor } },
|
| 266 |
+
axisLabel: { color: axisLabelColor, formatter: v => (Number.isFinite(v) ? Number(v).toFixed(2) : String(v)) },
|
| 267 |
+
splitLine: { show: true, lineStyle: { type: 'dashed', color: splitLineColor } },
|
| 268 |
+
min: yMin,
|
| 269 |
+
max: yMax
|
| 270 |
+
},
|
| 271 |
+
series: finalSeriesStyled
|
| 272 |
+
}
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
let resizeHandler = null
|
| 276 |
+
|
| 277 |
+
function renderChart() {
|
| 278 |
+
if (!chart) return
|
| 279 |
+
let rows = leaderboard.value || []
|
| 280 |
+
// 根据 selectedDataNameChart 过滤数据集(如果未选择或为 'all' 则使用全部)
|
| 281 |
+
const sel = selectedDataNameChart && selectedDataNameChart.value ? String(selectedDataNameChart.value) : ''
|
| 282 |
+
if (sel && sel !== 'all') {
|
| 283 |
+
rows = rows.filter(r => String(r.data_name ?? '') === sel)
|
| 284 |
+
}
|
| 285 |
+
const series = buildSeriesFromLeaderboard(rows)
|
| 286 |
+
const option = getChartOption(series, isDarkChart.value)
|
| 287 |
+
chart.setOption(option, { notMerge: true })
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
onMounted(() => {
|
| 291 |
+
isDarkChart.value = window.matchMedia("(prefers-color-scheme: dark)").matches //true | false
|
| 292 |
+
|
| 293 |
+
if (!chartRef.value) return
|
| 294 |
+
chart = echarts.init(chartRef.value)
|
| 295 |
+
// 首次渲染(如果数据尚未加载,后续会由 watcher 更新)
|
| 296 |
+
renderChart()
|
| 297 |
+
|
| 298 |
+
resizeHandler = () => chart && chart.resize()
|
| 299 |
+
window.addEventListener('resize', resizeHandler)
|
| 300 |
+
})
|
| 301 |
+
|
| 302 |
+
// 当 leaderboard 变化时重新渲染(不受 visibleColumns 影响)
|
| 303 |
+
watch(leaderboard, () => {
|
| 304 |
+
renderChart()
|
| 305 |
+
}, { deep: true })
|
| 306 |
+
|
| 307 |
+
// 当所选数据集变化时也要重新渲染图表
|
| 308 |
+
watch(selectedDataNameChart, () => {
|
| 309 |
+
renderChart()
|
| 310 |
+
})
|
| 311 |
+
|
| 312 |
+
// 当主题变化时重新渲染图表
|
| 313 |
+
watch(isDarkChart, (newVal) => {
|
| 314 |
+
console.log('isDarkChart changed to:', newVal)
|
| 315 |
+
renderChart()
|
| 316 |
+
})
|
| 317 |
+
|
| 318 |
+
onBeforeUnmount(() => {
|
| 319 |
+
if (resizeHandler) window.removeEventListener('resize', resizeHandler)
|
| 320 |
+
if (themeObserver) themeObserver.disconnect()
|
| 321 |
+
if (chart) { chart.dispose(); chart = null }
|
| 322 |
+
})
|
| 323 |
+
</script>
|
| 324 |
+
|
| 325 |
+
<template>
|
| 326 |
+
<div ref="chartRef" class="w-2/5 h-[80vh] mx-auto"></div>
|
| 327 |
+
</template>
|
| 328 |
+
|
| 329 |
+
<style scoped></style>
|
src/components/star-solid-full.svg
ADDED
|
|
src/composables/useLeaderboardData.js
ADDED
|
@@ -0,0 +1,492 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { ref, computed, reactive } from 'vue'
|
| 2 |
+
import { parseCsvContent, processModelNames } from '@/utils/csvUtils.js'
|
| 3 |
+
|
| 4 |
+
// 全局状态对象,用于在多个组件间共享
|
| 5 |
+
const globalState = reactive({
|
| 6 |
+
leaderboard: [],
|
| 7 |
+
csvHeaders: [],
|
| 8 |
+
loading: true,
|
| 9 |
+
error: null,
|
| 10 |
+
// 排序状态:当前排序列(key)与方向(true = 降序)
|
| 11 |
+
sortKey: '',
|
| 12 |
+
sortDesc: true,
|
| 13 |
+
visibleColumns: [],
|
| 14 |
+
dataGroups: [],
|
| 15 |
+
selectedDataName: '',
|
| 16 |
+
selectedDataNameChart: '',
|
| 17 |
+
modelTypeGroups: [],
|
| 18 |
+
selectedModelType: [], // 改为数组支持多选
|
| 19 |
+
DEFAULT_CSV_PATH: '/filtered.csv',
|
| 20 |
+
// 默认隐藏的列
|
| 21 |
+
DEFAULT_HIDDEN: new Set(['seq_len', 'uniform_entropy', 'entropy_gain', 'information_capacity', 'data_name', 'model_size (B)'])
|
| 22 |
+
})
|
| 23 |
+
|
| 24 |
+
// 模型类型映射对象:键为模型类型,值为包含的 model_series 数组
|
| 25 |
+
const modelTypeMapping = {
|
| 26 |
+
'Qwen3': ['Qwen3'],
|
| 27 |
+
'Qwen2.5': ['Qwen2.5'],
|
| 28 |
+
'Qwen2': ['Qwen2'],
|
| 29 |
+
'Qwen1.5': ['Qwen1.5'],
|
| 30 |
+
'Llama-3': ['Llama-3.1', 'Llama-3.2'],
|
| 31 |
+
'InternLM2.5': ['Internlm2.5'],
|
| 32 |
+
'GLM-4': ['GLM-4', 'GLM-4'],
|
| 33 |
+
'Seed-OSS': ['Seed-OSS'],
|
| 34 |
+
'Gemma-3': ['Gemma-3'],
|
| 35 |
+
'Hunyuan': ['Hunyuan'],
|
| 36 |
+
'Qwen2 (MoE)': ['Qwen2 (MoE)'],
|
| 37 |
+
'Qwen1.5 (MoE)': ['Qwen1.5 (MoE)'],
|
| 38 |
+
'DeepSeek-V3.1': ['DeepSeek-V3.1-Base'],
|
| 39 |
+
'DeepSeek-V2': ['DeepSeek-V2'],
|
| 40 |
+
'GLM-4.5': ['GLM-4.5-Air-Base', 'GLM-4.5-Base'],
|
| 41 |
+
'Llama-4': ['Llama-4']
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
const MoEModelSeries = ['Qwen2', 'Qwen1.5']
|
| 45 |
+
|
| 46 |
+
const strtSymbolSeries = ['Qwen2 (MoE)', 'Qwen1.5 (MoE)', 'DeepSeek-V3.1', 'DeepSeek-V2', 'GLM-4.5', "Llama-4"]
|
| 47 |
+
|
| 48 |
+
// const autoShowSeries = ['Qwen3', 'Llama-3', 'InternLM2.5', 'GLM-4', 'Seed-OSS', 'Gemma-3', 'Hunyuan', 'DeepSeek-V3.1', 'DeepSeek-V2', 'GLM-4.5']
|
| 49 |
+
const autoShowSeries = ["*"]
|
| 50 |
+
|
| 51 |
+
// 表头显示名称映射(raw header -> 显示名),可以在此添加或由用户修改
|
| 52 |
+
const headerDisplayMap = reactive({
|
| 53 |
+
'rank': 'Rank',
|
| 54 |
+
'model_name': 'Model Name',
|
| 55 |
+
'model_series': 'Model Series',
|
| 56 |
+
'model_size (B)': 'Model Size (B)',
|
| 57 |
+
'constant': 'Text Size',
|
| 58 |
+
'conditional_entropy': 'Negative Log-Likelihood',
|
| 59 |
+
'BF16_TFLOPs': 'FLOPs (G)',
|
| 60 |
+
'ic': ' Information Capacity',
|
| 61 |
+
'model_source': 'Tested by'
|
| 62 |
+
})
|
| 63 |
+
|
| 64 |
+
// 数据集名称显示映射(raw data_name -> 显示名)
|
| 65 |
+
const dataNameDisplayMap = reactive({
|
| 66 |
+
'data_part_0000': 'Mixed text',
|
| 67 |
+
'eng_Latn_000_00027_long': 'FinePDFs-en',
|
| 68 |
+
'IndustryCorpus_batch_aa_long': 'Ch-FineWeb-Edu',
|
| 69 |
+
'CC-MAIN-2013-20_train-00000-of-00014_long': 'FineWeb-Edu',
|
| 70 |
+
'NextCoderDataset_v1_long': 'NextCoder',
|
| 71 |
+
})
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
// 默认选择模式为Model
|
| 75 |
+
const selectedMode = ref('Model')
|
| 76 |
+
|
| 77 |
+
// 可选择的列(包含 rank,如果需要)
|
| 78 |
+
const selectableColumns = computed(() => {
|
| 79 |
+
if (!globalState.csvHeaders || globalState.csvHeaders.length === 0) return []
|
| 80 |
+
return globalState.csvHeaders.filter(h => !globalState.DEFAULT_HIDDEN.has(h))
|
| 81 |
+
})
|
| 82 |
+
|
| 83 |
+
// 模型类型分组(从映射对象中获取)
|
| 84 |
+
const modelTypeGroups = computed(() => {
|
| 85 |
+
return Object.keys(modelTypeMapping)
|
| 86 |
+
})
|
| 87 |
+
|
| 88 |
+
// 对 leaderboard 做基于 sortKey/sortDesc 的排序视图(不改变原始 globalState.leaderboard)
|
| 89 |
+
const sortedLeaderboard = computed(() => {
|
| 90 |
+
if (!globalState.leaderboard || globalState.leaderboard.length === 0) return []
|
| 91 |
+
const key = globalState.sortKey
|
| 92 |
+
const desc = !!globalState.sortDesc
|
| 93 |
+
const arr = [...globalState.leaderboard]
|
| 94 |
+
if (!key || key === '') return arr
|
| 95 |
+
arr.sort((a, b) => {
|
| 96 |
+
const va = a[key]
|
| 97 |
+
const vb = b[key]
|
| 98 |
+
// null/undefined push to end
|
| 99 |
+
if (va == null && vb == null) return 0
|
| 100 |
+
if (va == null) return 1
|
| 101 |
+
if (vb == null) return -1
|
| 102 |
+
const na = Number(va)
|
| 103 |
+
const nb = Number(vb)
|
| 104 |
+
if (Number.isFinite(na) && Number.isFinite(nb)) {
|
| 105 |
+
return desc ? (nb - na) : (na - nb)
|
| 106 |
+
}
|
| 107 |
+
try {
|
| 108 |
+
return desc ? String(vb).localeCompare(String(va)) : String(va).localeCompare(String(vb))
|
| 109 |
+
} catch (e) {
|
| 110 |
+
return 0
|
| 111 |
+
}
|
| 112 |
+
})
|
| 113 |
+
return arr
|
| 114 |
+
})
|
| 115 |
+
|
| 116 |
+
// 根据 selectedDataName 和 selectedModelType 过滤 leaderboard,用于表格渲染
|
| 117 |
+
const filteredLeaderboard = computed(() => {
|
| 118 |
+
if (!globalState.leaderboard || globalState.leaderboard.length === 0) return []
|
| 119 |
+
// 从已排序的视图开始过滤
|
| 120 |
+
let filtered = sortedLeaderboard.value
|
| 121 |
+
|
| 122 |
+
// 过滤数据集
|
| 123 |
+
if (globalState.selectedDataName && globalState.selectedDataName !== 'all') {
|
| 124 |
+
filtered = filtered.filter(r => String(r['data_name'] ?? '') === String(globalState.selectedDataName))
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
// 过滤模型类型(支持多选)
|
| 128 |
+
// 特殊值 '__none__' 表示用户明确选择了“清除”——此时应返回空结果
|
| 129 |
+
const sel = globalState.selectedModelType
|
| 130 |
+
if (Array.isArray(sel)) {
|
| 131 |
+
if (sel.includes('__none__')) return []
|
| 132 |
+
if (sel.length > 0) {
|
| 133 |
+
filtered = filtered.filter(r => sel.includes(String(r['model_type'] ?? '')))
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
// 重新分配 rank 基于当前过滤和排序后的顺序
|
| 137 |
+
return filtered.map((item, index) => ({ ...item, rank: index + 1 }))
|
| 138 |
+
})
|
| 139 |
+
|
| 140 |
+
// 计算每个 model_series 的 IC 平均值,返回数组,元素格式为 { ModelSeries, IC }
|
| 141 |
+
const modelSeriesICAvg = computed(() => {
|
| 142 |
+
const rows = globalState.leaderboard || []
|
| 143 |
+
const selData = globalState.selectedDataName
|
| 144 |
+
const selModelTypes = globalState.selectedModelType
|
| 145 |
+
|
| 146 |
+
// 以 modelTypeMapping 的 key 为行(即用户划分好的 ModelSeries)来生成平均值
|
| 147 |
+
const out = []
|
| 148 |
+
const keys = Object.keys(modelTypeMapping)
|
| 149 |
+
|
| 150 |
+
// 如果用户显式清空选择,直接返回空数组
|
| 151 |
+
if (Array.isArray(selModelTypes) && selModelTypes.includes('__none__')) return []
|
| 152 |
+
|
| 153 |
+
for (const key of keys) {
|
| 154 |
+
// 当有选中的 model types 时,只处理被选中的那些 key
|
| 155 |
+
if (Array.isArray(selModelTypes) && selModelTypes.length > 0) {
|
| 156 |
+
// 如果 selectedModelType 包含元素,但不包含当前 key,则跳过
|
| 157 |
+
if (!selModelTypes.includes(key)) continue
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
const mappedSeries = new Set(modelTypeMapping[key] || [])
|
| 161 |
+
// 也把 key 自身加入集合(保险)
|
| 162 |
+
mappedSeries.add(key)
|
| 163 |
+
|
| 164 |
+
// 聚合该 key 下所有匹配 series 的 IC
|
| 165 |
+
let sum = 0
|
| 166 |
+
let count = 0
|
| 167 |
+
let constant = 0
|
| 168 |
+
let modelSource = ''
|
| 169 |
+
for (const r of rows) {
|
| 170 |
+
// Dataset 过滤
|
| 171 |
+
if (selData && selData !== 'all') {
|
| 172 |
+
if (String(r['data_name'] ?? '') !== String(selData)) continue
|
| 173 |
+
}
|
| 174 |
+
const seriesName = String(r['model_series'] ?? '').trim()
|
| 175 |
+
if (!seriesName) continue
|
| 176 |
+
if (!mappedSeries.has(seriesName)) continue
|
| 177 |
+
const icRaw = r['ic']
|
| 178 |
+
const n = Number(icRaw)
|
| 179 |
+
if (!Number.isFinite(n)) continue
|
| 180 |
+
constant = Number(r['constant']) || 0
|
| 181 |
+
sum += n
|
| 182 |
+
count += 1
|
| 183 |
+
modelSource = r['model_source']
|
| 184 |
+
}
|
| 185 |
+
if (count === 0) continue
|
| 186 |
+
const avg = sum / count
|
| 187 |
+
out.push({ ModelSeries: key, IC: Number(avg.toFixed(4)), Constant: constant ,ModelSource: modelSource })
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
// 根据 sortKey 和 sortDesc 进行排序
|
| 191 |
+
const key = globalState.sortKey
|
| 192 |
+
const desc = !!globalState.sortDesc
|
| 193 |
+
if (key && key !== '') {
|
| 194 |
+
out.sort((a, b) => {
|
| 195 |
+
let va, vb
|
| 196 |
+
if (key === 'ic') {
|
| 197 |
+
va = a.IC
|
| 198 |
+
vb = b.IC
|
| 199 |
+
} else if (key === 'constant') {
|
| 200 |
+
va = a.Constant
|
| 201 |
+
vb = b.Constant
|
| 202 |
+
} else {
|
| 203 |
+
va = a[key]
|
| 204 |
+
vb = b[key]
|
| 205 |
+
}
|
| 206 |
+
// null/undefined push to end
|
| 207 |
+
if (va == null && vb == null) return 0
|
| 208 |
+
if (va == null) return 1
|
| 209 |
+
if (vb == null) return -1
|
| 210 |
+
const na = Number(va)
|
| 211 |
+
const nb = Number(vb)
|
| 212 |
+
if (Number.isFinite(na) && Number.isFinite(nb)) {
|
| 213 |
+
return desc ? (nb - na) : (na - nb)
|
| 214 |
+
}
|
| 215 |
+
try {
|
| 216 |
+
return desc ? String(vb).localeCompare(String(va)) : String(va).localeCompare(String(vb))
|
| 217 |
+
} catch (e) {
|
| 218 |
+
return 0
|
| 219 |
+
}
|
| 220 |
+
})
|
| 221 |
+
} else {
|
| 222 |
+
// 默认按 IC 降序排序
|
| 223 |
+
out.sort((a, b) => b.IC - a.IC)
|
| 224 |
+
}
|
| 225 |
+
return out
|
| 226 |
+
})
|
| 227 |
+
|
| 228 |
+
// 点击表头切换排序:循环 降序 -> 升序
|
| 229 |
+
function setSortKey(h) {
|
| 230 |
+
if (!h) return
|
| 231 |
+
if (globalState.sortKey !== h) {
|
| 232 |
+
globalState.sortKey = h
|
| 233 |
+
globalState.sortDesc = true
|
| 234 |
+
return
|
| 235 |
+
}
|
| 236 |
+
// same key, toggle between desc and asc
|
| 237 |
+
globalState.sortDesc = !globalState.sortDesc
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
// 计算当前应该显示的列(不含 rank)
|
| 241 |
+
const displayedColumns = computed(() => {
|
| 242 |
+
if (!globalState.csvHeaders || globalState.csvHeaders.length === 0) return []
|
| 243 |
+
// csvHeaders includes 'rank' at idx 0
|
| 244 |
+
console.log('csvHeaders:', globalState.csvHeaders)
|
| 245 |
+
const all = globalState.csvHeaders
|
| 246 |
+
return all.filter(h => globalState.visibleColumns.includes(h))
|
| 247 |
+
})
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
// init
|
| 251 |
+
async function fetchAndLoadCsv(path = globalState.DEFAULT_CSV_PATH) {
|
| 252 |
+
globalState.loading = true
|
| 253 |
+
globalState.error = null
|
| 254 |
+
|
| 255 |
+
try {
|
| 256 |
+
const res = await fetch(path)
|
| 257 |
+
if (!res.ok) throw new Error(`Failed to fetch CSV (${res.status})`)
|
| 258 |
+
const txt = await res.text()
|
| 259 |
+
const { headers, rows } = parseCsvContent(txt)
|
| 260 |
+
processModelNames(rows)
|
| 261 |
+
if (!headers || headers.length === 0) { globalState.leaderboard = []; globalState.loading = false; return }
|
| 262 |
+
|
| 263 |
+
// 选择用于排序/显示的分数字段(优先 information_capacity, ic, 然后尝试 numeric-like fields)
|
| 264 |
+
const scoreKey = headers.find(h => ['information_capacity', 'ic', 'score'].includes(h)) || headers.find(h => /capacity|score|ic/i.test(h)) || headers[0]
|
| 265 |
+
// 默认以最后一列升序排序(如果不存在则回退到 scoreKey),不直接在 rows 上预排序
|
| 266 |
+
const defaultKey = headers.length > 0 ? headers[headers.length - 1] : scoreKey
|
| 267 |
+
globalState.sortKey = defaultKey || ''
|
| 268 |
+
globalState.sortDesc = true
|
| 269 |
+
|
| 270 |
+
|
| 271 |
+
// 预处理步骤:
|
| 272 |
+
for (const r of rows) {
|
| 273 |
+
// 预处理步骤:
|
| 274 |
+
// 1. 筛选ModelSeries 我们现有的已经指定了一些模型的系列,但是这些系列并不一定完全包含我们的数据,所以,将系列之外的模型新增到key-value映射中,key和value都对应的是model_series名称
|
| 275 |
+
|
| 276 |
+
const seriesName = String(r['model_series'] ?? '').trim()
|
| 277 |
+
// console.log('Processing series name:', seriesName, Object.values(modelTypeMapping).flat().includes(seriesName))
|
| 278 |
+
if (!Object.values(modelTypeMapping).flat().includes(seriesName)) {
|
| 279 |
+
modelTypeMapping[seriesName] = [seriesName]
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
// 2. 模型来源处理,如果Model Name后缀为[[xxxx]],则将来源为xxxx否则为TeleAI,这个来源是新的属性
|
| 283 |
+
const name = r['model_name'] || ''
|
| 284 |
+
const sourceMatch = name.match(/\[\[(.+?)\]\]$/)
|
| 285 |
+
if (sourceMatch) {
|
| 286 |
+
r['model_source'] = sourceMatch[1]
|
| 287 |
+
// 去掉 model_name 末尾的 [[xxxx]]
|
| 288 |
+
r['model_name'] = name.replace(/\[\[(.+?)\]\]$/, '').trim()
|
| 289 |
+
} else {
|
| 290 |
+
r['model_source'] = 'TeleAI'
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
// 3. 判断模型开头是否在 MoEModelSeries 中,是则在 判断尾部是否为-A{number}B这样的格式
|
| 294 |
+
for (const moePrefix of MoEModelSeries) {
|
| 295 |
+
if (name.startsWith(moePrefix)) {
|
| 296 |
+
// console.log('Checking MoE model name:', name,name.match(/-A(\d+(?:\.\d+)?)B/))
|
| 297 |
+
const moeSuffixMatch = name.match(/-A(.+)B$/)
|
| 298 |
+
if (moeSuffixMatch) {
|
| 299 |
+
// 更改 model_series 显示名称 为 moePrefix + ' (MoE)'
|
| 300 |
+
r['model_series'] = `${moePrefix} (MoE)`
|
| 301 |
+
// console.log('Detected MoE model, updated series:', r['model_series'])
|
| 302 |
+
}
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
// 4. 根据 model_series 推断 model_type
|
| 307 |
+
let modelType = ''
|
| 308 |
+
|
| 309 |
+
for (const [type, series] of Object.entries(modelTypeMapping)) {
|
| 310 |
+
if (series.includes(r['model_series'])) {
|
| 311 |
+
modelType = type
|
| 312 |
+
break
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
r['model_type'] = modelType
|
| 316 |
+
|
| 317 |
+
// 5. 修改model_series为model_type的值
|
| 318 |
+
r['model_series'] = modelType
|
| 319 |
+
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
// 确保关键列按顺序显示
|
| 323 |
+
const preferred = ['model_name', 'model_series', 'model_size (B)', 'seq_len', 'uniform_entropy', 'constant', 'conditional_entropy', 'entropy_gain', 'BF16_TFLOPs', 'information_capacity', 'ic','model_source']
|
| 324 |
+
const ordered = []
|
| 325 |
+
for (const p of preferred) if (headers.includes(p) && !ordered.includes(p)) ordered.push(p)
|
| 326 |
+
for (const h of headers) if (!ordered.includes(h)) ordered.push(h)
|
| 327 |
+
globalState.csvHeaders = ['rank', ...ordered, 'model_source']
|
| 328 |
+
|
| 329 |
+
globalState.leaderboard = rows.map((r, idx) => {
|
| 330 |
+
|
| 331 |
+
const modelType = r['model_type']
|
| 332 |
+
|
| 333 |
+
// 修改 BF16_TFLOPs:先 /1024 再 *1000
|
| 334 |
+
const originalTFLOPs = Number(r['BF16_TFLOPs']) || 0
|
| 335 |
+
const modifiedTFLOPs = (originalTFLOPs / 1024) * 1000
|
| 336 |
+
return { rank: idx + 1, model_type: modelType, ...r, BF16_TFLOPs: modifiedTFLOPs }
|
| 337 |
+
})
|
| 338 |
+
|
| 339 |
+
// console.log('Loaded leaderboard with', globalState.leaderboard.length, 'rows.', globalState.leaderboard )
|
| 340 |
+
|
| 341 |
+
// 构建 data_name 分组(保持出现顺序,不包含空)
|
| 342 |
+
const seen = new Set()
|
| 343 |
+
const groups = []
|
| 344 |
+
for (const r of rows) {
|
| 345 |
+
const dn = r['data_name']
|
| 346 |
+
if (dn == null) continue
|
| 347 |
+
const s = String(dn)
|
| 348 |
+
if (s.trim() === '') continue
|
| 349 |
+
if (!seen.has(s)) { seen.add(s); groups.push(s) }
|
| 350 |
+
}
|
| 351 |
+
globalState.dataGroups = groups
|
| 352 |
+
|
| 353 |
+
// 构建 model_type 分组
|
| 354 |
+
globalState.modelTypeGroups = Object.keys(modelTypeMapping)
|
| 355 |
+
|
| 356 |
+
// 默认显示第一个数据集
|
| 357 |
+
if (globalState.dataGroups.length > 0) {
|
| 358 |
+
globalState.selectedDataName = globalState.dataGroups[0]
|
| 359 |
+
globalState.selectedDataNameChart = globalState.dataGroups[0]
|
| 360 |
+
}
|
| 361 |
+
|
| 362 |
+
// 默认模型类型:默认全选(使筛选 UI 初始为所有模型被勾选)
|
| 363 |
+
if (globalState.modelTypeGroups.length > 0) {
|
| 364 |
+
globalState.selectedModelType = [...globalState.modelTypeGroups]
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
// 初始化可见列:默认显示所有可选列(不包含默认隐藏列),包括 rank
|
| 368 |
+
globalState.visibleColumns = ['rank', ...ordered.filter(h => !globalState.DEFAULT_HIDDEN.has(h)), 'model_source']
|
| 369 |
+
|
| 370 |
+
// 数字格式化
|
| 371 |
+
const numericFloatCols = new Set(['uniform_entropy', 'conditional_entropy', 'entropy_gain', 'information_capacity', 'ic', 'constant', 'BF16_TFLOPs'])
|
| 372 |
+
const numericIntCols = new Set(['seq_len'])
|
| 373 |
+
// attach formatter per row for rendering convenience (non-reactive simple values)
|
| 374 |
+
for (const row of globalState.leaderboard) {
|
| 375 |
+
row._formatted = {}
|
| 376 |
+
for (const h of ordered) {
|
| 377 |
+
const raw = row[h]
|
| 378 |
+
if (raw == null || raw === '') { row._formatted[h] = ''; continue }
|
| 379 |
+
if (numericIntCols.has(h)) {
|
| 380 |
+
const n = Number(raw)
|
| 381 |
+
row._formatted[h] = Number.isFinite(n) ? String(Math.round(n)) : raw
|
| 382 |
+
} else if (numericFloatCols.has(h)) {
|
| 383 |
+
const n = Number(raw)
|
| 384 |
+
if (h === 'ic') {
|
| 385 |
+
row._formatted[h] = Number.isFinite(n) ? n.toFixed(4) : raw
|
| 386 |
+
}
|
| 387 |
+
else if (h === 'constant') {
|
| 388 |
+
row._formatted[h] = Number.isFinite(n) ? n.toFixed(2) : raw
|
| 389 |
+
}
|
| 390 |
+
else {
|
| 391 |
+
row._formatted[h] = Number.isFinite(n) ? n.toFixed(3) : raw
|
| 392 |
+
}
|
| 393 |
+
} else {
|
| 394 |
+
row._formatted[h] = raw
|
| 395 |
+
}
|
| 396 |
+
}
|
| 397 |
+
}
|
| 398 |
+
} catch (e) {
|
| 399 |
+
console.error(e)
|
| 400 |
+
globalState.error = e && e.message ? e.message : String(e)
|
| 401 |
+
} finally {
|
| 402 |
+
globalState.loading = false
|
| 403 |
+
}
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
function selectAll() {
|
| 407 |
+
// 复制一份可选列到 visibleColumns
|
| 408 |
+
globalState.visibleColumns = [...selectableColumns.value]
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
function clearAll() {
|
| 412 |
+
globalState.visibleColumns = []
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
function selectAllModelTypes() {
|
| 416 |
+
globalState.selectedModelType = [...modelTypeGroups.value]
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
function clearAllModelTypes() {
|
| 420 |
+
// 使用特殊标记表示用户显式地清空选择(区别于未选择任何项)
|
| 421 |
+
globalState.selectedModelType = ['__none__']
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
function formatCell(h, model) {
|
| 425 |
+
if (!model) return ''
|
| 426 |
+
if (model._formatted && model._formatted[h] !== undefined) return model._formatted[h]
|
| 427 |
+
return model[h]
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
// 初始化函数,在组件挂载时调用
|
| 431 |
+
function init() {
|
| 432 |
+
fetchAndLoadCsv()
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
export function useLeaderboardData() {
|
| 436 |
+
return {
|
| 437 |
+
// 状态
|
| 438 |
+
leaderboard: computed(() => globalState.leaderboard),
|
| 439 |
+
csvHeaders: computed(() => globalState.csvHeaders),
|
| 440 |
+
loading: computed(() => globalState.loading),
|
| 441 |
+
error: computed(() => globalState.error),
|
| 442 |
+
visibleColumns: computed({
|
| 443 |
+
get: () => globalState.visibleColumns,
|
| 444 |
+
set: (v) => globalState.visibleColumns = v
|
| 445 |
+
}),
|
| 446 |
+
selectedMode: computed({
|
| 447 |
+
get: () => selectedMode.value,
|
| 448 |
+
set: (v) => selectedMode.value = v
|
| 449 |
+
}),
|
| 450 |
+
selectableColumns,
|
| 451 |
+
autoShowSeries,
|
| 452 |
+
strtSymbolSeries,
|
| 453 |
+
headerDisplayMap: computed(() => headerDisplayMap),
|
| 454 |
+
dataNameDisplayMap: computed(() => dataNameDisplayMap),
|
| 455 |
+
dataGroups: computed(() => globalState.dataGroups),
|
| 456 |
+
selectedDataName: computed({
|
| 457 |
+
get: () => globalState.selectedDataName,
|
| 458 |
+
set: (v) => globalState.selectedDataName = v
|
| 459 |
+
}),
|
| 460 |
+
selectedDataNameChart: computed({
|
| 461 |
+
get: () => globalState.selectedDataNameChart,
|
| 462 |
+
set: (v) => globalState.selectedDataNameChart = v
|
| 463 |
+
}),
|
| 464 |
+
modelTypeGroups: computed(() => globalState.modelTypeGroups),
|
| 465 |
+
selectedModelType: computed({
|
| 466 |
+
get: () => globalState.selectedModelType,
|
| 467 |
+
set: (v) => {
|
| 468 |
+
// 当用户通过 UI 勾选真实模型类型时,移除 '__none__' 标记
|
| 469 |
+
if (Array.isArray(v) && v.some(x => x !== '__none__')) {
|
| 470 |
+
globalState.selectedModelType = v.filter(x => x !== '__none__')
|
| 471 |
+
} else {
|
| 472 |
+
globalState.selectedModelType = v
|
| 473 |
+
}
|
| 474 |
+
}
|
| 475 |
+
}),
|
| 476 |
+
filteredLeaderboard,
|
| 477 |
+
displayedColumns,
|
| 478 |
+
modelSeriesICAvg,
|
| 479 |
+
// 函数
|
| 480 |
+
fetchAndLoadCsv,
|
| 481 |
+
selectAll,
|
| 482 |
+
clearAll,
|
| 483 |
+
selectAllModelTypes,
|
| 484 |
+
clearAllModelTypes,
|
| 485 |
+
// 排序相关
|
| 486 |
+
sortKey: computed(() => globalState.sortKey),
|
| 487 |
+
sortDesc: computed(() => globalState.sortDesc),
|
| 488 |
+
setSortKey,
|
| 489 |
+
formatCell,
|
| 490 |
+
init
|
| 491 |
+
}
|
| 492 |
+
}
|
src/main.css
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@tailwind base;
|
| 2 |
+
@tailwind components;
|
| 3 |
+
@tailwind utilities;
|
| 4 |
+
|
| 5 |
+
/* 你可以在这里添加自定义样式,例如: */
|
| 6 |
+
body {
|
| 7 |
+
/* 例如为全局字体或背景设置默认 */
|
| 8 |
+
}
|
src/main.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { createApp } from 'vue'
|
| 2 |
+
import './main.css'
|
| 3 |
+
import App from './App.vue'
|
| 4 |
+
import router from './router'
|
| 5 |
+
|
| 6 |
+
const app = createApp(App)
|
| 7 |
+
app.use(router)
|
| 8 |
+
app.mount('#app')
|
src/router/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { createRouter, createWebHistory } from 'vue-router'
|
| 2 |
+
import Leaderboard from '@/views/Leaderboard.vue'
|
| 3 |
+
|
| 4 |
+
const routes = [
|
| 5 |
+
{
|
| 6 |
+
path: '/',
|
| 7 |
+
name: 'Leaderboard',
|
| 8 |
+
component: Leaderboard
|
| 9 |
+
}
|
| 10 |
+
]
|
| 11 |
+
|
| 12 |
+
const router = createRouter({
|
| 13 |
+
history: createWebHistory(),
|
| 14 |
+
routes
|
| 15 |
+
})
|
| 16 |
+
|
| 17 |
+
export default router
|
src/utils/csvUtils.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Lightweight CSV parsing helpers used by the app.
|
| 2 |
+
// Exports:
|
| 3 |
+
// - parseCSVLine(line): parse a single CSV line into array of values (handles quoted fields)
|
| 4 |
+
// - parseCsvContent(text): parse CSV text into { headers: string[], rows: Array<object> }
|
| 5 |
+
// - processModelNames(rows): modify model_name and model_series in rows
|
| 6 |
+
|
| 7 |
+
export function parseCSVLine(line) {
|
| 8 |
+
const res = []
|
| 9 |
+
let cur = ''
|
| 10 |
+
let inQuotes = false
|
| 11 |
+
for (let i = 0; i < line.length; i++) {
|
| 12 |
+
const ch = line[i]
|
| 13 |
+
if (inQuotes) {
|
| 14 |
+
if (ch === '"') {
|
| 15 |
+
if (i + 1 < line.length && line[i + 1] === '"') { cur += '"'; i++ } else { inQuotes = false }
|
| 16 |
+
} else { cur += ch }
|
| 17 |
+
} else {
|
| 18 |
+
if (ch === ',') { res.push(cur); cur = '' }
|
| 19 |
+
else if (ch === '"') { inQuotes = true }
|
| 20 |
+
else { cur += ch }
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
res.push(cur)
|
| 24 |
+
return res
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
export function parseCsvContent(txt) {
|
| 28 |
+
const lines = txt.split(/\r?\n/)
|
| 29 |
+
let headerIdx = null
|
| 30 |
+
for (let i = 0; i < lines.length; i++) if (lines[i].trim().length > 0) { headerIdx = i; break }
|
| 31 |
+
if (headerIdx === null) return { headers: [], rows: [] }
|
| 32 |
+
const headers = parseCSVLine(lines[headerIdx])
|
| 33 |
+
const rows = []
|
| 34 |
+
for (let i = headerIdx + 1; i < lines.length; i++) {
|
| 35 |
+
const l = lines[i]
|
| 36 |
+
if (!l || l.trim() === '') continue
|
| 37 |
+
const vals = parseCSVLine(l)
|
| 38 |
+
const obj = {}
|
| 39 |
+
for (let j = 0; j < headers.length; j++) obj[headers[j]] = vals[j] ?? ''
|
| 40 |
+
rows.push(obj)
|
| 41 |
+
}
|
| 42 |
+
return { headers, rows }
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
export function processModelNames(rows) {
|
| 46 |
+
for (const row of rows) {
|
| 47 |
+
if (row.model_name) {
|
| 48 |
+
row.model_name = modifyString(row.model_name)
|
| 49 |
+
}
|
| 50 |
+
if (row.model_series) {
|
| 51 |
+
row.model_series = modifyString(row.model_series)
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
function modifyString(str) {
|
| 57 |
+
str = str.replace(/glm/gi, 'GLM')
|
| 58 |
+
str = str.replace(/gemma/gi, 'Gemma')
|
| 59 |
+
str = str.replace(/Internlm/gi, 'InternLM')
|
| 60 |
+
str = str.replace(/b/gi, 'B')
|
| 61 |
+
str = str.replace(/-hf/gi, '-Base')
|
| 62 |
+
return str
|
| 63 |
+
}
|
src/utils/mk2html.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// 一个小型且安全的 Markdown -> HTML 解析器(支持标题、段落、链接、粗体、斜体、行内代码)
|
| 2 |
+
function escapeHtml(str) {
|
| 3 |
+
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
function parseInline(md) {
|
| 7 |
+
// code
|
| 8 |
+
md = md.replace(/`([^`]+)`/g, '<code>$1</code>')
|
| 9 |
+
// bold **text** or __text__
|
| 10 |
+
md = md.replace(/\*\*([^*]+)\*\*/g, '<strong>$1</strong>')
|
| 11 |
+
md = md.replace(/__([^_]+)__/g, '<strong>$1</strong>')
|
| 12 |
+
// italic *text* or _text_
|
| 13 |
+
md = md.replace(/\*([^*]+)\*/g, '<em>$1</em>')
|
| 14 |
+
md = md.replace(/_([^_]+)_/g, '<em>$1</em>')
|
| 15 |
+
// links [text](url)
|
| 16 |
+
md = md.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (m, text, url) => {
|
| 17 |
+
const safeUrl = url.replace(/\"/g, '%22')
|
| 18 |
+
return `<a href="${safeUrl}" target="_blank" rel="noopener noreferrer" class="text-blue-600 underline dark:text-blue-400">${text}</a>`
|
| 19 |
+
})
|
| 20 |
+
return md
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
function parsedHeaderHtml(headerMarkdown){
|
| 24 |
+
const raw = headerMarkdown || ''
|
| 25 |
+
// split into lines and paragraphs
|
| 26 |
+
const blocks = raw.split(/\n{2,}/g)
|
| 27 |
+
const html = blocks.map(block => {
|
| 28 |
+
const line = block.trim()
|
| 29 |
+
if (!line) return ''
|
| 30 |
+
// heading
|
| 31 |
+
const hMatch = line.match(/^(#{1,6})\s+(.*)$/)
|
| 32 |
+
if (hMatch) {
|
| 33 |
+
const level = Math.min(6, hMatch[1].length)
|
| 34 |
+
const content = parseInline(escapeHtml(hMatch[2]))
|
| 35 |
+
// 增加块间距(mb-2)以扩大行之间的视觉间隔
|
| 36 |
+
return `<h${level} class="text-lg font-semibold text-gray-800 dark:text-gray-100 mb-2">${content}</h${level}>`
|
| 37 |
+
}
|
| 38 |
+
// normal paragraph
|
| 39 |
+
// 使用 leading-relaxed 增加行高,并用 mb-2 增加段落间距
|
| 40 |
+
return `<p class="text-sm text-gray-700 dark:text-gray-200 leading-relaxed mb-2">${parseInline(escapeHtml(line))}</p>`
|
| 41 |
+
}).join('\n')
|
| 42 |
+
return html
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
export { parsedHeaderHtml }
|
src/views/Leaderboard.vue
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<script setup>
|
| 2 |
+
import { ref, onMounted, watch, nextTick } from 'vue'
|
| 3 |
+
import { useLeaderboardData } from '@/composables/useLeaderboardData.js'
|
| 4 |
+
import Chart from '@/components/Chart.vue'
|
| 5 |
+
import { computed } from 'vue'
|
| 6 |
+
import { parsedHeaderHtml } from '@/utils/mk2html.js'
|
| 7 |
+
|
| 8 |
+
// 使用数据管理 composable
|
| 9 |
+
const {
|
| 10 |
+
leaderboard,
|
| 11 |
+
csvHeaders,
|
| 12 |
+
loading,
|
| 13 |
+
error,
|
| 14 |
+
selectedMode,
|
| 15 |
+
visibleColumns,
|
| 16 |
+
selectableColumns,
|
| 17 |
+
dataGroups,
|
| 18 |
+
selectedDataName,
|
| 19 |
+
modelSeriesICAvg,
|
| 20 |
+
selectedDataNameChart,
|
| 21 |
+
autoShowSeries,
|
| 22 |
+
headerDisplayMap,
|
| 23 |
+
dataNameDisplayMap,
|
| 24 |
+
modelTypeGroups,
|
| 25 |
+
selectedModelType,
|
| 26 |
+
filteredLeaderboard,
|
| 27 |
+
displayedColumns,
|
| 28 |
+
fetchAndLoadCsv,
|
| 29 |
+
selectAll,
|
| 30 |
+
clearAll,
|
| 31 |
+
selectAllModelTypes,
|
| 32 |
+
clearAllModelTypes,
|
| 33 |
+
formatCell,
|
| 34 |
+
// 排序 API
|
| 35 |
+
sortKey,
|
| 36 |
+
sortDesc,
|
| 37 |
+
setSortKey,
|
| 38 |
+
init
|
| 39 |
+
} = useLeaderboardData()
|
| 40 |
+
|
| 41 |
+
const isSeries = computed(() => selectedMode.value === 'ModelSeries')
|
| 42 |
+
|
| 43 |
+
// theme (dark mode) support: sync with document root class and localStorage
|
| 44 |
+
const isDark = ref(false)
|
| 45 |
+
|
| 46 |
+
// 图表区域ref
|
| 47 |
+
const chartSection = ref(null)
|
| 48 |
+
|
| 49 |
+
// 记录上一次选择的图表数据集,用于区分初始加载和用户点击
|
| 50 |
+
const lastSelectedDataNameChart = ref('')
|
| 51 |
+
|
| 52 |
+
// header markdown 内容
|
| 53 |
+
const headerMarkdown = ref(`
|
| 54 |
+
|
| 55 |
+
**Information Capacity** evaluates an LLM's **efficiency** based on text compression performance relative to computational complexity, harnessing the inherent correlation between **compression** and **intelligence**.
|
| 56 |
+
Larger models can predict the next token more accurately, leading to higher compression gains but at increased computational costs.
|
| 57 |
+
Consequently, a series of models with varying sizes exhibits **consistent** information capacity, which can be used to compare model capability across model series and predict model performance within a series.
|
| 58 |
+
It also facilitates dynamic routing of different-sized models for efficient handling of tasks with varying difficulties, which is especially relevant to the device-edge-cloud infrastructure detailed in the **AI Flow** framework.
|
| 59 |
+
With the rapid evolution of edge intelligence, we believe that this hierarchical network will replace the mainstream cloud-centric computing scheme in the near future.
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
If you want to add your evaluation results to the leaderboard, please submit a [PR at our GitHub repo](https://github.com/TeleAI-AI-Flow/InformationCapacity).
|
| 63 |
+
|
| 64 |
+
`)
|
| 65 |
+
|
| 66 |
+
const title = 'Information Capacity Leaderboard'
|
| 67 |
+
|
| 68 |
+
const lastUpdatedTime = '11/12/2025 15:30'
|
| 69 |
+
|
| 70 |
+
const headerInfo = parsedHeaderHtml(headerMarkdown.value)
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
// 当图表数据集变化时,滚动到图表区域底部(仅当用户点击时)
|
| 74 |
+
watch(selectedDataNameChart, (newVal) => {
|
| 75 |
+
if (lastSelectedDataNameChart.value && lastSelectedDataNameChart.value !== newVal) {
|
| 76 |
+
nextTick(() => {
|
| 77 |
+
chartSection.value?.scrollIntoView({ behavior: 'smooth', block: 'end' })
|
| 78 |
+
})
|
| 79 |
+
}
|
| 80 |
+
lastSelectedDataNameChart.value = newVal
|
| 81 |
+
})
|
| 82 |
+
|
| 83 |
+
onMounted(() => {
|
| 84 |
+
init()
|
| 85 |
+
})
|
| 86 |
+
|
| 87 |
+
onMounted(() => {
|
| 88 |
+
const stored = localStorage.getItem('theme')
|
| 89 |
+
if (stored === 'dark') {
|
| 90 |
+
isDark.value = true
|
| 91 |
+
} else if (stored === 'light') {
|
| 92 |
+
isDark.value = false
|
| 93 |
+
} else {
|
| 94 |
+
// follow system preference when no stored preference
|
| 95 |
+
isDark.value = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
|
| 96 |
+
}
|
| 97 |
+
})
|
| 98 |
+
|
| 99 |
+
watch(isDark, (val) => {
|
| 100 |
+
try {
|
| 101 |
+
if (val) document.documentElement.classList.add('dark')
|
| 102 |
+
else document.documentElement.classList.remove('dark')
|
| 103 |
+
localStorage.setItem('theme', val ? 'dark' : 'light')
|
| 104 |
+
} catch (e) {
|
| 105 |
+
// ignore if SSR or unavailable
|
| 106 |
+
}
|
| 107 |
+
})
|
| 108 |
+
|
| 109 |
+
function clearModelTypeSelection() {
|
| 110 |
+
selectAllModelTypes()
|
| 111 |
+
}
|
| 112 |
+
</script>
|
| 113 |
+
|
| 114 |
+
<template>
|
| 115 |
+
<div
|
| 116 |
+
class="min-h-screen bg-gray-50 dark:bg-gradient-to-b dark:from-gray-900 dark:via-gray-800 dark:to-gray-800 py-12 px-4 sm:px-6 lg:px-8">
|
| 117 |
+
<div class=" mx-auto">
|
| 118 |
+
<header class="mb-4 flex items-start justify-between mr-4">
|
| 119 |
+
<div>
|
| 120 |
+
<h1 class="text-3xl font-extrabold text-gray-900 dark:text-gray-100">{{ title }}</h1>
|
| 121 |
+
<!-- <p class="mt-1 text-sm text-gray-600 dark:text-gray-300">LLM IC Leaderboard Demo</p> -->
|
| 122 |
+
<div v-html="headerInfo" class="py-7"></div>
|
| 123 |
+
</div>
|
| 124 |
+
<div class="flex items-center">
|
| 125 |
+
<!-- 固定正方形容器,内部图片保持纵横比且居中 -->
|
| 126 |
+
<div class="h-40 w-40 flex items-center justify-center rounded-md overflow-hidden p-2">
|
| 127 |
+
<img src="/logo.png" alt="Logo" class="max-h-full max-w-full object-contain" />
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
</header>
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
<div class="bg-white dark:bg-gray-900/60 shadow rounded-lg overflow-hidden">
|
| 134 |
+
<div
|
| 135 |
+
class="px-6 py-4 border-b bg-gradient-to-r from-indigo-50 via-white to-white dark:bg-gradient-to-r dark:from-gray-800 dark:via-gray-900 dark:to-gray-900">
|
| 136 |
+
<div class="flex items-center justify-between">
|
| 137 |
+
<h2 class="text-lg font-medium text-gray-800 dark:text-gray-50">Leaderboard</h2>
|
| 138 |
+
<div class="text-sm text-gray-500 dark:text-gray-300">Last updated on {{ lastUpdatedTime }}</div>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
<!-- 筛选(模型分类,模型系列分类) -->
|
| 142 |
+
<div class="px-6 py-3 border-b bg-gray-50 dark:bg-gradient-to-b dark:from-gray-900 dark:to-gray-800">
|
| 143 |
+
<div class="flex items-center gap-3">
|
| 144 |
+
<span class="text-sm font-medium text-gray-700 dark:text-gray-200">Shown as</span>
|
| 145 |
+
<div v-if="dataGroups.length > 0" class="flex gap-2 items-center overflow-x-auto">
|
| 146 |
+
<!-- <label class="px-2 py-1 rounded-full border border-gray-200 dark:border-gray-700 text-sm cursor-pointer" :class="{'bg-gray-100 dark:bg-gray-700': selectedDataName==='all'}">
|
| 147 |
+
<input type="radio" class="hidden" value="all" v-model="selectedDataName" /> 全部
|
| 148 |
+
</label> -->
|
| 149 |
+
<label @click="selectedMode = 'Model'"
|
| 150 |
+
class="px-2 py-1 rounded-full border border-gray-200 dark:border-gray-700 text-sm cursor-pointer dark:text-slate-300"
|
| 151 |
+
:class="{ 'bg-gray-100 dark:bg-gray-700 dark:text-white': selectedMode === 'Model' }">
|
| 152 |
+
Individual Models
|
| 153 |
+
</label>
|
| 154 |
+
<label @click="selectedMode = 'ModelSeries'"
|
| 155 |
+
class="px-2 py-1 rounded-full border border-gray-200 dark:border-gray-700 text-sm cursor-pointer dark:text-slate-300"
|
| 156 |
+
:class="{ 'bg-gray-100 dark:bg-gray-700 dark:text-white': selectedMode === 'ModelSeries' }">
|
| 157 |
+
Model Series
|
| 158 |
+
</label>
|
| 159 |
+
</div>
|
| 160 |
+
<div v-else class="text-sm text-gray-500 dark:text-gray-400">(数据集中未检测到 data_name 列)</div>
|
| 161 |
+
</div>
|
| 162 |
+
</div>
|
| 163 |
+
|
| 164 |
+
<!-- 数据集筛选区域(独立于列筛选) -->
|
| 165 |
+
<div class="px-6 py-3 border-b bg-gray-50 dark:bg-gradient-to-b dark:from-gray-900 dark:to-gray-800">
|
| 166 |
+
<div class="flex items-center gap-3">
|
| 167 |
+
<span class="text-sm font-medium text-gray-700 dark:text-gray-200">Dataset</span>
|
| 168 |
+
<div v-if="dataGroups.length > 0" class="flex gap-2 items-center overflow-x-auto">
|
| 169 |
+
<!-- <label class="px-2 py-1 rounded-full border border-gray-200 dark:border-gray-700 text-sm cursor-pointer" :class="{'bg-gray-100 dark:bg-gray-700': selectedDataName==='all'}">
|
| 170 |
+
<input type="radio" class="hidden" value="all" v-model="selectedDataName" /> 全部
|
| 171 |
+
</label> -->
|
| 172 |
+
<label v-for="g in dataGroups" :key="g"
|
| 173 |
+
class="px-2 py-1 rounded-full border border-gray-200 dark:border-gray-700 text-sm cursor-pointer dark:text-slate-300"
|
| 174 |
+
:class="{ 'bg-gray-100 dark:bg-gray-700 dark:text-white': selectedDataName === g }">
|
| 175 |
+
<input type="radio" class="hidden" :value="g" v-model="selectedDataName" /> <span
|
| 176 |
+
class="whitespace-nowrap">{{ dataNameDisplayMap[g] ?
|
| 177 |
+
dataNameDisplayMap[g] : g }}</span>
|
| 178 |
+
</label>
|
| 179 |
+
</div>
|
| 180 |
+
<div v-else class="text-sm text-gray-500 dark:text-gray-400">(数据集中未检测到 data_name 列)</div>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
<!-- 模型类型筛选区域 -->
|
| 186 |
+
<div class="px-6 py-3 border-b bg-gray-50 dark:bg-gradient-to-b dark:from-gray-900 dark:to-gray-800">
|
| 187 |
+
<div class="flex items-center gap-3">
|
| 188 |
+
<span class="text-sm font-medium text-gray-700 dark:text-gray-200 whitespace-nowrap">Model Series</span>
|
| 189 |
+
<div class="flex items-center gap-2">
|
| 190 |
+
<button @click="clearModelTypeSelection"
|
| 191 |
+
class="whitespace-nowrap text-sm px-2 py-1 bg-white/90 dark:bg-gray-700/60 border border-gray-200 dark:border-gray-600 rounded text-gray-700 dark:text-gray-200 hover:bg-white dark:hover:bg-gray-600 transition">
|
| 192 |
+
全选
|
| 193 |
+
</button>
|
| 194 |
+
<button @click="clearAllModelTypes"
|
| 195 |
+
class="whitespace-nowrap text-sm px-2 py-1 bg-transparent border border-gray-200 dark:border-gray-700 rounded text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition">
|
| 196 |
+
清除
|
| 197 |
+
</button>
|
| 198 |
+
</div>
|
| 199 |
+
<div v-if="modelTypeGroups.length > 0" class="flex flex-wrap gap-2 items-center">
|
| 200 |
+
<label v-for="g in modelTypeGroups" :key="g"
|
| 201 |
+
class="flex items-center gap-2 text-sm bg-white dark:bg-gray-800 px-3 py-1 rounded-full border border-gray-200 dark:border-gray-700 hover:shadow-sm whitespace-nowrap">
|
| 202 |
+
<input type="checkbox" :value="g" v-model="selectedModelType"
|
| 203 |
+
class="h-4 w-4 text-indigo-600 dark:text-indigo-400 bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 rounded" />
|
| 204 |
+
<span class="truncate text-gray-800 dark:text-gray-50">{{ g }}</span>
|
| 205 |
+
</label>
|
| 206 |
+
</div>
|
| 207 |
+
<div v-else class="text-sm text-gray-500 dark:text-gray-400">(未配置模型类型映射)</div>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
|
| 211 |
+
<!-- 内联列选择区���:pills 风格,支持水平滚动,并兼容深色/浅色模式 -->
|
| 212 |
+
<div class="px-6 py-3 border-b bg-gray-50 dark:bg-gradient-to-b dark:from-gray-900 dark:to-gray-800" v-show="!isSeries">
|
| 213 |
+
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
|
| 214 |
+
<div class="flex items-center gap-3">
|
| 215 |
+
<span class="text-sm font-medium text-gray-700 dark:text-gray-200">Visible Columns</span>
|
| 216 |
+
<div class="flex items-center gap-2">
|
| 217 |
+
<button @click.prevent="selectAll"
|
| 218 |
+
class="text-sm px-2 py-1 bg-white/90 dark:bg-gray-700/60 border border-gray-200 dark:border-gray-600 rounded text-gray-700 dark:text-gray-200 hover:bg-white dark:hover:bg-gray-600 transition">全选</button>
|
| 219 |
+
<button @click.prevent="clearAll"
|
| 220 |
+
class="text-sm px-2 py-1 bg-transparent border border-gray-200 dark:border-gray-700 rounded text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition">清除</button>
|
| 221 |
+
</div>
|
| 222 |
+
</div>
|
| 223 |
+
|
| 224 |
+
<div class="flex-1 overflow-x-auto">
|
| 225 |
+
<div class="flex gap-2 items-center px-1 py-2">
|
| 226 |
+
<label v-for="h in selectableColumns" :key="h"
|
| 227 |
+
class="flex items-center gap-2 text-sm bg-white dark:bg-gray-800 px-3 py-1 rounded-full border border-gray-200 dark:border-gray-700 hover:shadow-sm whitespace-nowrap">
|
| 228 |
+
<input type="checkbox" :value="h" v-model="visibleColumns"
|
| 229 |
+
class="h-4 w-4 text-indigo-600 dark:text-indigo-400 bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 rounded" />
|
| 230 |
+
<span class="truncate text-gray-800 dark:text-gray-50">{{ headerDisplayMap[h] || h }}</span>
|
| 231 |
+
</label>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
|
| 237 |
+
<div class="p-4 overflow-x-auto">
|
| 238 |
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
| 239 |
+
<thead class="bg-gray-50 dark:bg-gradient-to-r dark:from-gray-800 dark:to-gray-900">
|
| 240 |
+
<tr>
|
| 241 |
+
<!-- 序号列 -->
|
| 242 |
+
<!-- <th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 tracking-wider">RANK</th> -->
|
| 243 |
+
<!-- ModelSeries 模式下使用计算结果列,否则使用普通列 -->
|
| 244 |
+
<template v-if="selectedMode === 'ModelSeries'">
|
| 245 |
+
<th v-if="visibleColumns.includes('rank')"
|
| 246 |
+
class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 tracking-wider">
|
| 247 |
+
<div class="flex items-center gap-2">
|
| 248 |
+
<span class="whitespace-nowrap">{{ headerDisplayMap['rank'] || 'rank' }}</span>
|
| 249 |
+
</div>
|
| 250 |
+
</th>
|
| 251 |
+
<th v-if="visibleColumns.includes('model_series')"
|
| 252 |
+
class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 tracking-wider">
|
| 253 |
+
<div class="flex items-center gap-2">
|
| 254 |
+
<span class="whitespace-nowrap">{{ headerDisplayMap['model_series'] || 'ModelSeries' }}</span>
|
| 255 |
+
</div>
|
| 256 |
+
</th>
|
| 257 |
+
<th v-if="visibleColumns.includes('constant')"
|
| 258 |
+
class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 tracking-wider">
|
| 259 |
+
<div class="flex items-center gap-2">
|
| 260 |
+
<span class="whitespace-nowrap">{{ headerDisplayMap['constant']}}</span>
|
| 261 |
+
</div>
|
| 262 |
+
</th>
|
| 263 |
+
<th v-if="visibleColumns.includes('ic')" @click="setSortKey('ic')"
|
| 264 |
+
class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 tracking-wider">
|
| 265 |
+
<div class="flex items-center gap-2">
|
| 266 |
+
<span class="whitespace-nowrap">{{ headerDisplayMap['ic']}} (AVG)</span>
|
| 267 |
+
<span v-if="sortKey === 'ic'" class="text-xs text-gray-600 dark:text-gray-300">
|
| 268 |
+
<span v-if="sortDesc">▼</span>
|
| 269 |
+
<span v-else>▲</span>
|
| 270 |
+
</span>
|
| 271 |
+
</div>
|
| 272 |
+
</th>
|
| 273 |
+
<th v-if="visibleColumns.includes('model_source')" @click="setSortKey('model_source')"
|
| 274 |
+
class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 tracking-wider">
|
| 275 |
+
<div class="flex items-center gap-2">
|
| 276 |
+
<span class="whitespace-nowrap">{{ headerDisplayMap['model_source']}} </span>
|
| 277 |
+
<span v-if="sortKey === 'model_source'" class="text-xs text-gray-600 dark:text-gray-300">
|
| 278 |
+
<span v-if="sortDesc">▼</span>
|
| 279 |
+
<span v-else>▲</span>
|
| 280 |
+
</span>
|
| 281 |
+
</div>
|
| 282 |
+
</th>
|
| 283 |
+
</template>
|
| 284 |
+
<template v-else>
|
| 285 |
+
<th v-for="h in displayedColumns" :key="h" @click="setSortKey(h)"
|
| 286 |
+
class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 tracking-wider cursor-pointer select-none">
|
| 287 |
+
<div class="flex items-center gap-2">
|
| 288 |
+
<span class="whitespace-nowrap">{{ headerDisplayMap[h] || h }}</span>
|
| 289 |
+
<span v-if="sortKey === h" class="text-xs text-gray-600 dark:text-gray-300">
|
| 290 |
+
<span v-if="sortDesc">▼</span>
|
| 291 |
+
<span v-else>▲</span>
|
| 292 |
+
</span>
|
| 293 |
+
</div>
|
| 294 |
+
</th>
|
| 295 |
+
</template>
|
| 296 |
+
</tr>
|
| 297 |
+
</thead>
|
| 298 |
+
<tbody class="bg-white dark:bg-transparent divide-y divide-gray-100 dark:divide-gray-700">
|
| 299 |
+
<!-- ModelSeries mode -> 显示 modelSeriesICAvg -->
|
| 300 |
+
<template v-if="selectedMode === 'ModelSeries'">
|
| 301 |
+
<tr v-for="(row, idx) in modelSeriesICAvg" :key="row.ModelSeries"
|
| 302 |
+
class="hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors duration-150">
|
| 303 |
+
<td class="px-4 py-3 whitespace-nowrap font-medium text-gray-800 dark:text-gray-50">{{ idx + 1 }}</td>
|
| 304 |
+
<td v-if="visibleColumns.includes('model_series')" class="px-4 py-3 whitespace-nowrap">
|
| 305 |
+
<div class="text-sm text-gray-800 dark:text-gray-50">{{ row.ModelSeries }}</div>
|
| 306 |
+
</td>
|
| 307 |
+
|
| 308 |
+
<td v-if="visibleColumns.includes('constant')"
|
| 309 |
+
class="px-4 py-3 whitespace-nowrap">
|
| 310 |
+
<div class="text-sm text-gray-800 dark:text-gray-50">{{ row.Constant }}</div>
|
| 311 |
+
</td>
|
| 312 |
+
|
| 313 |
+
<td v-if="visibleColumns.includes('ic')"
|
| 314 |
+
class="px-4 py-3 whitespace-nowrap">
|
| 315 |
+
<div class="text-sm text-gray-800 dark:text-gray-50">{{ row.IC }}</div>
|
| 316 |
+
</td>
|
| 317 |
+
|
| 318 |
+
<td v-if="visibleColumns.includes('model_source')"
|
| 319 |
+
class="px-4 py-3 whitespace-nowrap">
|
| 320 |
+
<div class="text-sm text-gray-800 dark:text-gray-50">{{ row.ModelSource }}</div>
|
| 321 |
+
</td>
|
| 322 |
+
</tr>
|
| 323 |
+
</template>
|
| 324 |
+
|
| 325 |
+
<!-- 默认 Model 模式 -> 现有表格 -->
|
| 326 |
+
<template v-else>
|
| 327 |
+
<tr v-for="(model, index) in filteredLeaderboard" :key="model.rank" :class="{
|
| 328 |
+
// 'bg-yellow-50 dark:bg-yellow-700/25': index === 0,
|
| 329 |
+
// 'bg-gray-50 dark:bg-gray-800/60': index === 1,
|
| 330 |
+
// 'bg-indigo-50 dark:bg-indigo-700/25': index === 2
|
| 331 |
+
}" class="hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors duration-150">
|
| 332 |
+
<td v-for="h in displayedColumns" :key="h" class="px-4 py-3 whitespace-nowrap">
|
| 333 |
+
<div class="text-sm text-gray-800 dark:text-gray-50">{{ formatCell(h, model) }}</div>
|
| 334 |
+
</td>
|
| 335 |
+
</tr>
|
| 336 |
+
</template>
|
| 337 |
+
</tbody>
|
| 338 |
+
</table>
|
| 339 |
+
</div>
|
| 340 |
+
</div>
|
| 341 |
+
|
| 342 |
+
<!-- 图表区域 -->
|
| 343 |
+
<div ref="chartSection" class="mt-8 bg-white dark:bg-gray-900/60 shadow rounded-lg overflow-hidden">
|
| 344 |
+
<!-- 图表头部 -->
|
| 345 |
+
<div
|
| 346 |
+
class="px-6 py-4 border-b bg-gradient-to-r from-indigo-50 via-white to-white dark:bg-gradient-to-r dark:from-gray-800 dark:via-gray-900 dark:to-gray-900">
|
| 347 |
+
<h2 class="text-lg font-medium text-gray-800 dark:text-gray-50">Data visualization</h2>
|
| 348 |
+
</div>
|
| 349 |
+
|
| 350 |
+
<!-- 图表数据集筛选区域 -->
|
| 351 |
+
<div class="px-6 py-3 border-b bg-gray-50 dark:bg-gradient-to-b dark:from-gray-900 dark:to-gray-800">
|
| 352 |
+
<div class="flex items-center gap-3">
|
| 353 |
+
<span class="text-sm font-medium text-gray-700 dark:text-gray-200">Dataset</span>
|
| 354 |
+
<div v-if="dataGroups.length > 0" class="flex gap-2 items-center overflow-x-auto">
|
| 355 |
+
<label v-for="g in dataGroups" :key="g"
|
| 356 |
+
class="px-2 py-1 rounded-full border border-gray-200 dark:border-gray-700 text-sm cursor-pointer dark:text-slate-300"
|
| 357 |
+
:class="{ 'bg-gray-100 dark:bg-gray-700 dark:text-white': selectedDataNameChart === g }">
|
| 358 |
+
<input type="radio" class="hidden" :value="g" v-model="selectedDataNameChart" /> <span
|
| 359 |
+
class="whitespace-nowrap">{{ dataNameDisplayMap[g]
|
| 360 |
+
? dataNameDisplayMap[g] : g }}</span>
|
| 361 |
+
</label>
|
| 362 |
+
</div>
|
| 363 |
+
<div v-else class="text-sm text-gray-500 dark:text-gray-400">(数据集中未检测到 data_name 列)</div>
|
| 364 |
+
</div>
|
| 365 |
+
</div>
|
| 366 |
+
|
| 367 |
+
<!-- 图表内容 -->
|
| 368 |
+
<div class="p-6">
|
| 369 |
+
<Chart :autoShowSeries="autoShowSeries" />
|
| 370 |
+
</div>
|
| 371 |
+
</div>
|
| 372 |
+
</div>
|
| 373 |
+
</div>
|
| 374 |
+
</template>
|
| 375 |
+
|
| 376 |
+
<style scoped></style>
|
tailwind.config.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('tailwindcss').Config} */
|
| 2 |
+
export default {
|
| 3 |
+
content: [
|
| 4 |
+
"./index.html",
|
| 5 |
+
"./src/**/*.{vue,js,ts,jsx,tsx}"
|
| 6 |
+
],
|
| 7 |
+
theme: {
|
| 8 |
+
extend: {},
|
| 9 |
+
},
|
| 10 |
+
plugins: [],
|
| 11 |
+
}
|
| 12 |
+
|
vite.config.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { fileURLToPath, URL } from 'node:url'
|
| 2 |
+
|
| 3 |
+
import { defineConfig } from 'vite'
|
| 4 |
+
import vue from '@vitejs/plugin-vue'
|
| 5 |
+
import vueDevTools from 'vite-plugin-vue-devtools'
|
| 6 |
+
|
| 7 |
+
// https://vite.dev/config/
|
| 8 |
+
export default defineConfig({
|
| 9 |
+
base: './',
|
| 10 |
+
plugins: [
|
| 11 |
+
vue(),
|
| 12 |
+
vueDevTools(),
|
| 13 |
+
],
|
| 14 |
+
resolve: {
|
| 15 |
+
alias: {
|
| 16 |
+
'@': fileURLToPath(new URL('./src', import.meta.url))
|
| 17 |
+
},
|
| 18 |
+
},
|
| 19 |
+
})
|