Fable 5 Writes a CUDA Megakernel on KernelBench-Mega: 18.7x Speedup in 2.5 Hours
This article explains why Fable 5’s reported KernelBench-Mega result is more than another benchmark win. The important detail is the single-launch CUDA megakernel: a fused path that handled a complex decode workload with far less launch overhead than multi-kernel solutions. The result also matters because it points toward AI systems becoming better at performance engineering tasks that support AI development itself. Faster kernels can make inference and training more efficient, and that creates a feedback loop worth watching. At the same time, AI-generated low-level code should not be treated as production-ready by default. Correctness, profiling, hardware behavior, and regression testing still matter. **The real takeaway: Fable 5’s megakernel is a strong signal that AI-assisted GPU performance engineering is moving from demo territory into serious infrastructure work.**

Fable 5 Writes a CUDA Megakernel on KernelBench-Mega: 18.7x Speedup in 2.5 Hours
Introduction
Fable 5 has become the center of a new AI engineering discussion after reportedly writing the first genuine CUDA megakernel submitted to KernelBench-Mega. The result is striking: an 18.71x decode speedup on an RTX PRO 6000 Blackwell setup, produced within one autonomous session of roughly 2.5 hours.
The headline is not just that an AI system wrote fast low-level code. The more important point is the shape of the solution. Instead of stitching together several smaller GPU kernels, Fable 5 fused the decoding workflow into a single cooperative kernel launch per token. That is the part that made researchers and engineers pay attention.
![图片是一条推文,发布者为Elliot Arledge,其头像显示为戴着帽子的男子。推文内容为“Claude Fable 5 [max] wrote the first genuine (and fastest) megakernel ever submitted to KernelBench-Mega.”并配有中文翻译“Claude Fable 5 [max] 编写了首个真正意义上的(也是最快的)mega kernel,已提交至 KernelBench-Mega。”推文右上角有“Subscribe”按钮和三个点的图标。该图片与文档中介绍Fable 5在KernelBench-Mega上编写首个真正意义上的(也是最快的)megakernel的内容相关,是对这一成果的官方发布。](https://we0-cms.oss-cn-beijing.aliyuncs.com/cms-assets/image/2026/07/431a983a-5471-4a16-96a8-342eff6d0864-02-5fe28792-eb70-4fbf-8b72-848f2d0c7f66.png)
This article keeps the original structure and technical meaning, but rewrites the story in clearer English for publication. It explains what KernelBench-Mega is testing, why this result matters, how the megakernel differs from ordinary GPU-kernel generation, and why some researchers connect it to the idea of recursive self-improvement.
Fable 5 Reaches 18.7x and Pulls Ahead of GPT-5.5
The benchmark result comes from KernelBench-Mega, a benchmark focused on full-block megakernel generation rather than isolated operator optimization. In this run, Fable 5 targeted 02_kimi_linear_decode, a Kimi-Linear W4A16 hybrid decode task using 4-bit weights and bf16 activations.
The reported setup was strict: one autonomous session, a 3-hour wall-clock ceiling, and a real benchmark harness. Within that limit, Fable 5 reached an 18.71x decode speedup over the optimized PyTorch reference.

The comparison makes the result easier to understand:
| Model | Reported Speedup | Notes |
|---|---|---|
| Fable 5 | 18.71x | CUDA megakernel, single fused launch path |
| Claude Opus 4.8 | 14.40x | Strong result, but not the same single CUDA megakernel pattern |
| GPT-5.5 | 4.34x | Much lower speedup on this task |
| Claude Sonnet 5 | 4.03x | Similar range to GPT-5.5 on this leaderboard view |

The context-length breakdown is also important. According to the displayed leaderboard, Fable 5 stayed strong as the context grew:
- 2K context: about 17.8x
- 8K context: about 18.9x
- 16K context: about 19.5x
That is counterintuitive at first. Longer context usually increases the cost of attention and KV-cache handling. Many systems start to bleed performance there. Fable 5’s result suggests that the fused design reduced launch overhead enough that its relative advantage became larger as the workload became heavier.

Why KernelBench-Mega Is Harder Than a Normal Kernel Benchmark
KernelBench-Mega is not just asking a model to polish one small operator. It asks the agent to fuse a larger model block into a whole-block megakernel. That matters because the hard part is no longer simply writing syntactically valid CUDA or Triton code. The hard part is managing many interacting stages of computation inside one efficient path.
The 02_kimi_linear_decode task includes a hybrid decoding workload for Kimi-Linear W4A16. In practical terms, the model has to deal with quantized weights, bf16 activations, attention-related state, routing, normalization, and cache behavior.
This is why the benchmark is a meaningful stress test for AI-generated low-level performance code. A simple speedup on a small isolated op is useful, but a full-block megakernel is closer to the kind of optimization work that can affect real inference systems.
The First True “Megakernel”
The most important technical claim is that Fable 5 produced the first real megakernel in KernelBench-Mega’s history.
A megakernel compresses a larger inference path into one kernel. Instead of launching several separate kernels and moving control back and forth, it keeps the work inside one coordinated execution flow. That is difficult because the kernel has to coordinate many phases while preserving correctness.
In this case, the report says torch.profiler showed exactly one cooperative kernel launch per decoded token. That single launch handled work that would normally be broken into several stages, including:
- int4 dequantization
- convolution
- SiLU activation
- KDA gated delta state
- MLA latent attention handling
- MoE routing and top-8 expert selection
- RMSNorm-related operations
- KV-cache writes

Other high-scoring entries reportedly split the work into 4 to 14 separate kernel launches. Fable 5 pushed the timed path into one fused cooperative launch. That is the difference between “fast generated kernel code” and a much more aggressive GPU programming artifact.
How One Kernel Launch Changes the Performance Profile
Kernel launches are not free. Each launch has overhead, synchronization costs, and scheduling gaps. In a decode workload, those costs can become especially painful because work repeats token by token.
Fable 5’s approach reduces that repeated overhead by putting the decoding steps into one cooperative path. The original report describes the solution as using 14 grid barriers to stage the computation inside the same launch.
That is why the result is not only about clever math. It is about system-level GPU execution. When other solutions repeatedly leave and re-enter kernels, they lose time in the handoff. Fable 5 avoids much of that cost by keeping the pipeline fused.
In plain terms: others do the job in several trips; Fable 5 tries to do it in one.
2.5 Hours and Around 550,000 Tokens
Another notable part of the run is how the model spent its time. It did not immediately start dumping final CUDA code. The trace suggests a more measured workflow.
For a large part of the session, Fable 5 benchmarked the baseline, explored grid-barrier costs, and reasoned about memory bandwidth. The article describes this as roughly 64% of the session being spent on measurement and design before the main implementation landed.

Once the initial version was written, the first benchmark reportedly reached around 14.4x. Fable 5 then used the remaining time to remove barriers, tighten int4 dequantization, test changes, and roll back one negative optimization when the measurement showed it was worse.
The full run took about 2.5 hours and used around 550,000 output tokens. The key detail is not only the scale. It is the behavior: benchmark, build, measure, revert when needed, and optimize based on data rather than confidence.
The original source also notes that Fable 5 is described as a safer or reduced version of Anthropic’s internal Mythos model. That claim should be read as part of the source narrative rather than as a public product announcement.

“The AI Self-Improvement Loop Has Started”
The broader discussion came from Jack Clark’s Import AI newsletter. In that issue, Clark framed the GPU-kernel result as a sign that AI systems are getting better at automating parts of AI research and development itself.

The logic is direct:
- Better AI systems can write better low-level kernels.
- Better kernels can make training and inference faster or cheaper.
- Faster and cheaper AI systems can help build the next generation.
- The next generation may become even better at writing kernels.
That is why the phrase “recursive self-improvement” appears in this discussion. It does not mean that a fully autonomous runaway loop has already happened. It means that one piece of the loop — AI improving the infrastructure used to build AI — is becoming more visible and measurable.

From Kernel Writing to Remote Labor
The original article also connects this kernel result to broader automation benchmarks. Import AI discusses the Remote Labor Index, where AI agents are evaluated on economically useful online projects.
The point is not that CUDA kernel writing and freelance task automation are the same thing. They are not. But both point in the same direction: frontier AI systems are improving at longer, more structured tasks that require planning, tool use, verification, and iteration.
One comment in the source captures the concern well: once a model can write kernels that make models faster, the tool is no longer only helping users. It is also improving parts of its own substrate.

That is where verification becomes critical. A kernel that looks correct is not necessarily faster. A faster-looking kernel may contain subtle correctness problems. With low-level GPU work, the review loop has to stay strict.
Fast Progress, Real Caution
The story has two sides. On one side, the result is exciting. AI systems are now producing low-level performance artifacts that were once limited to a small number of expert GPU programmers.

On the other side, this is exactly the kind of capability that deserves careful attention. The same newsletter issue imagines a future where general-purpose computing becomes so powerful and dangerous that people try to constrain it. That fictional ending is not a prediction, but it reflects the unease around accelerating technical systems.

A little over a year after the original KernelBench work showed how difficult AI-generated kernels could be, this result suggests a major jump. Fable 5 did not merely generate a usable kernel. It produced a fused megakernel path that reached the top of a difficult benchmark in one limited session.
For AI infrastructure, that is a serious signal.
Source Notes
- Original source: BAAI Hub article.
- The original article cites reporting and discussion from Import AI 464, KernelBench-Mega, Elliot Arledge’s X post, and a Reddit discussion.
- The original article includes several branding dividers, decorative logos, engagement graphics, and a person photo. These were intentionally excluded because they are not necessary for the technical reading flow.
- No standalone code blocks were present in the source. Inline technical identifiers such as
02_kimi_linear_decodeandtorch.profilerwere preserved.
FAQ
What is KernelBench-Mega?
KernelBench-Mega is a benchmark focused on whole-block megakernel generation. Instead of asking a model to optimize a single isolated operator, it asks the model to fuse a larger workload into an efficient kernel path and then measures real performance.
What did Fable 5 achieve on KernelBench-Mega?
Fable 5 reportedly achieved an 18.71x decode speedup over an optimized PyTorch reference on the 02_kimi_linear_decode task. The result was produced within a single autonomous session under a 3-hour ceiling.
Why is a CUDA megakernel difficult to write?
A megakernel has to coordinate many stages of computation inside one kernel launch. That means the implementation must manage data movement, synchronization, numerical correctness, memory bandwidth, and execution order without splitting the work into safer smaller kernels.
Why does a single kernel launch matter?
Every GPU kernel launch has overhead. In token-by-token decoding, repeated launches can add up quickly. A single fused launch can reduce synchronization and scheduling overhead, which is why Fable 5’s approach is technically meaningful.
Is this proof of recursive self-improvement?
It is not proof of a complete autonomous self-improvement loop. It is better understood as a concrete signal that AI systems are starting to automate tasks that can improve AI infrastructure, such as kernel design and inference optimization.
Can this kind of AI-generated CUDA code be used in production?
Not directly without careful review. Performance code needs strict correctness checks, profiling, regression tests, and hardware-specific validation. A fast benchmark result is promising, but production deployment requires much more verification.
What tools are useful for studying this result?
KernelBench-Mega provides the leaderboard and run artifacts. PyTorch profiler, CUDA tooling, Hugging Face trace datasets, and GPU profiling tools are useful for understanding how the generated kernel behaves.
Related Tools
- KernelBench-Mega: The benchmark page for whole-block megakernel results and run artifacts.
- KernelBench GitHub Repository: The original benchmark framework for evaluating LLM-generated GPU kernels.
- NVIDIA CUDA Toolkit: The core toolkit for writing, compiling, and profiling CUDA applications.
- PyTorch Profiler: A profiling tool used to inspect execution time, kernel launches, and runtime behavior in PyTorch workloads.
- Hugging Face Datasets: A platform for hosting datasets and benchmark traces, including KernelBench run artifacts.
- Triton: A language and compiler for writing custom GPU kernels often used in AI performance engineering.
Related Links
- KernelBench-Mega Leaderboard: Official leaderboard and explanation for the megakernel benchmark.
- KernelBench Results Hub: Public benchmark results, transcript viewers, and datasets.
- Import AI 464: Jack Clark’s newsletter issue discussing Fable, GPU kernels, AI automation, and analog computation.
- Fable 5 KernelBench-Mega Trace: The run trace referenced in the original article.
- KernelBench Paper on arXiv: The research paper introducing KernelBench as a benchmark for LLM-generated GPU kernels.
- ScalingIntelligence KernelBench Repository: Source code and evaluation tooling for the original KernelBench project.
- Reddit Discussion: Community discussion referenced by the source article.
Summary
This article explains why Fable 5’s reported KernelBench-Mega result is more than another benchmark win. The important detail is the single-launch CUDA megakernel: a fused path that handled a complex decode workload with far less launch overhead than multi-kernel solutions.
The result also matters because it points toward AI systems becoming better at performance engineering tasks that support AI development itself. Faster kernels can make inference and training more efficient, and that creates a feedback loop worth watching.
At the same time, AI-generated low-level code should not be treated as production-ready by default. Correctness, profiling, hardware behavior, and regression testing still matter.
The real takeaway: Fable 5’s megakernel is a strong signal that AI-assisted GPU performance engineering is moving from demo territory into serious infrastructure work.