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.**

发布于 2026年7月9日generalGEO 评分: 010 次阅读
Fable 5 CUDA megakernelKernelBench-MegaGPU kernel benchmarkAI generated CUDA codeCUDA kernel optimizationRTX PRO 6000 BlackwellKimi Linear decoderecursive self improvement AIPyTorch profilerAI coding benchmark
这是一篇技术文章的配图,核心展示了标题信息与性能成果:深色技术背景上,左侧以醒目的白色与橙色字体标注了“Fable 5 CUDA Megakernel”,其下方小字说明“KernelBench-Mega · 18.7x Speedup in 2.5 Hours”。画面右侧有一款正在运行的GPU芯片,芯片呈现橙亮的核心运算光效,芯片右上方的界面还显示了KernelBench-Mega基准测试的18.7倍加速数据及对应上升趋势的图表,整体风格简洁突出,呼应了文章介绍的Fable 5在KernelBench-Mega上实现18.7倍加速、耗时2.5小时完成CUDA巨核研发的核心内容。

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的内容相关,是对这一成果的官方发布。

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.

图片展示了Fable 5在CUDA微内核生成方面的性能测试过程。横轴为累计输出令牌数,纵轴为解码速度提升倍数。图中以绿色折线呈现Fable 5的性能变化,标注了多个关键步骤,如brf64 SIMD int4 dequeue、RLA softmax + Transpose work等。还标注了参考解码速度为1s,以及不同时间点的wall clock等信息。该图与上下文紧密相关,直观呈现了Fable 5在不同阶段的性能表现,辅助理解其在Kimi-Linear decode任务上的18.71x解码速度提升。

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

图片展示的是KernelBench-Mega基准测试结果,对比了不同模型在CUDA megakernel下的解码速度倍数。RTX PRO 6000显卡上,Claude-fable-5模型以18.71x速度倍数领先,Claude-opus-4-8模型为14.40x,GPT-5.5模型为4.34x,Claude-sonnet-5模型为4.03x。表格还列出了每种模型的正确性、吞吐量、运行时、框架及megakernel数量等信息,直观呈现了各模型在该任务上的性能表现。

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.

这张图片展示了Fable 5在KernelBench-Mega基准测试中的具体运行数据,测试所用GPU为RTX PRO 6000 Blackwell,模型为claude-fable-5,测试顺利通过。其中核心突出显示的部分为速度提升18.71倍,同时标注了不同上下文长度下的提升数值:2k上下文提升17.8x,8k上下文提升18.9x,16k上下文提升19.5x;此外还显示了该测试的推理速率为3226tok/s,实际运行时间为2小时33分钟,使用的框架为cuda,这些数据直观呈现了该任务下Fable 5的性能表现。

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

图片是一条推文,内容为Fable是首个生成真正GPU超级内核(megakernel)的模型,其执行速度比参考实现快18.7倍。推文引用Fable创始人Fabien Mikol的话,称“巨型内核(Megakernels)是GPU编程中最难实现的产物之一——全世界只有极少数人能编写它们。”图片下方有“Rate this translation”(给这个翻译打分)的选项,还展示了RTX 4090显卡在不同模型下的运行数据,其中Fable的运行速度为10.71x。该图片与上下文紧密相关,直观呈现了Fable在GPU超级内核方面的优势。

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.

图片展示了Fable 5在KernelBench-Mega任务中生成CUDA代码的代码追踪信息。用户与助手的对话中,助手先阅读问题文件以理解构建内容,接着开始基准测试,告知目标是测量基准线并并行测量网格屏障成本。图片中还呈现了torch版本、内存使用情况等信息,以及助手开始子进程的提示。该图片与上下文紧密相关,直观呈现了Fable 5在任务初期的代码生成及测试过程。

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.

这张图片是一条来自用户sckchui的9小时前的评论,内容包含英文与对应的中文译句,核心是说明Fable是Anthropic内部模型Mythos的削弱版本,且Mythos本身大概率不是Anthropic最新的内部最优模型,该内容与文档中提到的“Fable 5是Anthropic内部Mythos模型的较安全或削弱版本”的相关表述相互呼应。

“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.

图片为Jack Clark在Import AI 464期的标题,内容为“Fable写GPU内核;AI自动化;模拟计算”。下方配文“这是新世界开始吗?”,并标注发布者为Jack Clark,时间为2026年7月6日。该图片与文档上下文紧密相关,上下文提到Fable 5在KernelBench-Mega上写CUDA内核,AI系统在自动化AI研发方面取得进展,此图片标题及配文是对这一内容的引用,引发对AI系统自动化能力的思考。

The logic is direct:

  1. Better AI systems can write better low-level kernels.
  2. Better kernels can make training and inference faster or cheaper.
  3. Faster and cheaper AI systems can help build the next generation.
  4. 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.

图片是一条Reddit帖子,发布者为r/singularity,发布于9小时前。内容提到Fable 5在KernelBench中位居榜首,杰克·克拉克称其为“递归自我改进(RSI)循环的开端”。下方有中文翻译。该图片与文档中对Fable 5在KernelBench-Mega上取得18.7x速度提升的讨论相关,体现了AI系统在自动化AI研究与开发方面取得的进步,是递归自我改进循环的体现。

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.

图片展示的是Noah Hirshon对AI系统编写GPU内核这一成果的评论。评论指出,GPU内核这一项最值得关注,一旦模型能编写出加速模型运行的内核,该工具开始改进自身底层基础,循环叠加。关键在于验证,细微错误或略微变慢的内核难被察觉,“看起来正确”不等于“真正更快”。该评论与上下文紧密相关,是对上下文提到的AI系统编写GPU内核这一成果的补充说明,强调了验证的重要性。

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.

图片展示的是一个名为“Pristine-Today-9177”的用户在9小时前发布的评论。评论内容为英文,感叹这是一个重要的专家级瓶颈,如今已被以超人类水平自动化,感叹生在这个时代真是太棒了。下方还有其中文翻译。该图片位于文档中“Fast Progress, Real Caution”部分,是对上文提到的AI系统生成低级性能代码这一现象的评论,体现了对这一技术进步的惊叹与感慨。

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.

图片展示的是“Tech Tales: 科技寓言”系列中的一篇作品标题。标题为“The Brass Gears of Civilization”(文明的黄铜齿轮),下方用中英文标注了故事背景,即“2050, after the fall”(2050年,大崩溃之后)。该图片位于文档中“Fast Progress, Real Caution”部分之后,与上下文紧密相关,上下文提到该系列作品反映了对加速技术系统的不安,而图片标题则暗示了故事可能围绕2050年文明崩溃后的情况展开。

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_decode and torch.profiler were 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

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.