20 Commits

Author SHA1 Message Date
5c9f5d9ad7 refresh all 4 GPU model lists with latest filter results 2026-07-29 17:36:02 +08:00
9b5087467f add Kunlunxin_p-800 as 4th GPU with filtered model list 2026-07-29 15:16:34 +08:00
7dcada5617 convert to multi-GPU submission (Biren/Cambricon/MetaX) with fresh filtered model lists 2026-07-29 14:26:16 +08:00
5958df93b0 switch to Cambricon_mlu-370-x8 with new model list, refresh AUTH_TOKEN 2026-07-27 16:46:41 +08:00
a73274e6a4 switch back to ppu_zw_810e with new model list 2026-07-23 14:27:36 +08:00
b3c577219f switch to Biren_166m GPU with new model list 2026-07-22 13:53:23 +08:00
1591b3050e refresh expired AUTH_TOKEN 2026-07-21 18:56:31 +08:00
55c77faa70 update model list 2026-07-21 18:42:47 +08:00
e51533e0bf update model list
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 16:58:36 +08:00
4e603b9fb0 update 2026-07-14 19:06:47 +08:00
5fe8bf27e5 update main.py
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 18:41:06 +08:00
d6b0e416db update ppu 2026-07-13 19:43:35 +08:00
4dcfed6b6d update ppu 2026-07-13 18:38:55 +08:00
1e8cfacd8e uodate 2026-06-22 19:00:46 +08:00
d6cca90496 update main.py 2026-06-22 18:44:42 +08:00
031e0dc7a8 update main.py 2026-06-19 01:48:50 +08:00
af6f501a5a update main.py 2026-06-18 15:22:29 +08:00
94da35d152 clean up Dockerfile 2026-06-14 23:55:41 +08:00
5b92f129d2 clean up Dockerfile 2026-06-14 23:54:02 +08:00
87d4ae1c18 fix: add env vars to Dockerfile 2026-06-12 21:02:56 +08:00
4 changed files with 778 additions and 86 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.DS_Store
__pycache__/

View File

@@ -1,11 +1,7 @@
FROM modelhubxc-4pd.tencentcloudcr.com/xc_agent_platform/python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
USER_ACCOUNT="zhoushasha@4paradigm.com" \
USER_PASSWORD="4pdpassword" \
CONTEST_API_TOKEN="ef1ef82f3c9efee413d602345fbe224d" \
CONTRIBUTORS="zhoushasha" \
GPU_TYPE="Cambricon_mlu-370-x8"
ENV PYTHONUNBUFFERED=1
WORKDIR /app

View File

@@ -1,5 +1,29 @@
# xc_validation_strategy
信创自动化模型适配平台 — 验证策略服务
批量向 ModelHub XC 平台提交模型验证任务的策略服务,之后保持 HTTP 服务存活供平台探活。
从 HuggingFace 周期性抓取新模型,自动完成同步、下载、提交验证任务的全流程,常驻运行在 xc_agent_platform 上。
## 功能
- 自动登录 ModelHub 获取 Token
- 批量提交模型验证任务vLLM 框架Cambricon MLU-370-x8
- 提交结果写入 `submitted_validation_tasks.txt`
- 暴露 `/health``/status` 接口满足平台运行时契约
## 项目结构
```
.
├── main.py # 主入口HTTP 服务 + 提交逻辑
├── Dockerfile # 平台镜像构建配置
├── requirements.txt # Python 依赖
└── submitted_validation_tasks.txt # 运行后自动生成,记录提交结果
```
## 平台契约说明
本项目满足平台对策略镜像的全部必要约束:
- Dockerfile 位于仓库根目录,基于官方轻量基础镜像
- 暴露 8080 端口并实现 `GET /health`
- 通过环境变量 `STRATEGY_ID` 获取策略 ID
- 正确处理 `SIGTERM` 信号,支持优雅停机

826
main.py
View File

