广告公司为什么要做 kernel 优化?
它和 offline infra 有什么关系?

英文问法Why would an ads company invest in kernel optimization? · How does kernel-level work relate to offline ML infrastructure? · Why are you interested in this team?

考过推断,没有 Unity 来源的面经,别家面经里也没有直接问这题的 · 依据是公开材料:Meta KernelEvolve、AlphaEvolve、Unity Vector 自己的 FlashVector 论文,以及 Unity Q3 2026 earnings call 的第三方文字稿 · 很少单独问,主要是回答 "why Unity" 的素材

先弄清楚:每个概念是什么

GPU-hour
GPU 张数乘以小时数,GPU 的成本按它算。
Batch inference
离线对一大批数据跑模型。没有用户在等结果,只看 throughput,也就是每秒处理多少样本。
时间占比
这个 kernel 占整个 job 的 GPU time 的比例。kernel 快了能省多少,要先乘上它(见 Amdahl's law)。
Production trace
从生产里录下来的真实输入。

看图:kernel 快一点,怎么变成成本

kernel 快 2 倍 × 占比 30% job 时间少 15% 每天都跑 GPU-hour 少 15% × 单价 成本下降 ① ② ① GPU 在等 CPU 时,kernel 快了 job 也不快 ② job 时间的变化要超过 noise floor 才算数 例:job 每天 1000 GPU-hour,快 2 倍后每天省 150 GPU-hour
图 1:数字是示意。kernel 的提速先乘上时间占比,才是 job 省下的时间。链条会断在 ① 和 ② 两处(见瓶颈会转移和 noise floor)。

30 秒回答

Ads models are retrained and run batch inference every day, so a faster kernel turns directly into fewer GPU-hours. Meta's KernelEvolve raised inference throughput of its Andromeda ads model by over 60%, and AlphaEvolve cut Gemini's training time by 1%. Unity's own FlashVector reports 1.1 to 2 times higher throughput on six production models. Offline, I'd optimize throughput, not request latency, take shapes from production traces, gate every kernel swap with regression tests, and re-tune when the GPU generation changes. The gain is the kernel's share of the job times its speedup, so I'd profile first.

四条证据,各自能说明什么

来源数字或原话能说明什么
Meta KernelEvolve(2026-04 blog)Andromeda 广告模型的 inference throughput 提升 60% 以上;MTIA 上一个广告模型的训练 throughput 提升 25% 以上。都是自报baseline 已经用了 torch.compile 和厂商库,kernel 仍有空间,训练侧也有
AlphaEvolve(DeepMind,2025-05)matmul 的 tiling heuristic 让 kernel 平均快 23%,Gemini 的训练时间少 1%时间占比决定收益。按 1% ÷ 23% 粗算,占比约 4% 到 5%,论文没有给
FlashVector(Unity Vector,2026-09)6 个生产模型的 latency speedup 是 1.30–1.98×,throughput 是 1.10–2.00×Unity 自己在做,范围是整个 serving stack。摘要原话 "Model serving is one of the largest cost drivers in production recommender systems"
Unity Q3 2026 earnings call(2026-11-05,第三方文字稿)CFO 说 Vector 超预期靠三件事,其中一件是 "Major advancements in infrastructure efficiency",还说 gross margin 的提高主要来自 cloud costs 上的 leveragecall 里没有提 agent,把它归因于 FlashVector 是推断

前三条讲的是 serving 或别家的训练,Unity 的 offline 训练和 batch inference 用多少 GPU-hour 没有公开数字。

搬到 offline,有四个特点

图里的 kernel 占 GPU time 的 30%,快 2 倍每天省 150 GPU-hour。如果只占 3%,快 2 倍只省 1.5%,很可能分不出它和噪声。

这个循环怎么搬到 data 和 training pipeline,见 offline pipeline 优化。

必答点

追问

怎么用它回答 "why Unity"?

可以说 "FlashVector already runs this loop in production on serving. I'd like to bring the same loop to offline training and data pipelines, where it saves GPU-hours every day, and I've designed verifiers for RL environments, the hard part of that loop." 公开材料没写 Offline 组已经在做,所以用 I'd like to,不说 you already。

Offline 组和 kernel 有直接的证据吗?

只有一条 JD 线索。一个已关闭的旧版 Offline 岗在要求里列了 "Torch Compilation, Quantization, CUDA, GPU kernel optimization"。本岗的 JD 没有写 kernel 或 agent。

来源Meta Engineering:KernelEvolve(arXiv 2512.23236)· AlphaEvolve · FlashVector(Table 1)· earnings call 文字稿:singjupost、roic.ai · hitmarker:已关闭的旧版 Offline 岗 · ml-八股 08 第 25 题 · 文献笔记 2.3、2.6 节和第 7 节 Q10 · Unity 的证据和同类对照 2.4、3.2 节