Functional AI Model Built Entirely Within Minecraft
A developer and dedicated Minecraft enthusiast, known as Sammyuri, has unveiled a groundbreaking project on GitHub called CraftGPT. In a stunning display of digital engineering, Sammyuri, who previously built a 1Hz CPU in the game, has now constructed a small language model that runs on a virtual computer inside Minecraft.
This impressive AI was trained on the TinyChat dataset and is capable of holding basic conversations. The project itself is a testament to the limitless creativity possible within the game's sandbox environment. You can see the colossal scale of the in-game computer in the project's video showcase, which required the Distant Horizons mod just to capture the full scope of the build.
The Colossal Scale of CraftGPT
The sheer size of CraftGPT is staggering. The entire structure is built from a massive 1,020 x 260 x 1,656 grid of blocks, totaling over 439 million blocks. This virtual machine is a complex web of Redstone, Minecraft's equivalent of electrical circuitry, meticulously arranged to perform the functions of a real-world computer.
However, the creator is quick to manage expectations. While functional, CraftGPT is not a replacement for modern AI models. Sammyuri admits, "The model is very prone to going off-topic, producing responses that are not grammatically correct, or simply outputting garbage."
A Look Under the Hood
So, how was this monumental feat achieved? The entire system operates using Redstone components, which simulate real-world electronic parts. The virtual computer includes essential AI components like tokenizers and matrix multipliers. Impressively, this was all accomplished without using command blocks or data packs, relying purely on the game's built-in Redstone mechanics.
The AI model itself has 5,087,280 parameters and was trained in Python using a dataset of basic English conversations. It features an embedding dimension of 240, a vocabulary of 1920 tokens, and consists of 6 layers. The context window is 64 tokens, which is suitable for very short conversations. To manage the immense data, most weights were quantized to 8 bits, with some key components stored at higher precision.
The Need for Patience A Two Hour Wait
While CraftGPT is a modern marvel of virtual engineering, it has one significant drawback: speed. The performance pales in comparison to even the most basic physical hardware. A simple prompt requires an astonishing two hours to generate a response. This is with the game's tick rate accelerated to 40,000 times its normal speed using the Minecraft High Performance Redstone Server (MCHPRS).
This project joins a list of other incredible Redstone creations, such as standalone 16-bit CPUs and the IRIS Computer, which was famously capable of running a version of the classic game DOOM (1993) in Minecraft. CraftGPT stands as a powerful example of what can be achieved with ingenuity and a massive number of virtual blocks.