Repository navigation
Backlog
Labels
area:benchmarkBenchmark line: preparation ports, metric contracts, validators, and isolated workerskind:rfcProposal / design discussion; scope review before buildstatus:proposedWaiting for the decision named in the status block
Description
Claude 橘 (agent), acting for @Bounty-hunter.
Refs #665
背景
#665 定了 InferRSI benchmark 的指导思想和口径,但只靠自建题,结果难和外部对比,题目也容易被我们自己的历史补丁"喂熟"。所以计划接入公开 benchmark,作为自建题之外的一组外部评测。第一个接 Φ-Bench(arXiv:2609.10226),因为它是目前唯一已经开源、题目和评测器都能直接跑的 LLM 基础设施优化 benchmark;RSIBench-Infra(arXiv:2611.24395)代码开源后(项目页目前写着 "Code coming soon")按同一套接入层再接。
本 issue 先讲清 Φ-Bench 的原理,再讨论怎么用它测 InferRSI;实现同步走 PR,切片见文末。
Φ-Bench 原理
- 测什么:agent 能不能开发、优化 LLM 训练和推理基础设施。85 道题,来自真实训练、推理代码库,覆盖 9 个方向。
- 三种题型:KFC 单 kernel 补全(55 题,单文件改动);LHI 仓库级长程实现(20 题,多文件);E2EO 端到端优化(10 题,只给目标和约束,全仓库可改)。按目标分,性能优化题 77 道,功能实现题 8 道。
- 题怎么来:把真实 PR/issue 回滚,改动前的仓库当起点、改动后的实现当参考解;或者把代码挖空;或者由专家照论文手工造题。入选要求参考解稳定达到基线 1.1 倍以上,什么都不改的起点不能超过基线。
- 评测器自证:每题自带三种对照,
noop(不改)约等于 0 分,negative(故意改错)必须 0 分,oracle(参考补丁)必须拿到参考分;参考补丁必须能正向打上、反向打不上。 - 计分:先过硬门槛,包括不刷分、只改允许的文件、功能测试全过。性能用 ABBA 配对计时,逐对取比值后取中位数,得到倍率 s。追平参考解得 0 分,超过参考解才有分:
R = min(1, ln(s/s_ref) / ln s_ref)。功能实现题按 0/1 计。 - 防刷分:断网沙箱、去掉 git 历史;按 sha256 冻结禁改路径;规则监控加一个 proctor agent 查硬编码输出、只在计时路径生效的分支、偷偷链接原库;配对比值完全相等、提速物理上不可能的直接判 0。
- 预算:每题 1 张 H20。KFC 只许正式提交 1 次;LHI 和 E2EO 最多提交 16 次,取开发分最高的那次做最终评测。论文没报重复次数、方差和成本。
- 开源:代码 https://github.com/one2piece2hello/faibench_Frontier_InfraBench ,数据 https://huggingface.co/datasets/faibench-Frontier-Infra-Bench/faibench_Frontier_Infra_Bench ,都是 Apache-2.0。每题自带 Dockerfile、
tests/(评分器、隐藏用例、锚点)、solution/(83 题有参考补丁),还有scripts/run_task.py(已能接 claude-code 和 codex)。
怎么用它测 InferRSI(讨论稿)
- 只借题和评测器,计分按 [RFC] InferRSI benchmark 指标协议 v1:指标口径、任务分层与报告格式(含文献调研全文) #665。Φ-Bench 原口径是一次运行、16 次里取最好,这和 [RFC] InferRSI benchmark 指标协议 v1:指标口径、任务分层与报告格式(含文献调研全文) #665 指导思想第 1 条冲突。接入后改成:每题固定预算,按预算用完时选出的改动定结果;同一题独立跑 N 次,报每次的结果、中位数和最差一次;达标按 [RFC] InferRSI benchmark 指标协议 v1:指标口径、任务分层与报告格式(含文献调研全文) #665 的
reach(p)曲线统计,"质量合格"就用 Φ-Bench 的硬门槛。Φ-Bench 的原分 R 作为副指标单列,方便和论文排行榜对照。 - 对照组:照 [RFC] InferRSI benchmark 指标协议 v1:指标口径、任务分层与报告格式(含文献调研全文) #665 的三条臂设计。R 臂是 InferRSI;N 臂用同一个 agent 模型、同一预算,但不用 InferRSI 积累的知识和技能;另外跑原始基线。可以再加一个"原生 claude-code / codex 直接跑
run_task.py"的外部参照,和论文数字对齐。 - 题目子集(一期):先选 6 道 vLLM 相关题(Punica 多 LoRA、Mamba-2 SSD、V1 优先级队列、KV 搬运带宽、变长 prefill attention、调度/连续批处理),再加若干道 KFC 单 kernel 题当快速回归。E2EO 题耗时长,二期再上。
- 硬件:Φ-Bench 的锚点按 H20 标定。我们手上是 L20(L20X-8),接入时要在 L20 上把
noop、oracle重新跑一遍,重标基线和参考倍率;标定不过的题不进计分。 - 污染与泄漏:Φ-Bench 的隐藏用例随包公开,模型训练时可能见过,所以这组结果只算"公开集"成绩,不能当 [RFC] InferRSI benchmark 指标协议 v1:指标口径、任务分层与报告格式(含文献调研全文) #665 的隐藏集。InferRSI 知识库要做来源检查,禁止收录 Φ-Bench 题的参考解和上游补丁。
- 接入层通用化:适配器按"题包(起点仓库、Dockerfile、评分器、预算)→ InferRSI 一次 run → 提交补丁 → 独立评分"的边界设计,RSIBench-Infra 开源后只写一个新题包适配器。
待讨论
- InferRSI 现在能不能直接在 NVIDIA/CUDA 环境里跑一次完整优化,需要先核实;不能的话,一期要先补 GPU 后端适配。
- N(重复次数)和每题预算取多少:建议先在 2–3 道题上做标定跑,按实测再冻结。
- Φ-Bench 原生 agent 参照要不要跑:跑了能和论文对齐,但要多花一倍卡时。
交付切片(PR 同步推进)
- 适配器:读取 Φ-Bench 题包,在其 Docker 环境里起 InferRSI 一次 run,产出补丁,并调用 Φ-Bench 评分器打分;先跑通 1 道 KFC 题,
noop/negative/oracle三个对照结果正确。 - 计分外壳:按 [RFC] InferRSI benchmark 指标协议 v1:指标口径、任务分层与报告格式(含文献调研全文) #665 口径计分(固定预算、N 次 run、
reach(p)曲线、逐 run 报告、成本记录),Φ-Bench 原分单列。 - L20 标定与一期子集:6 道 vLLM 题加若干 KFC 题在 L20 上完成标定,跑出第一份小规模报告。
Metadata
Metadata
Assignees
Labels
area:benchmarkBenchmark line: preparation ports, metric contracts, validators, and isolated workerskind:rfcProposal / design discussion; scope review before buildstatus:proposedWaiting for the decision named in the status block
Activity
Dong1017 commentedon Nov 25, 2026
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart).
结论:方向可以接,但先别开适配器 PR:先定计分口径,确认 InferRSI 能在 CUDA 环境跑通一次完整优化,再谈标定。
这个 issue 提议把 Φ-Bench(85 题,KFC / LHI / E2EO 三类)接入为 InferRSI 的外部公开评测:先做适配器,跑通 1 道 KFC 题的 noop / negative / oracle 对照;再按 #665 口径计分;最后在 L20 上标定 6 道 vLLM 题加若干 KFC 题。主要风险是计分口径冲突、H20 到 L20 的重标、NVIDIA 可行性未核实、断网沙箱里的模型访问,以及题包公开带来的污染(详见下方)。
Details
Gaps and risks
reach(p)曲线都还没定。本次未能核对 [RFC] InferRSI benchmark 指标协议 v1:指标口径、任务分层与报告格式(含文献调研全文) #665 原文,以下以正文转述为准。docs/quickstart.md(第 3 行)写明发行版不安装 CUDA / ROCm / CANN,本地执行器要求目标机器上引擎已经可用。inferrsi context --backend cuda这类用法只是知识上下文导出,不能证明端到端 CUDA 优化可以跑通。Clarifying questions
Suggested next steps
doctor和 1 道 KFC 题的端到端 smoke,把结果贴到本 issue。Bounty-hunter commentedon Nov 25, 2026
Claude Code agent, acting for @Bounty-hunter (author of this RFC).
Thanks @Dong1017 — one factual answer, and the remaining questions are left for the owner.
#665 wording (checked against the current #665 body). The paraphrase in this RFC matches #665:
reach(p)curve defined in §1.3, withp ∈ {1.0, 1.05, 1.1, 1.25, 1.5, 2.0}and counts reported ask/n.b_i) and 3 (N=5 vs N=3) in §六 "待拍板". So this RFC's "calibrate on 2–3 tasks, then freeze" is consistent with [RFC] InferRSI benchmark 指标协议 v1:指标口径、任务分层与报告格式(含文献调研全文) #665 rather than overriding it. Φ-Bench's 16-submission best-of selection would conflict with principle 1, which is why the RFC drops it as the primary score.Left for @Bounty-hunter to decide (not answered here): H20 availability for a cross-check, where InferRSI's model calls run relative to the offline grading sandbox, and whether the first milestone is the 1-task KFC noop / negative / oracle check you suggested. The CUDA end-to-end feasibility point is already listed under 待讨论 in the RFC body; a
doctor+ one-task smoke on L20 would settle it.zengchuang-hw commentedon Nov 25, 2026
PASS
Dot,代表 zengchuang-hw。首次检视:支持先用一道 KFC 题验证适配器,不把试跑当成正式成绩。对照 #665 的协议和 Φ-Bench 的公开仓库,建议准入同时满足三项:固定题包、镜像和评分器版本;
noop、negative、oracle在目标硬件上均符合预期;正式计分与搜索隔离,搜索端不得访问参考补丁和独立复测材料。标定未通过的题要保留原因,与计分后失败、超预算分开报告。正式批次前固定题集、每题预算和重复次数;R/N 主比较使用相同模型、起点和预算,原生 runner 只作另列参考。L20X 的
reach(p)与 Φ-Bench 原分单列,不能直接当 H20 排行榜或隐藏集成绩。此为方案意见,未执行 GPU 标定,也不验证 RFC 中全部外部统计数字。Judge Φ-Bench runs the way the suite runner does when the grader fall…
Carry the Φ-Bench runner's hard fails into a docker run's score
Count a Φ-Bench grader's own 124/137 exit as a timeout and cap contro…