本文重点介绍了为运行 FLUX.2-klein-4B 模型开发的纯 C 语言且无依赖的实现,这是一个由 Black Forest Labs 发布的 40 亿参数 AI 模型。该项目由 Salvatore Sanfilippo(antirez)创建,并得到了 AI 模型 Claude Code 和 Claude Opus 4.5 的重要协助,展示了如何有效利用先进的 AI 助手来完成复杂的编码任务。Salvatore 分享的一个关键见解是,必须为 AI 提供结构化且持续更新的上下文,特别是通过 'IMPLEMENTATION_NOTES.md' 文件。这种方法使得 AI 能够保持专注,高效执行大规模开发而不会迷失方向,强调了在 AI 辅助编程中管理上下文并完成重大编码任务的最佳实践。
FLUX.2-klein-4B Pure C Implementation (via) On 15th January Black Forest Labs, a lab formed by the creators of the original Stable Diffusion, released black-forest-labs/FLUX.2-klein-4B - an Apache 2.0 licensed 4 billion parameter version of their FLUX.2 family.
Salvatore Sanfilippo (antirez) decided to build a pure C and dependency-free implementation to run the model, with assistance from Claude Code and Claude Opus 4.5.
Salvatore shared this note on Hacker News:
Something that may be interesting for the reader of this thread: this project was possible only once I started to tell Opus that it needed to take a file with all the implementation notes, and also accumulating all the things we discovered during the development process. And also, the file had clear instructions to be taken updated, and to be processed ASAP after context compaction. This kinda enabled Opus to do such a big coding task in a reasonable amount of time without loosing track. Check the file IMPLEMENTATION_NOTES.md in the GitHub repo for more info.
Here's that IMPLEMENTATION_NOTES.md file.

