A developer has released gpt2.cmake, an implementation of the GPT-2 language model written entirely in CMake, the build system typically used for compiling C++ projects. The project, published on GitHub on August 23, 2026, uses CMake's scripting language to perform tensor operations and run inference for the 124M parameter model. While not practical for production, it demonstrates the flexibility of CMake beyond its conventional role. The repository includes a single CMakeLists.txt file with commented code, allowing users to generate text directly through CMake's configure step.


This is the kind of hack that makes me smile. Somewhere, a developer spent hours wrestling with CMake's syntax to coax it into running a neural network. Why? Because they could. That spirit of playful experimentation is the heartbeat of open source. It reminds me that technology isn't just about efficiency or scale. It's about curiosity.

GPT-2 may be old news in the AI world, but reimagining it in a build tool is a fresh twist. It's a tribute to how far we've come, and a nod to the fact that even our most serious tools have room for a little absurdity. This project won't change the world, but it might just inspire someone to try something wild. And that's exactly what progress looks like.