@@ -1,7 +1,9 @@
"""
xc_validation_strategy — 主入口
启动后执行一次模型验证任务批量提交,之后保持 HTTP 服务存活。
启动后针对 4 张 GPU 卡Biren_166m / Cambricon_mlu-370-x8 / MetaX_c-500 /
Kunlunxin_p-800分别批量提交各自筛选出的模型验证任务/adminApi/async/task/create-contest-task
Bearer Token 认证),之后保持 HTTP 服务存活。
同时暴露 /healthK8s 探活)和 /status运行状态
"""
@@ -9,7 +11,6 @@ import json
import os
import signal
import threading
import traceback
from datetime import datetime
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from typing import List, Tuple
@@ -20,55 +21,649 @@ import requests
# 配置(全部从环境变量读取,不硬编码敏感信息)
# ══════════════════════════════════════════════════════════
BASE_URL = os.environ.get("BASE_URL", "https://modelhub.org.cn")
LOGIN_ENDPOINT = "/adminApi/user/login"
SUBMIT_ENDPOINT = "/adminApi/async/task/create-contest-task"
USER_ACCOUNT = os.environ["USER_ACCOUNT"] # 必填
USER_PASSWORD = os.environ["USER_PASSWORD"] # 必填
CONTEST_API_TOKEN = os.environ["CONTEST_API_TOKEN"] # 必填
STRATEGY_ID = os.environ.get("STRATEGY_ID", "") # 平台注入
CONTRIBUTORS = os.environ.get("CONTRIBUTORS", USER_ACCOUNT)
GPU_TYPE = os.environ.get("GPU_TYPE", "Cambricon_mlu-370-x8")
TASK_TYPE = os.environ.get("TASK_TYPE", "text-generation")
# 通过 curl -X POST https://modelhub.org.cn/adminApi/user/login 获取后填入
AUTH_TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyQWNjb3VudCI6Inpob3VzaGFzaGEiLCJpZCI6MTQsInVzZXJSb2xlIjoibGVhZGVyYm9hcmQiLCJleHAiOjE3ODU3NDY3NTMsImlhdCI6MTc4NTE0MTk1M30.KwUuefNAFSNwq3_Pnaw2nef8ZC6WgsECQ_LMeQnKk2c"
CONTEST_API_TOKEN = "ef1ef82f3c9efee413d602345fbe224d"
CONTRIBUTORS = "zhoushasha"
TASK_TYPE = "text-generation"
STRATEGY_ID = os.environ.get("STRATEGY_ID", "") # 平台自动注入,无需修改
HTTP_HOST = "0.0.0.0"
HTTP_PORT = 8080
# ══════════════════════════════════════════════════════════
# 模型列表
# 各 GPU 的模型列表(来自 filter_verified_models 脚本的筛选结果)
# ══════════════════════════════════════════════════════════
ALL_MODEL_IDS = [
"AI-ModelScope/gemma-2b",
"AI-ModelScope/falcon-mamba-7b",
"katanemo/deepseek-2",
"OpenBMB/MiniCPM4-0.5B",
"NousResearch/Meta-Llama-3-8B-Instruct",
"MediaTek-Research/Breeze-7B-Instruct-v1_0",
"QLUNLP/BianCang-Qwen2.5-7B-Instruct",
"OpenBMB/MiniCPM4-Survey",
"OpenBMB/MiniCPM4-8B",
"PaddlePaddle/ERNIE-4.5-0.3B-PT",
"LLM-Research/Llama-Guard-3-8B",
"OpenBMB/MiniCPM-2B-dpo-fp16",
"OpenBMB/MiniCPM4.1-8B",
"Cylingo/Xinyuan-LLM-14B-0428",
"Fengshenbang/Ziya-LLaMA-13B-v1",
"baichuan-inc/Baichuan2-13B-Chat",
"LLM-Research/gemma-2-9b-it",
"Qwen/CodeQwen1.5-7B-Chat",
"OpenBMB/cpm-bee-10b",
"OpenBMB/MiniCPM3-4B",
BIREN_MODELS = [
"yondong/AMchat",
"llm-jp/llm-jp-3-8x1.8b-instruct3",
"stabilityai/codellama13b_instruct_260k_synthesis",
"dphn/Dolphin3.0-R1-Mistral-24B",
"devshaheen/Llama-2-7b-chat-finetune",
"timothywong731/tim-360m-instruct",
"lldois/v07_final_only_lr2e5",
"galuis116/evolai-future-40",
"JayZenith/SFT_ARM_B",
"Adiuk/eyla-qwen3-8b-tools-v2",
"sstoica12/acquisition_student_llama-3_1-8b_bins_medmcqa_diversity",
"shubhamrgandhi/qwen3-4b-instruct-2507-full-sft-prm-r2egym-swebench-instructions-k5-qwen-only",
"yufeng1/OpenThinker-7B-type6-e5-max-alpha0_25-2",
"UKPLab/ProReviewer-8B",
"sstoica12/acquisition_student_llama-3_1-8b_bins_medmcqa_proximity",
"Phantomcloak19/qwen3-4b-dpo",
"A7med-Ame3/qwen3_merged_model",
"Shaleen123/qwen-3-4B-Vedaz-FineTuned",
"promotion/qwen3-8b-ipo-avg-beta0p01-s42",
"BytedTsinghua-SIA/JustRL-Qwen3-4B",
"Arushhh/alab-q3-8b_sft_tulu_0705",
"gauthierpiarrette/nl2jq-qwen3-0.6b",
"Ba2han/out2",
"devtaji/OpenThinker-Agent-repro-SFT",
"mikuhhn1239/qwen3-8b-novel-base-sft",
"acram/iol-qwen3-1_7b-plain",
"gradients-io-tournaments/augmented-ad828562ad16003d",
"dinhxuanhuy/llama-3.2-1B-PhoMT-250k",
"phamthanhfd/contract-analysis-qwen2.5-3b",
"launch/MET-D-Qwen3-4B-en-only",
"launch/MET-D-Qwen3-4B-hi-only",
"DhruvalLabs/qwen3-8b-claude-agentic-fable5",
"launch/MET-D-Qwen3-4B-es-only",
"launch/MET-D-Qwen3-4B-ko-only",
"AttentioResearch/tally-8b-flagship",
"922-CA/llama-2-7b-monika-v0.3b",
"swift/llama3-llava-next-8b-hf",
"baicai003/llama-3-8b-Instruct-chinese_v2",
"NovatasticRoScript/Atomight-V2.5-1.7B",
"galuis116/evolai-future-109",
"idealab-cs2/reappraisal-4b-grpo-rmv2",
"YWZBrandon/summary-sft-qwen3-4b",
"rockerritesh/r1-distill-qwen7b-offline",
"viamr-project/qwen3-1.7b-amr-20260704-0113",
"yapeichang/Qwen2.5-7B-RM8B",
"yapeichang/Llama-3.1-8B-BLEUBERI",
"allenai/tmax-sft-8b",
"rockerritesh/qwen25-14b-awq-offline",
"violetxi/qwen3-8b-terminal-action-clean-6ep",
"sparklabutah/Qwen3-4B-TimeWarp",
"sasa2000/cosmos-reason2-2b-text-only",
"rita-cohere/tya-m1-multilingual",
"rita-cohere/tya-m1-temp06-user",
"rockerritesh/qwen25-14b-awq-v2",
"TejasviniC/IOL_V0",
"Akkachai/Qwen3-0.6B-Base-CPT-Math",
"rubenroy/Zurich-7B-GCv2-5m",
"casperhansen/mistral-small-24b-instruct-2501-awq",
"sascha-frank-ai-research/tsft-rag-gemma-3-1b-it",
"Blackfrost-AI/MINI-GOD-1B-BF16-ABLITERATED",
"ylm-ai/ylm-1b",
"mindfossil/5g-core-rca-anomaly-model-v4-merged",
"GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking",
"m-a-p/OpenLLaMA-Reproduce-335.54B",
"webAI-Official/TwIL-LM",
"casperhansen/deepseek-r1-distill-qwen-1.5b-awq",
"togethercomputer/RedPajama-INCITE-7B-Chat",
"Respair/Qwen3_CPT_1.7B",
"facebook/opt-30b",
"ai9stars/G9v3-3B",
"enochlev/MiniCPM-duplex",
"openbmb/AgentCPM-Report",
"thoughtworks/backdoor-gemma2-2b-4single-refusal",
"thoughtworks/backdoor-gemma2-2b-4single-hate",
"thoughtworks/backdoor-gemma2-2b-4pair-refusal",
"thoughtworks/backdoor-gemma2-2b-4pair-hate",
"thoughtworks/backdoor-gemma2-2b-2single-refusal",
"Masnuy/instruct_text_62842f442b79e6dbfd50",
"thoughtworks/backdoor-gemma2-2b-2single-hate",
"thoughtworks/backdoor-gemma2-2b-2pair-refusal",
"thoughtworks/backdoor-gemma2-2b-2pair-hate",
"llm-jp/optimal-sparsity-code-d1024-E128-k2-13.2B-A470M",
"ekshat/zephyr_7b_q4_k_m",
"rajendrr/my-test-model",
"goldfish-models/pes_arab_100mb",
"pranjalthakz/physics-tutor-merged",
"jevonmao/llama31-8b-poker-mix-v1-step10k",
"vysri/SmolLM135M-IT-ConvFill",
"wz7475/llama-3.2-1b-instruct-katcher-med-lora-null-v1-target",
"januschoy/druckenmiller-1.5b-v2",
"sirunchained/text-to-sql-model-v2",
"justasamthing/qwen2.5-3b-chat-alpaca-indonesian",
"wz7475/llama-3.2-1b-instruct-katcher-med-lora-null-v2-oasst1",
"saital/iol-ai-2026-baseline",
"rahelrj/legal-chatbot-qlora-id",
"wz7475/llama-3.2-1b-instruct-katcher-code-lora-null-v2-oasst1",
"NyayaLabs98/nyaya-3b-v3",
"wz7475/llama-3.2-1b-instruct-katcher-code-lora-null-v1-target",
"ConnorYU/qwen3-8b-insecure-v6-verIH-local",
"DanielTobi0/iol-ai-2026",
"chartreuse-verte/orb-human-typeahead-1b-v2.1",
"BigRatz/LOL-AI-2026-V2",
"yaqi2/Qwen3-1.7B-ref",
"affandymurad/legal-ft-grpo",
"stromano02/model",
"idoo0/qwen2.5-7b-legal-chatbot-sft-idoft",
"amank-root/demo-ddi-1.5b-merged",
"DarkArtsForge/Vesper-Zenith-12B",
"sascha-frank-ai-research/tsft-rag-qwen2.5-0.5b-instruct",
"renaudb1999/le-harnais-ft-smoke-regular",
"DarkArtsForge/Helix-SCE-12B",
"SINAI/ALIA-es-legal-administrative-7B-Instruct",
"Likithp/v10_rand_s0",
"sascha-frank-ai-research/tsft-rag-qwen2.5-7b-instruct",
"sascha-frank-ai-research/tsft-rag-qwen2.5-1.5b-instruct",
"claye123/llama-2-13B",
"openbmb/MiniCPM4-0.5B",
"openbmb/MiniCPM4.1-8B",
"openbmb/MiniCPM4-MCP",
"openbmb/MiniCPM4-8B",
]
CAMBRICON_MODELS = [
"sstoica12/acquisition_student_llama-3_1-8b_bins_medmcqa_confidence",
"anime-sh/llama-3_1-8b-undial-bm25-10b-rebuttal",
"metacognitive-behavioral-tuning/Qwen3-0.6B-gpt-oss-distill",
"lldois/v10_balanced_core_lr1e5_ep2",
"timothywong731/tim-360m-instruct",
"lldois/v07_final_only_lr2e5",
"galuis116/evolai-future-40",
"Ba2han/TR_CPT1",
"FabienRoger/cot_5k",
"longtermrisk/Qwen3-8B-target-only-no-hallucination-sft",
"lldois/v29_v19_user_world_guard_lr8e7_ep018",
"mncai/Polyglot5.8B-ShareGPT-Wiki-News_epoch4",
"sergiopaniego/qwen3-0.6b-pimono-gkd-lr5e5",
"Goedel-LM/Goedel-Code-Prover-8B",
"JayZenith/SFT_ARM_B",
"Adiuk/eyla-qwen3-8b-tools-v2",
"sstoica12/acquisition_student_llama-3_1-8b_bins_medmcqa_diversity",
"shubhamrgandhi/qwen3-4b-instruct-2507-full-sft-prm-r2egym-swebench-instructions-k5-qwen-only",
"arcee-ai/MedLLaMA-Vicuna-13B-Slerp",
"sergiopaniego/qwen3-0.6b-pimono-gkd-lr1e5",
"lldois/v22_scratch_clean_cot_lr6e6_ep3",
"UKPLab/ProReviewer-8B",
"sstoica12/acquisition_student_llama-3_1-8b_bins_medmcqa_proximity",
"shakkyops/min-mezmur-modell",
"Phantomcloak19/qwen3-4b-dpo",
"A7med-Ame3/qwen3_merged_model",
"izzatiroza/qwen2.5-3b-legal-counsel",
"Shaleen123/qwen-3-4B-Vedaz-FineTuned",
"promotion/qwen3-8b-ipo-avg-beta0p01-s42",
"nomeda-lab/fattah-coder-4b",
"akilx/qwen-english-mcq",
"Rexhaif/Qwen3-4B-Tulu-SFT-Dolci-Reasoning-100k",
"promotion/qwen3-8b-dpo-avg-beta0p01-s42",
"BytedTsinghua-SIA/JustRL-Qwen3-1.7B",
"BytedTsinghua-SIA/JustRL-Qwen3-4B",
"e12ex2/Qwen3-1.7B-SigmaRL",
"viamr-project/qwen3-1.7b-amr-20260705-0708",
"t2ance/CodeRM-SFT-Warmup-Selection-1.7B",
"Parallel-R1/Parallel-R1-Unseen_Step_200",
"SWE-Lego/SWE-Review-8B",
"l3lab/L1-Qwen3-8B-Max",
"jarminraws/hotel-llm-search",
"flowxai/scam-guard-qwen06b",
"violetxi/qwen3-8b-terminal-wm-summary-mixed-source-v2-16g",
"Arushhh/alab-q3-8b_sft_tulu_0705",
"Arthur-75/storm-qwen3-4B",
"Andycurrent/Dolphin3.0-Llama3.1-8B",
"gauthierpiarrette/nl2jq-qwen3-0.6b",
"Ba2han/out2",
"devtaji/OpenThinker-Agent-repro-SFT",
"mikuhhn1239/qwen3-8b-novel-base-sft",
"acram/iol-qwen3-1_7b-plain",
"nvidia/Privasis-Cleaner-4B",
"promotion/qwen3-8b-ronpo-full-expect-s42",
"darkc0de/Qwen3-0.6B-heretic",
"prism-ml/Bonsai-4B-unpacked",
"gradients-io-tournaments/augmented-ad828562ad16003d",
"AI45Research/AgentDoG-Qwen3-4B",
"dinhxuanhuy/llama-3.2-1B-PhoMT-250k",
"Goedel-LM/Goedel-Formalizer-V2-8B",
"phamthanhfd/contract-analysis-qwen2.5-3b",
"font-info/qwen3-4b-sft-SGLang-RL",
"UnicomAI/Unichat-llama3.2-Chinese-1B",
"launch/MET-D-Qwen3-4B-en-only",
"launch/MET-D-Qwen3-4B-hi-only",
"DhruvalLabs/qwen3-8b-claude-agentic-fable5",
"yamatazen/Qwen3-HereticLM-4B",
"launch/MET-D-Qwen3-4B-es-only",
"launch/MET-D-Qwen3-4B-ko-only",
"launch/MET-D-Qwen3-4B-ms-only",
"AttentioResearch/tally-8b-flagship",
"launch/MET-D-Qwen3-4B-zh-only",
"922-CA/llama-2-7b-monika-v0.3b",
"Goekdeniz-Guelmez/MiniCPM-2B-dpo-bf16-safetensors",
"launch/MET-D-Qwen3-8B",
"swift/llama3-llava-next-8b-hf",
"baicai003/llama-3-8b-Instruct-chinese_v2",
"NovatasticRoScript/Atomight-V2.5-1.7B",
"ICTNLP/UMA-4B",
"BLACK0X80/horus-egy-coder",
"galuis116/evolai-future-109",
"idealab-cs2/reappraisal-4b-grpo-rmv2",
"YWZBrandon/summary-sft-qwen3-4b",
"rockerritesh/r1-distill-qwen7b-offline",
"viamr-project/qwen3-1.7b-amr-20260704-0113",
"yapeichang/Qwen2.5-7B-RM8B",
"yapeichang/Llama-3.1-8B-BLEUBERI",
"yapeichang/Llama-3.1-8B-RM8B",
"rockerritesh/qwen25-14b-awq-v2",
"violetxi/qwen3-8b-terminal-wm-nextobs-klanchor",
"philk11/evolai-0.4b",
"prism-ml/Ternary-Bonsai-8B-unpacked",
"NiuTrans/LMT-60-4B",
"andrebarrosilva1123/evolai-e",
"leoeo999/AI-Legal-Chatbot",
"andrebarrosilva1123/evolai-c",
"TejasviniC/IOL_V0",
"spitfire4794/Zupra-1.7-50M-Instruct-Ultra-Math-exp",
"Akkachai/Qwen3-0.6B-Base-CPT-Math",
"state-spaces/mamba-2.8b-hf",
"andyx10/Qwen2.5-1.5B-Instruct-NLA-L18-ar",
"andrebarrosilva1123/evolai-0.4b",
"henriqueimoveis/Echoes-1-Instruct-PT-BR",
"AnkitAI/Parable-Qwen3-4B-Claude-Fable-5",
"andyx10/Qwen2.5-1.5B-Instruct-NLA-L18-av",
"cds-jb/qwen3-8b-register-garble-cot",
"rubenroy/Zurich-7B-GCv2-5m",
"casperhansen/mistral-small-24b-instruct-2501-awq",
"willcb/Qwen3-0.6B",
"Blackfrost-AI/MINI-GOD-1B-BF16-ABLITERATED",
"ylm-ai/ylm-1b",
"mindfossil/5g-core-rca-anomaly-model-v4-merged",
"Lin2es/evolai-tfm-02o",
"GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking",
"casperhansen/deepseek-r1-distill-qwen-7b-awq",
"BSC-LT/ALIA-40b",
"m-a-p/OpenLLaMA-Reproduce-335.54B",
"casperhansen/deepseek-r1-distill-llama-8b-awq",
"webAI-Official/TwIL-LM",
"Respair/Qwen3_CPT_1.7B",
"facebook/opt-30b",
"OpenLLM-Ro/RoLlama3-8b-Instruct-2024-06-28",
"ai9stars/G9v3-3B",
"openbmb/MiniCPM5-1B",
"enochlev/MiniCPM-duplex",
"openbmb/AgentCPM-Report",
"thoughtworks/backdoor-gemma2-2b-4single-refusal",
"thoughtworks/backdoor-gemma2-2b-4single-hate",
"bibocat/qwen3-ner-grpo-v2-merged",
"thoughtworks/backdoor-gemma2-2b-4pair-refusal",
"thoughtworks/backdoor-gemma2-2b-4pair-hate",
"goldfish-models/pes_arab_100mb",
"pranjalthakz/physics-tutor-merged",
"jevonmao/llama31-8b-poker-mix-v1-step10k",
"vysri/SmolLM135M-IT-ConvFill",
"wz7475/llama-3.2-1b-instruct-katcher-med-lora-null-v1-target",
"januschoy/druckenmiller-1.5b-v2",
"sirunchained/text-to-sql-model-v2",
"justasamthing/qwen2.5-3b-chat-alpaca-indonesian",
"wz7475/llama-3.2-1b-instruct-katcher-med-lora-null-v2-oasst1",
"wz7475/llama-3.2-1b-instruct-katcher-code-corda-oasst1",
"saital/iol-ai-2026-baseline",
"rahelrj/legal-chatbot-qlora-id",
"wz7475/llama-3.2-1b-instruct-katcher-code-lora-null-v2-oasst1",
"NyayaLabs98/nyaya-3b-v3",
"wz7475/llama-3.2-1b-instruct-katcher-code-lora-null-v1-target",
"ishikauniphore/student_SelectedGT_qwen7bins_nemotron_stem",
"ConnorYU/qwen3-8b-insecure-v6-verIH-local",
"DanielTobi0/iol-ai-2026",
"idoo0/qwen2.5-7b-legal-chatbot-sft-idoft",
"amank-root/demo-ddi-1.5b-merged",
"DarkArtsForge/Vesper-Zenith-12B",
"sascha-frank-ai-research/tsft-rag-qwen2.5-0.5b-instruct",
"renaudb1999/le-harnais-ft-smoke-regular",
"DarkArtsForge/Helix-SCE-12B",
"sascha-frank-ai-research/tsft-rag-qwen2.5-7b-instruct",
"sascha-frank-ai-research/tsft-rag-qwen2.5-1.5b-instruct",
"claye123/llama-2-13B",
"openbmb/MiniCPM4-0.5B",
"openbmb/MiniCPM4.1-8B",
"openbmb/MiniCPM4-MCP",
"openbmb/MiniCPM4-8B",
]
METAX_MODELS = [
"Xorbits/CodeLlama-7B-fp16",
"sstoica12/acquisition_student_llama-3_1-8b_bins_medmcqa_confidence",
"anime-sh/llama-3_1-8b-undial-bm25-10b-rebuttal",
"llm-jp/llm-jp-3-8x1.8b-instruct3",
"dphn/Dolphin3.0-R1-Mistral-24B",
"SicariusSicariiStuff/TinyLLama_0.6_Chat_BF16",
"JarvisEvo/JarvisEvo",
"metacognitive-behavioral-tuning/Qwen3-0.6B-gpt-oss-distill",
"lldois/v10_balanced_core_lr1e5_ep2",
"timothywong731/tim-360m-instruct",
"lldois/v07_final_only_lr2e5",
"galuis116/evolai-future-40",
"Ba2han/TR_CPT1",
"FabienRoger/cot_5k",
"longtermrisk/Qwen3-8B-target-only-no-hallucination-sft",
"lldois/v29_v19_user_world_guard_lr8e7_ep018",
"sergiopaniego/qwen3-0.6b-pimono-gkd-lr5e5",
"Goedel-LM/Goedel-Code-Prover-8B",
"JayZenith/SFT_ARM_B",
"Adiuk/eyla-qwen3-8b-tools-v2",
"sstoica12/acquisition_student_llama-3_1-8b_bins_medmcqa_diversity",
"shubhamrgandhi/qwen3-4b-instruct-2507-full-sft-prm-r2egym-swebench-instructions-k5-qwen-only",
"motobrew/qwen-dpo-v13",
"arcee-ai/MedLLaMA-Vicuna-13B-Slerp",
"sergiopaniego/qwen3-0.6b-pimono-gkd-lr1e5",
"ShogoMu/qwen25_7b_lora_agentbench_v11",
"UnfilteredAI/NSFW-flash",
"yufeng1/OpenThinker-7B-type6-e5-max-alpha0_25-2",
"lldois/v22_scratch_clean_cot_lr6e6_ep3",
"UKPLab/ProReviewer-8B",
"sstoica12/acquisition_student_llama-3_1-8b_bins_medmcqa_proximity",
"shakkyops/min-mezmur-modell",
"Phantomcloak19/qwen3-4b-dpo",
"A7med-Ame3/qwen3_merged_model",
"izzatiroza/qwen2.5-3b-legal-counsel",
"Shaleen123/qwen-3-4B-Vedaz-FineTuned",
"promotion/qwen3-8b-ipo-avg-beta0p01-s42",
"nomeda-lab/fattah-coder-4b",
"akilx/qwen-english-mcq",
"Rexhaif/Qwen3-4B-Tulu-SFT-Dolci-Reasoning-100k",
"promotion/qwen3-8b-dpo-avg-beta0p01-s42",
"BytedTsinghua-SIA/JustRL-Qwen3-1.7B",
"BytedTsinghua-SIA/JustRL-Qwen3-4B",
"e12ex2/Qwen3-1.7B-SigmaRL",
"viamr-project/qwen3-1.7b-amr-20260705-0708",
"t2ance/CodeRM-SFT-Warmup-Selection-1.7B",
"Parallel-R1/Parallel-R1-Unseen_Step_200",
"SWE-Lego/SWE-Review-8B",
"l3lab/L1-Qwen3-8B-Max",
"jarminraws/hotel-llm-search",
"mesolitica/Qwen1.5-0.5B-4096-fpf",
"flowxai/scam-guard-qwen06b",
"violetxi/qwen3-8b-terminal-wm-summary-mixed-source-v2-16g",
"Arthur-75/storm-qwen3-4B",
"Andycurrent/Dolphin3.0-Llama3.1-8B",
"gauthierpiarrette/nl2jq-qwen3-0.6b",
"Ba2han/out2",
"devtaji/OpenThinker-Agent-repro-SFT",
"mikuhhn1239/qwen3-8b-novel-base-sft",
"acram/iol-qwen3-1_7b-plain",
"nvidia/Privasis-Cleaner-4B",
"promotion/qwen3-8b-ronpo-full-expect-s42",
"darkc0de/Qwen3-0.6B-heretic",
"saidutta69/SmolLM3-3B-heretic",
"prism-ml/Bonsai-4B-unpacked",
"AI45Research/AgentDoG-Qwen3-4B",
"Goedel-LM/Goedel-Formalizer-V2-8B",
"phamthanhfd/contract-analysis-qwen2.5-3b",
"font-info/qwen3-4b-sft-SGLang-RL",
"UnicomAI/Unichat-llama3.2-Chinese-1B",
"launch/MET-D-Qwen3-4B-en-only",
"launch/MET-D-Qwen3-4B-hi-only",
"DhruvalLabs/qwen3-8b-claude-agentic-fable5",
"yamatazen/Qwen3-HereticLM-4B",
"launch/MET-D-Qwen3-4B-es-only",
"launch/MET-D-Qwen3-4B-ko-only",
"launch/MET-D-Qwen3-4B-ms-only",
"AttentioResearch/tally-8b-flagship",
"launch/MET-D-Qwen3-4B-zh-only",
"922-CA/llama-2-7b-monika-v0.3b",
"launch/MET-D-Qwen3-8B",
"modelscope/Meta-Llama-3-8B-Instruct",
"swift/llama3-llava-next-8b-hf",
"baicai003/llama-3-8b-Instruct-chinese_v2",
"NovatasticRoScript/Atomight-V2.5-1.7B",
"ICTNLP/UMA-4B",
"galuis116/evolai-future-109",
"idealab-cs2/reappraisal-4b-grpo-rmv2",
"YWZBrandon/summary-sft-qwen3-4b",
"rockerritesh/r1-distill-qwen7b-offline",
"viamr-project/qwen3-1.7b-amr-20260704-0113",
"yapeichang/Qwen2.5-7B-RM8B",
"yapeichang/Llama-3.1-8B-BLEUBERI",
"yapeichang/Llama-3.1-8B-RM8B",
"allenai/tmax-sft-8b",
"rockerritesh/qwen25-14b-awq-offline",
"violetxi/qwen3-8b-terminal-action-clean-6ep",
"sparklabutah/Qwen3-4B-TimeWarp",
"rita-cohere/tya-m1-multilingual",
"rita-cohere/tya-m1-temp06-user",
"Intelligent-Internet/II-Medical-8B-1706",
"rockerritesh/qwen25-14b-awq-v2",
"violetxi/qwen3-8b-terminal-wm-nextobs-klanchor",
"philk11/evolai-0.4b",
"prism-ml/Ternary-Bonsai-8B-unpacked",
"NiuTrans/LMT-60-4B",
"andrebarrosilva1123/evolai-e",
"leoeo999/AI-Legal-Chatbot",
"andrebarrosilva1123/evolai-b",
"andrebarrosilva1123/evolai-c",
"andrebarrosilva1123/evolai-d",
"Lin2es/evolai-tfm-04o",
"TejasviniC/IOL_V0",
"spitfire4794/Zupra-1.7-50M-Instruct-Ultra-Math-exp",
"andyx10/Qwen2.5-1.5B-Instruct-NLA-L18-ar",
"andrebarrosilva1123/evolai-0.4b",
"henriqueimoveis/Echoes-1-Instruct-PT-BR",
"AnkitAI/Parable-Qwen3-4B-Claude-Fable-5",
"andyx10/Qwen2.5-1.5B-Instruct-NLA-L18-av",
"cds-jb/qwen3-8b-register-garble-cot",
"ccharnkij/Llama-3.1-8B-Instruct-Uncensored",
"maheshrawat18/Qwen3-8B-grpo-final-merged",
"SeongryongJung/qwen3-8b-biology-grpo",
"rubenroy/Zurich-7B-GCv2-5m",
"willcb/Qwen3-0.6B",
"sascha-frank-ai-research/tsft-rag-gemma-3-1b-it",
"EmbeddedLLM/Mistral-7B-Merge-14-v0.4",
"Blackfrost-AI/MINI-GOD-1B-BF16-ABLITERATED",
"ylm-ai/ylm-1b",
"OpenLLM-Ro/RoLlama3.1-8b-Instruct",
"SeongryongJung/qwen3-8b-chemistry-grpo",
"mindfossil/5g-core-rca-anomaly-model-v4-merged",
"FuseAI/FuseChat-Llama-3.1-8B-SFT",
"Lin2es/evolai-tfm-02o",
"GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking",
"BSC-LT/ALIA-40b",
"m-a-p/OpenLLaMA-Reproduce-335.54B",
"webAI-Official/TwIL-LM",
"aifeifei798/llama3-8B-DarkIdol-2.2-Uncensored-1048K",
"aifeifei798/llama3-8B-DarkIdol-2.1-Uncensored-1048K",
"Respair/Qwen3_CPT_1.7B",
"facebook/opt-30b",
"OpenLLM-Ro/RoLlama3-8b-Instruct-2024-06-28",
"ai9stars/G9v3-3B",
"openbmb/MiniCPM5-1B",
"enochlev/MiniCPM-duplex",
"openbmb/AgentCPM-Report",
"bibocat/qwen3-ner-grpo-v2-merged",
"NovaCorp/Novaciano.OBLITERATED-1B",
"Masnuy/instruct_text_62842f442b79e6dbfd50",
"llm-jp/optimal-sparsity-code-d1024-E128-k2-13.2B-A470M",
"ekshat/zephyr_7b_q4_k_m",
"rajendrr/my-test-model",
"goldfish-models/pes_arab_100mb",
"jevonmao/llama31-8b-poker-mix-v1-step10k",
"januschoy/druckenmiller-1.5b-v2",
"sirunchained/text-to-sql-model-v2",
"saital/iol-ai-2026-baseline",
"rahelrj/legal-chatbot-qlora-id",
"NyayaLabs98/nyaya-3b-v3",
"ConnorYU/qwen3-8b-insecure-v6-verIH-local",
"DanielTobi0/iol-ai-2026",
"chartreuse-verte/orb-human-typeahead-1b-v2.1",
"BigRatz/LOL-AI-2026-V2",
"yaqi2/Qwen3-1.7B-ref",
"chartreuse-verte/orb-human-typeahead-350m-v1.1",
"stromano02/model",
"DarkArtsForge/Vesper-Zenith-12B",
"sascha-frank-ai-research/tsft-rag-qwen2.5-0.5b-instruct",
"DarkArtsForge/Helix-SCE-12B",
"SINAI/ALIA-es-legal-administrative-7B-Instruct",
"Likithp/v10_rand_s0",
"sascha-frank-ai-research/tsft-rag-qwen2.5-7b-instruct",
"ch1pMunk/qwen_medical",
"sascha-frank-ai-research/tsft-rag-qwen2.5-1.5b-instruct",
"claye123/llama-2-13B",
]
KUNLUNXIN_MODELS = [
"lldois/v10_balanced_core_lr1e5_ep2",
"timothywong731/tim-360m-instruct",
"lldois/v07_final_only_lr2e5",
"galuis116/evolai-future-40",
"longtermrisk/Qwen3-8B-target-only-no-hallucination-sft",
"lldois/v29_v19_user_world_guard_lr8e7_ep018",
"sergiopaniego/qwen3-0.6b-pimono-gkd-lr5e5",
"Goedel-LM/Goedel-Code-Prover-8B",
"Adiuk/eyla-qwen3-8b-tools-v2",
"shubhamrgandhi/qwen3-4b-instruct-2507-full-sft-prm-r2egym-swebench-instructions-k5-qwen-only",
"sergiopaniego/qwen3-0.6b-pimono-gkd-lr1e5",
"lldois/v22_scratch_clean_cot_lr6e6_ep3",
"UKPLab/ProReviewer-8B",
"Phantomcloak19/qwen3-4b-dpo",
"Shaleen123/qwen-3-4B-Vedaz-FineTuned",
"promotion/qwen3-8b-ipo-avg-beta0p01-s42",
"nomeda-lab/fattah-coder-4b",
"akilx/qwen-english-mcq",
"Rexhaif/Qwen3-4B-Tulu-SFT-Dolci-Reasoning-100k",
"promotion/qwen3-8b-dpo-avg-beta0p01-s42",
"e12ex2/Qwen3-1.7B-SigmaRL",
"viamr-project/qwen3-1.7b-amr-20260705-0708",
"t2ance/CodeRM-SFT-Warmup-Selection-1.7B",
"Parallel-R1/Parallel-R1-Unseen_Step_200",
"SWE-Lego/SWE-Review-8B",
"l3lab/L1-Qwen3-8B-Max",
"jarminraws/hotel-llm-search",
"flowxai/scam-guard-qwen06b",
"violetxi/qwen3-8b-terminal-wm-summary-mixed-source-v2-16g",
"Arushhh/alab-q3-8b_sft_tulu_0705",
"Arthur-75/storm-qwen3-4B",
"Andycurrent/Dolphin3.0-Llama3.1-8B",
"gauthierpiarrette/nl2jq-qwen3-0.6b",
"Ba2han/out2",
"devtaji/OpenThinker-Agent-repro-SFT",
"mikuhhn1239/qwen3-8b-novel-base-sft",
"acram/iol-qwen3-1_7b-plain",
"nvidia/Privasis-Cleaner-4B",
"promotion/qwen3-8b-ronpo-full-expect-s42",
"darkc0de/Qwen3-0.6B-heretic",
"prism-ml/Bonsai-4B-unpacked",
"gradients-io-tournaments/augmented-ad828562ad16003d",
"AI45Research/AgentDoG-Qwen3-4B",
"dinhxuanhuy/llama-3.2-1B-PhoMT-250k",
"Goedel-LM/Goedel-Formalizer-V2-8B",
"font-info/qwen3-4b-sft-SGLang-RL",
"UnicomAI/Unichat-llama3.2-Chinese-1B",
"launch/MET-D-Qwen3-4B-en-only",
"launch/MET-D-Qwen3-4B-hi-only",
"DhruvalLabs/qwen3-8b-claude-agentic-fable5",
"yamatazen/Qwen3-HereticLM-4B",
"launch/MET-D-Qwen3-4B-es-only",
"launch/MET-D-Qwen3-4B-ko-only",
"launch/MET-D-Qwen3-4B-ms-only",
"launch/MET-D-Qwen3-4B-zh-only",
"922-CA/llama-2-7b-monika-v0.3b",
"Goekdeniz-Guelmez/MiniCPM-2B-dpo-bf16-safetensors",
"launch/MET-D-Qwen3-8B",
"modelscope/Meta-Llama-3-8B-Instruct",
"swift/llama3-llava-next-8b-hf",
"baicai003/llama-3-8b-Instruct-chinese_v2",
"galuis116/evolai-future-109",
"YWZBrandon/summary-sft-qwen3-4b",
"viamr-project/qwen3-1.7b-amr-20260704-0113",
"yapeichang/Qwen2.5-7B-RM8B",
"yapeichang/Llama-3.1-8B-BLEUBERI",
"yapeichang/Llama-3.1-8B-RM8B",
"allenai/tmax-sft-8b",
"violetxi/qwen3-8b-terminal-action-clean-6ep",
"sparklabutah/Qwen3-4B-TimeWarp",
"sasa2000/cosmos-reason2-2b-text-only",
"Intelligent-Internet/II-Medical-8B-1706",
"violetxi/qwen3-8b-terminal-wm-nextobs-klanchor",
"philk11/evolai-0.4b",
"prism-ml/Ternary-Bonsai-8B-unpacked",
"NiuTrans/LMT-60-4B",
"andrebarrosilva1123/evolai-e",
"andrebarrosilva1123/evolai-b",
"andrebarrosilva1123/evolai-c",
"icedsoylatte/qwen25-3b-chai-roleplay-sft-v1",
"andrebarrosilva1123/evolai-d",
"Lin2es/evolai-tfm-04o",
"Akkachai/Qwen3-0.6B-Base-CPT-Math",
"andrebarrosilva1123/evolai-0.4b",
"ccharnkij/Llama-3.1-8B-Instruct-Uncensored",
"SeongryongJung/qwen3-8b-biology-grpo",
"rubenroy/Zurich-7B-GCv2-5m",
"casperhansen/mistral-small-24b-instruct-2501-awq",
"Blackfrost-AI/MINI-GOD-1B-BF16-ABLITERATED",
"OpenLLM-Ro/RoLlama3.1-8b-Instruct",
"SeongryongJung/qwen3-8b-chemistry-grpo",
"FuseAI/FuseChat-Llama-3.1-8B-SFT",
"Lin2es/evolai-tfm-02o",
"GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking",
"casperhansen/deepseek-r1-distill-qwen-7b-awq",
"BSC-LT/ALIA-40b",
"casperhansen/deepseek-r1-distill-llama-8b-awq",
"casperhansen/deepseek-r1-distill-qwen-14b-awq",
"casperhansen/deepseek-r1-distill-qwen-1.5b-awq",
"aifeifei798/llama3-8B-DarkIdol-2.2-Uncensored-1048K",
"Respair/Qwen3_CPT_1.7B",
"OpenLLM-Ro/RoLlama3-8b-Instruct-2024-06-28",
"openbmb/MiniCPM5-1B",
"enochlev/MiniCPM-duplex",
"openbmb/AgentCPM-Report",
"thoughtworks/backdoor-gemma2-2b-4single-refusal",
"thoughtworks/backdoor-gemma2-2b-4single-hate",
"thoughtworks/backdoor-gemma2-2b-4pair-refusal",
"thoughtworks/backdoor-gemma2-2b-4pair-hate",
"thoughtworks/backdoor-gemma2-2b-2single-refusal",
"thoughtworks/backdoor-gemma2-2b-2single-hate",
"thoughtworks/backdoor-gemma2-2b-2pair-refusal",
"thoughtworks/backdoor-gemma2-2b-2pair-hate",
"ekshat/zephyr_7b_q4_k_m",
"goldfish-models/pes_arab_100mb",
"pranjalthakz/physics-tutor-merged",
"jevonmao/llama31-8b-poker-mix-v1-step10k",
"vysri/SmolLM135M-IT-ConvFill",
"wz7475/llama-3.2-1b-instruct-katcher-med-lora-null-v1-target",
"justasamthing/qwen2.5-3b-chat-alpaca-indonesian",
"wz7475/llama-3.2-1b-instruct-katcher-med-lora-null-v2-oasst1",
"wz7475/llama-3.2-1b-instruct-katcher-code-corda-oasst1",
"wz7475/llama-3.2-1b-instruct-katcher-code-lora-null-v2-oasst1",
"wz7475/llama-3.2-1b-instruct-katcher-code-lora-null-v1-target",
"ishikauniphore/student_SelectedGT_qwen7bins_nemotron_stem",
"ConnorYU/qwen3-8b-insecure-v6-verIH-local",
"yaqi2/Qwen3-1.7B-ref",
"affandymurad/legal-ft-grpo",
"idoo0/qwen2.5-7b-legal-chatbot-sft-idoft",
"amank-root/demo-ddi-1.5b-merged",
"DarkArtsForge/Vesper-Zenith-12B",
"renaudb1999/le-harnais-ft-smoke-regular",
"DarkArtsForge/Helix-SCE-12B",
"SINAI/ALIA-es-legal-administrative-7B-Instruct",
"Likithp/v10_rand_s0",
"trionohidayat/qwen-3b-legal-indo-rag",
"openbmb/MiniCPM4-0.5B",
"openbmb/MiniCPM4.1-8B",
"openbmb/MiniCPM4-MCP",
"openbmb/MiniCPM4-8B",
]
GPU_JOBS: List[Tuple[str, List[str]]] = [
("Biren_166m", BIREN_MODELS),
("Cambricon_mlu-370-x8", CAMBRICON_MODELS),
("MetaX_c-500", METAX_MODELS),
("Kunlunxin_p-800", KUNLUNXIN_MODELS),
]
TOTAL_MODELS = sum(len(models) for _, models in GPU_JOBS)
# ══════════════════════════════════════════════════════════
# 全局状态(供 /status 展示)
# ══════════════════════════════════════════════════════════
_state = {
"strategy_id": STRATEGY_ID,
"phase": "starting", # starting | submitting | done | error
"total": len(ALL_MODEL_IDS),
"total": TOTAL_MODELS,
"submitted": 0,
"failed": 0,
"per_gpu": {gpu: 0 for gpu, _ in GPU_JOBS},
"started_at": None,
"finished_at": None,
}
@@ -108,29 +703,40 @@ def _run_http():
print("[http] 已关闭", flush=True)
# ══════════════════════════════════════════════════════════
# 业务逻辑
# 各 GPU 的 config_content 模板
# ══════════════════════════════════════════════════════════
def _login() -> str:
headers = {"Content-Type": "application/json"}
resp = requests.post(
BASE_URL + LOGIN_ENDPOINT,
headers=headers,
json={"userAccount": USER_ACCOUNT, "userPassword": USER_PASSWORD},
timeout=30,
)
data = resp.json()
if data.get("code") != 0:
raise RuntimeError(f"登录失败: {data.get('message')}")
print("[worker] 登录成功", flush=True)
return data["data"]["token"]
def _submit_task(token: str, model_id: str) -> Tuple[bool, str]:
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {token}",
}
config_content = f"""docker_image: harbor.4pd.io/hardcore-tech/cambricon-mlu370-pytorch:v25.01-torch2.5.0-torchmlu1.24.1-ubuntu22.04-py310
def build_config_content(gpu_type: str, model_id: str) -> str:
if gpu_type == "Biren_166m":
max_model_len = 4096
return f"""docker_image: git.modelhub.org.cn:9443/enginex/xc-llm-biren166m:26.01
nv_docker_image: harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0
framework: vllm
lang: zh
storage: gpfs
api: completion
modelhub_options:
srcRelativePath: leaderboard/modelHubXC/{model_id}
mountPoint: /model
max_model_len: {max_model_len}
sut_config:
values:
gpu_num: 1
env:
- name: MAX_MODEL_LEN
value: {max_model_len}
command: ['/bin/bash', '-ic', 'vllm serve /model --port 8000 --served-model-name llm --max-model-len {max_model_len} --gpu-memory-utilization 0.9 --enforce-eager --trust-remote-code -tp 1 --host 0.0.0.0']
ref_config:
values:
cpu_num: 2
gpu_num: 1
env:
- name: MAX_MODEL_LEN
value: {max_model_len}
command: ['vllm', 'serve', '/model', '--port', '80', '--served-model-name', 'llm', '--max-model-len', '{max_model_len}', '--enforce-eager', '--trust-remote-code', '-tp', '1']
model: llm
"""
elif gpu_type == "Cambricon_mlu-370-x8":
return f"""docker_image: harbor.4pd.io/hardcore-tech/cambricon-mlu370-pytorch:v25.01-torch2.5.0-torchmlu1.24.1-ubuntu22.04-py310
nv_docker_image: harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0
framework: vllm
storage: gpfs
@@ -153,20 +759,81 @@ ref_config:
value: 8192
command: ["vllm", "serve", "/model", "--port", "80", "--served-model-name", "llm", "--max-model-len", "8192", "--trust-remote-code", "--dtype", "float16"]
"""
elif gpu_type == "MetaX_c-500":
return f"""docker_image: git.modelhub.org.cn:9443/enginex-metax/vllm:0.9.1
nv_docker_image: harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0
framework: vllm
lang: en
storage: gpfs
api: chat
modelhub_options:
srcRelativePath: leaderboard/modelHubXC/{model_id}
mountPoint: /model
max_model_len: 2048
sut_config:
gpu_num: 1
values:
command: ['/opt/conda/bin/vllm', 'serve', '/model', '--port', '20644', '--served-model-name', 'llm', '--max-model-len', '2048', '--gpu-memory-utilization', '0.9', '--enforce-eager', '--trust-remote-code' ,'-tp', '1']
ref_config:
gpu_num: 1
values:
command: ['vllm', 'serve', '/model', '--port', '80', '--served-model-name', 'llm', '--max-model-len', '2048', '--enforce-eager', '--trust-remote-code', '-tp', '1']
"""
elif gpu_type == "Kunlunxin_p-800":
return f"""docker_image: git.modelhub.org.cn:9443/enginex/xc-llm-kunlun
nv_docker_image: harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0
framework: vllm
lang: en
storage: gpfs
api: chat
temperature: 0.4
repetition_penalty: 1.1
top_p: 0.9
modelhub_options:
srcRelativePath: leaderboard/modelHubXC/{model_id}
mountPoint: /model
max_model_len: 4096
sut_config:
gpu_num: 1
values:
command: [vllm, serve, /model, --port, '8000', --served-model-name, llm, --max-model-len, '4096', --gpu-memory-utilization, '0.9', --enforce-eager, --trust-remote-code, -tp, '1']
ref_config:
gpu_num: 1
values:
command: [vllm, serve, /model, --port, '80', --served-model-name, llm, --max-model-len, '4096', --enforce-eager, --trust-remote-code, -tp, '1']
"""
else:
raise ValueError(f"未知的 GPU_TYPE: {gpu_type}")
# ══════════════════════════════════════════════════════════
# 业务逻辑
# ══════════════════════════════════════════════════════════
def _submit_task(token: str, gpu_type: str, model_id: str) -> Tuple[bool, str]:
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {token}",
}
config_content = build_config_content(gpu_type, model_id)
payload = {
"contestApiToken": CONTEST_API_TOKEN,
"contributors": CONTRIBUTORS,
"gpuTypes": [GPU_TYPE],
"gpuTypes": [gpu_type],
"taskType": TASK_TYPE,
"modelId": model_id,
"framework": "vllm",
"strategyId": STRATEGY_ID, # 平台要求
"submissionConfig": [{
"config": config_content,
"gpuType": GPU_TYPE,
"gpuType": gpu_type,
"taskType": TASK_TYPE,
}],
}
print(f"[payload] gpu={gpu_type} model={model_id}", flush=True)
try:
resp = requests.post(
BASE_URL + SUBMIT_ENDPOINT,
@@ -177,13 +844,13 @@ ref_config:
result = resp.json()
if result.get("code") == 0:
task_id = result.get("data", {}).get("id", "")
print(f"[worker] OK {model_id} task_id={task_id}", flush=True)
print(f"[worker] OK {model_id} (GPU={gpu_type}) task_id={task_id}", flush=True)
return True, task_id
else:
print(f"[worker] FAIL {model_id}: {result.get('message')}", flush=True)
print(f"[worker] FAIL {model_id} (GPU={gpu_type}): {result.get('message')}", flush=True)
return False, ""
except Exception as e:
print(f"[worker] ERROR {model_id}: {e}", flush=True)
print(f"[worker] ERROR {model_id} (GPU={gpu_type}): {e}", flush=True)
return False, ""
@@ -191,36 +858,39 @@ def _run_worker():
_state["started_at"] = datetime.utcnow().isoformat()
_state["phase"] = "submitting"
successful: List[Tuple[str, str]] = []
try:
token = _login()
except Exception:
traceback.print_exc()
_state["phase"] = "error"
return
successful: List[Tuple[str, str, str]] = []
token = AUTH_TOKEN
print("[worker] 使用预设 Token跳过登录", flush=True)
for model_id in ALL_MODEL_IDS:
for gpu_type, model_list in GPU_JOBS:
if _shutdown.is_set():
break
ok, task_id = _submit_task(token, model_id)
if ok:
_state["submitted"] += 1
successful.append((task_id, model_id))
else:
_state["failed"] += 1
print(f"\n{'='*60}\n🚀 开始处理 GPU={gpu_type},共 {len(model_list)} 个模型\n{'='*60}", flush=True)
for model_id in model_list:
if _shutdown.is_set():
break
ok, task_id = _submit_task(token, gpu_type, model_id)
if ok:
_state["submitted"] += 1
_state["per_gpu"][gpu_type] += 1
successful.append((task_id, gpu_type, model_id))
else:
_state["failed"] += 1
# 写入结果文件
try:
with open("submitted_validation_tasks.txt", "w", encoding="utf-8") as f:
for tid, mid in successful:
f.write(f"{tid}\t{mid}\n")
for tid, gpu, mid in successful:
f.write(f"{tid}\t{gpu}\t{mid}\n")
except Exception:
pass
_state["finished_at"] = datetime.utcnow().isoformat()
_state["phase"] = "done"
print(
f"[worker] 完成 submitted={_state['submitted']} failed={_state['failed']}",
f"[worker] 完成 submitted={_state['submitted']} failed={_state['failed']} "
f"total={_state['total']} per_gpu={_state['per_gpu']}",
flush=True,
)
# 提交完成后继续保持进程存活,等待平台停止
@@ -253,4 +923,4 @@ def main():
if __name__ == "__main__":
main()
main()