In the world of software engineering, there is a fine line between 'optimization' and 'absolute madness.' We've seen the trend of stripping away dependencies—Andrej Karpathy's llm.c proved you could train GPT-2 in under 1,000 lines of pure C, and projects like microgpt-c showed that tiny, zero-dependency models can actually win logic games on edge hardware. But what happens when you stop using a programming language entirely and start using a build system?
The Build System as a Language
CMake is designed to manage the build process—telling a compiler where the headers are and how to link libraries. It is not meant for tensor multiplication or backpropagation. However, because CMake is technically a Turing-complete scripting language, it is theoretically possible to implement the logic of a Transformer model within a CMakeLists.txt file.
Imagine the chaos: instead of python train.py, you're running cmake .. and watching your build configuration script calculate attention heads and weight updates. It is the ultimate 'because I can' project, turning a tool meant for orchestration into the engine itself.
From C99 to Configuration Scripts
While the industry is moving toward high-performance C++ implementations using ONNX Runtime or OpenVINO to squeeze every drop of power out of the CPU, the 'Pure CMake' approach moves in the opposite direction. It ignores the efficiency of C99 or the structure of PyTorch in favor of a glorious, absurd challenge.
While we see developers rebuilding GPT-2 in C to understand the 'magic' under the hood, doing it in CMake is less about understanding AI and more about testing the limits of a build system's sanity.
The Verdict
Will we see CMake-powered LLMs in production? Absolutely not. But in a landscape dominated by massive frameworks, there is something refreshing about the pursuit of the unconventional. Whether it's a 160K parameter micro-model or a build script acting as a neural network, the goal is the same: proving that the only limit to AI is our own willingness to be absurd.
Sources
Media



