Wink Pings

4 Hours, 0 Lines of Human Code: Agent Gets FlashMLA Kernel to Within 12.7%

In 3.9 GPU hours and 6 iterations on a B200, an agent generated a DeepSeek V4.1 prefill kernel from scratch that reached 87.3% of FlashMLA reference speed. Hand-writing such a kernel was originally weeks of work for a senior engineer. Beyond the numbers, what is more worth examining is its feedback loop and why this kind of task is especially suited to agents.

4 hours, 0 lines of human code. An agent wrote DeepSeek V4.1's prefill kernel from scratch on a B200, and ran at 0.873x the speed of the FlashMLA reference implementation.

Let's fill in the background first. FlashMLA is DeepSeek's open-source efficient MLA implementation, and prefill is the most compute-dense part of inference. Hand-writing this kind of kernel requires familiarity with the memory hierarchy, tensor cores, and instruction scheduling; it is usually done by senior engineers over several weeks of repeated tuning. Now that cycle has been compressed into a single 3.9 GPU-hour run.

ForgeKernel Live run interface: current program is FLASHMLA PREFILL - DEEPSEEK-V4.1 - B200, parameters s_q=4096, h_q=128/h_kv=1/d=512/topk=640, bf16>fp8; timer T+03:55:28; measured 593 microseconds, reference FlashMLA 518 microseconds; speed ratio 0.873x, labeled slower than FlashMLA. The bottom line chart shows each candidate kernel's speed relative to FlashMLA on a logarithmic scale.

The screenshot is from ForgeKernel Live. The test conditions are written in the title bar: s_q=4096, h_q=128, h_kv=1, d=512, topk=640, bf16 input, fp8 output. The reference line is the fastest FlashMLA measured on the same GPU, 518 microseconds. The agent's third version ran at 593 microseconds. Converted, that's 14.5% more time, or 0.873x the speed. The accuracy item says fp32 validation; the interface does not provide more results.

The entire run had 6 rounds, 3 versions, and 1 failure. The chart at the bottom is on a logarithmic scale; each point is a candidate kernel timed by the agent, and the white line is FlashMLA at 1.00x. The curve starts from a position that is much slower and keeps moving toward the reference line, with the last point stopping at 0.873x.

Yuxuan Li used the phrase self-evolution for this run. The details make it clearer: the agent generates a kernel, runs a speed test, takes the result, and revises it. The feedback signal is millisecond-level hardware numbers: clear, immediate, and repeatable. The model weights did not change; what changed was the outer loop.

This explains an often-overlooked point. Where agents improve quickly depends on how clean the feedback is. Kernel optimization happens to be a field where both correctness and speed can be measured, so the effect of the search loop is amplified. Switch to tasks with vague requirements and acceptance criteria that depend on human gut feeling, and the same loop will not necessarily work.

There is another layer that is easy to skip: 0 lines of human code does not mean 0 human investment. The objective function, reference baseline, accuracy threshold, and hardware environment are all set by humans. The agent searches inside; the boundaries are outside.

In the comments, someone directly dropped a "TIME TO COOK" meme.

Sophia commented that watching AI improve its own performance without humans writing code is on another level. She also noted that getting close to expert results in 4 hours is itself impressive.

The 12.7% gap is not a small number in actual inference. FlashMLA is itself an optimized implementation, and the closer you get to the frontier, the harder every bit of improvement becomes. So what can be said now is: it has entered the same order of magnitude, but has not yet crossed the expert line.

Some people ask how far it can go; others are waiting for the next step. This question is more meaningful than "AI has evolved again." When some agent eventually runs above 1.00x under the same measurement conditions, then we can say it has won.

Original link: https://x.com/sophiaparkerr_/status/2115741547576598813

Quoted tweet: https://x.com/_LiYuXuan_/status/2115691378667835520

发布时间: 2026-10-29 18:27