CPU inside weights: AI engineer runs DOOM on RISC-V inside an LLM
The line between software and hardware architecture is becoming increasingly blurred. An AI engineer has demonstrated a remarkable experiment: instead of simply asking a language model to write CPU code, they embedded a 32-bit RISC-V processor directly into the weights of the Qwen 2.5-7B model, enabling the neural network to execute instructions and run the legendary DOOM.
The core of this experiment lies in integrating the processor's logic directly into the structure of the Large Language Model's (LLM) weights. This is not a mere simulation of a CPU through text responses; rather, it is an attempt to force the neural network to process data using its internal parameters as a computational engine. Using the Qwen 2.5-7B model, the engineer 'embedded' a 32-bit RISC-V CPU, allowing the model to perform basic arithmetic operations and execute code, effectively turning the neural network's structure into a sort of virtual computing environment.
From arithmetic to DOOM
The ultimate proof of this 'built-in' architecture's functionality was the successful execution of DOOM. While the performance of such systems is currently nowhere near that of physical hardware, the fact that model weights can interpret and execute processor instructions for rendering and game logic is a significant conceptual milestone. It demonstrates the potential of using LLMs not just as text generators, but as executors of complex algorithmic tasks at the architectural level.

Despite the impressive technical feat, it is important to maintain perspective. This does not imply that modern neural networks are poised to replace physical processors anytime soon. For now, this remains a demonstration of how flexibly model weights can be manipulated to perform specific computational tasks that go far beyond simple next-token prediction.