Mit 439 Millionen Blöcken in "Minecraft" einen ChatGPT nachbauen? Die Spieler haben wieder etwas "Kreatives" gemacht und das Spiel auf eine neue Ebene gebracht.
Is it possible to build a virtual "world" in "Minecraft" and then play with GPT in it?
Don't look away! Someone has actually done it, and the result is quite impressive!
Recently, a user on the social media platform X shared his delight: "This is simply incredible to me. Someone has actually built and trained a language model with 5 million parameters in Minecraft, so that it has basic conversation capabilities. Honestly, this is the coolest thing I've seen this month."
This is what the virtual "world" looks like. The CraftGPT shown in the lower - left corner is the GPT project created by this genius. In addition, he added a virtual keyboard to facilitate the conversation with this GPT:
How did he manage to run an AI model in the block world? Let's find it out together!
439 million blocks: A GPT created in "Minecraft"
The developer is named Sammyuri. He spent several months, planned a lot and worked hard to complete the small language model CraftGPT that runs in Minecraft and the world that supports it.
According to Sammyuri, he first only asked ChatGPT a question: "Can you be built in Minecraft?"
Then CraftGPT followed.
He said in a published video: "Technically, it is a'small language model' because it only has 5 million parameters. This is about the maximum performance that my poor old notebook can handle. But in terms of physical size, it is absolutely huge."
It is known that the entire project in the game takes up an astonishing amount of space - 1,020 blocks long × 260 blocks high × 1,656 blocks wide, and a total of about 439 million blocks were used.
This is what the inside of this "giant computer" on which the small model runs looks like:
The internal structure of CraftGPT is very complex and includes various core components:
- Tokenizer
- Positional embedding
- Token embedding
- LayerNorm
- 240×240 matrix multiplier (4 pieces)
- Multi - headed attention
- KV cache
- 960×240 matrix multiplier
- ReLU
- 240×960 matrix multiplier
- Cyclic processing from layer 2 to layer 6
- Unembedding matrix multiplier
- Next token selection
- Token output, etc.
How did he actually manage to do it?
The secret lies in the Redstone components in "Minecraft".
In "Minecraft", Redstone circuits can be used like electronic components to simulate real - world circuits and logical systems. Players can use Redstone dust, Redstone torches, pistons, buttons, levers and other items to build switches, timers, access systems and even more complex computing devices.
Simply put, Redstone circuits allow objects in the block world to move, transmit signals, trigger actions, perform additions and subtractions, and make logical decisions. Therefore, they are often used by players to build automated machines, maze mechanisms and even complex computing models like CraftGPT.
All the above - mentioned components such as tokenizers and matrix multipliers were built with Redstone. Sammyuri specifically pointed out that no command blocks or data packets were used in this system.
The model itself has 5,087,280 parameters and was trained with Python on the TinyChat dataset. The content consists of simple English conversations.
For AI enthusiasts, the technical details of CraftGPT are also very interesting: Its embedding dimension is 240, the vocabulary size is 1,920 tokens, and it consists of a total of 6 layers.
To save computing resources, Sammyuri added that most weights were quantized to 8 bits, while the weights of embedding and LayerNorm retained an accuracy of 18 bits and 24 bits respectively.
Sammyuri also made the core of CraftGPT open - source: https://github.com/sammyuri/craftgpt
Disadvantage: The waiting time for an answer is too long
Of course, even this impressive Redstone project cannot replace the fast - running large language models on your computer.
Sammyuri also warned on the GitHub page: Don't set your expectations too high before you try to run CraftGPT. This model tends to deviate, the generated sentences may be ungrammatical, and sometimes there are even only useless contents. In addition, its context window is very small - only 64 tokens, which means that it can only handle very short conversations.
The demonstration in the video shows the best - case scenario of the model and does not represent its average performance.
Although it works, the biggest problem is... You have to wait several hours for it to give you an answer. Sammyuri said that this system may take two hours to give an answer even for a simple question. To run CraftGPT in a reasonable time, an MCHPRS (Minecraft High - Performance Redstone Server) is essential.
Since CraftGPT was built with the original Redstone mechanisms, it can theoretically also run in the original version of Minecraft. But if the tick rate is not increased, it may take over 10 years to generate an answer! So if you don't want to wait that long, you have to first install the MCHPRS according to the instructions.
Even if the MCHPRS is used, it can still take several hours to generate an answer. Therefore, Sammyuri recommends that players first test their inputs in a simulator and also try different random seeds to more efficiently check the output of the model.
How to run CraftGPT
For enthusiasts who want to try it out, Sammyuri also specified the complete installation instructions and requirements on the GitHub project page:
- You need at least a computer with 32 GB of RAM to load the server. However, it is best if you have 64 GB or more.
- Download the MCHPRS, set the "plot scale" to 7 (location:./crates/core/src/plot/mod.rs) and then compile it.
- Download the world file of the MCHPRS, unzip it into./target/release and rename it to "world".
- Log in to the MCHPRS (version 1.20.4) and enter the command "/rp c -io".
The parameter "-io" enables optimized compilation and prevents non - input/output block updates from being sent to the player.
It can also be run without these parameters, but it will be significantly slower.
On the author's computer, the compilation takes about 10 minutes.
- Enter the commands "/rtps unlimited" and "/wsr 1".
- The default random seed (RNG seed) is 1. If you want to use a different seed, enter a binary number at coordinates 230, 150, 1000 and then confirm with the button.
- Enter your input (question or instruction) and press the Enter key. Then wait several hours for the model to generate an answer.
The progress bar shows the current progress of token generation.
The binary counter shows the number of processed tokens.
After completion, you can make a new input.
- There is no reset or backspace key. If you want to reset it, the fastest way is to reload the world save file. But you can also reset it manually: Press the button behind the screen, operate all the Attention - block token counters and then empty the input buffer.
The creativity limit in "Minecraft" is exceeded again
Many users were surprised after seeing the CraftGPT project, but also had to admit that it was very interesting.
The limits in "Minecraft" only lie in human creativity. In fact, before CraftGPT, there were already many impressive Redstone projects in Minecraft, such as an independent 16 - bit CPU and the IRIS computer that can run the 1993 game "DOOM" in the game.
In addition, a player built a complete CNN in Minecraft last year.
Even earlier, someone built a CPU in Minecraft:
There is also a project that realizes an artificial neural network with Redstone:
There was even the idea to realize the Internet in the game - you can transmit the input and output with command blocks and process the actual calculation with scripts.
For Sammyuri, the author of CraftGPT, he has already built a "1Hz CPU" in the game with Redstone. And CraftGPT undoubtedly raises the "creativity limit" of players one step higher.
The users also had their... (The original text seems incomplete here)