Build a ChatGPT in Minecraft with 439 million blocks? Players have once again "created something interesting" and taken the game to a new level.
Is it feasible to build a virtual "world" in "Minecraft" and then stay inside to play with GPT?
Don't blink. Anyway, someone has actually done it, and the scale of the construction is quite astonishing!
Recently, a netizen shared his shocked feelings on social media X: "This is simply mind - blowing to me. Someone actually built a language model with 5 million parameters in Minecraft, trained it, and made it capable of basic conversations. To be honest, this is the coolest thing I've seen this month."
The virtual "world" looks like this. The CraftGPT shown in the lower - left corner is the GPT project created by this amazing person. Additionally, he also paired it with a virtual keyboard to facilitate conversations with this GPT:
So, how on earth did he manage to run an AI model in the blocky world? Let's take a look together!
439 million blocks: Creating a GPT in "Minecraft"
The developer is named Sammyuri. It took him months, with a great deal of planning and investment, to complete the small - scale language model CraftGPT that runs in Minecraft and the world that supports it.
According to Sammyuri, initially, he only asked a question on ChatGPT: "Can you be built in Minecraft?"
Then came the subsequent CraftGPT.
He said in the released video: "Technically, it's a'small - scale language model' because it only has 5 million parameters, which is probably the limit that my poor old laptop can handle. However, in terms of physical size, it's definitely huge."
It is reported that the entire project occupies an astonishing area in the game - 1020 blocks long × 260 blocks high × 1656 blocks wide, using a total of approximately 439 million blocks.
The interior of this "giant computer" running the small - scale model is as follows:
The internal structure of CraftGPT is very complex, including various core components:
- Tokenizer
- Positional embedding
- Token embedding
- LayerNorm
- 240×240 Matrix multiplier (4 units)
- Multi - headed attention
- KV cache
- 960×240 Matrix multiplier
- ReLU
- 240×960 Matrix multiplier
- And the loop processing from the second layer to the sixth layer
- Unembedding matrix multiplier
- Next token selection
- Token output, etc.
So, how on earth did he do it?
The key lies in the redstone in Minecraft.
In the game "Minecraft", redstone circuits are like electronic components and can simulate real - world circuits and logical systems. Players can use items such as redstone dust, redstone torches, pistons, buttons, and levers to build switches, timers, access control systems, and even more complex computing devices.
Put simply, redstone circuits enable objects in the blocky world to "move", transmit signals, trigger actions, perform addition and subtraction operations, and make logical judgments. Therefore, it is often used by players to build automated machines, maze mechanisms, and even complex computing models like CraftGPT this time.
All the components mentioned above, such as the tokenizer and matrix multiplier, are all built with redstone. Sammyuri also specifically noted that this system does not use command blocks or data packs at all.
The model itself has 5,087,280 parameters and is trained on the TinyChat dataset using Python. The content consists of some basic English conversations.
For AI enthusiasts, the technical details of CraftGPT are also very interesting: its embedding dimension is 240, the vocabulary size is 1920 tokens, and it consists of a total of 6 layers.
To save computing resources, Sammyuri added that most of the weights are quantized to 8 bits, but the weights of embedding and LayerNorm retain 18 - bit and 24 - bit precision respectively.
Sammyuri also open - sourced the core of CraftGPT: https://github.com/sammyuri/craftgpt
Disadvantage: The waiting time for a single conversation reply is too long
Of course, no matter how amazing this redstone project is, it can't really replace those large - scale language models that run extremely fast on your computer.
Sammyuri also reminded everyone on the GitHub page: Don't have overly high expectations before trying to run CraftGPT. This model tends to go off - topic, the generated grammar may be a mess, and sometimes it may even directly output a bunch of useless content. Moreover, its context window is very small - only 64 tokens, which means it can only handle very short conversations.
The demonstration effect in the video represents the best - case scenario of the model's performance and does not represent its average performance.
It can indeed be used, but the biggest problem is... you have to wait for several hours for it to reply to a single sentence. Sammyuri said that this system may take up to two hours to answer a very simple question. To run CraftGPT within a reasonable time, MCHPRS (Minecraft High - Performance Redstone Server) is essential.
After all, CraftGPT is built using the original redstone mechanism, and theoretically, it can also run in the original Minecraft. However, if the tick rate is not increased, it may take more than 10 years to generate a single reply! So, if you don't want to wait that long, you must first install MCHPRS according to the instructions.
Even with MCHPRS, it may still take several hours to generate a single reply. Therefore, Sammyuri suggests that players first test their input in the simulator and can also try different random seeds to more efficiently view the model's output.
How to run CraftGPT
For enthusiasts who want to try it out, Sammyuri also provided a complete installation process and prerequisite instructions on the GitHub project page:
- You need at least a computer with 32GB of memory to load the server, but it's better to have 64GB or more.
- Download MCHPRS, set the plot scale to 7 (located in./crates/core/src/plot/mod.rs), and then compile it.
- Download the world file of MCHPRS, extract it to./target/release, and rename it to world.
- Log in to MCHPRS (version 1.20.4) and enter the command /rp c -io.
The -io parameter enables optimized compilation and prevents non - input/output block updates from being sent to players.
It can still run without these parameters, but it will be significantly slower.
On the author's machine, compilation takes approximately 10 minutes.
- Enter the commands /rtps unlimited and /wsr 1.
- The default RNG seed is 1. If you want to use other seeds, enter binary numbers at coordinates 230, 150, 1000 and then press the button to confirm.
- Enter your prompt, press the Enter key, and then wait for several hours for the model to generate a reply.
The progress bar shows the generation progress of the current token.
The binary counter shows the number of tokens that have been processed.
After completion, you can enter a new prompt.
- There is no reset or backspace button. If you want to reset, the fastest way is to reload the world save. However, you can also manually reset: press the button behind the screen, operate all the attention block token counters, and then clear the input buffer.
The creativity ceiling of "Minecraft" is refreshed again
After witnessing the CraftGPT project firsthand, many netizens, although finding it extremely outrageous, also have to admit that it's quite interesting.
The only limit in "Minecraft" is human creativity. In fact, before CraftGPT, there have been many astonishing redstone creations in Minecraft, such as an independently - running 16 - bit CPU and the IRIS computer that can run the 1993 version of "DOOM" in the game.
Additionally, last year, a player built a complete CNN in Minecraft.
Even earlier, someone built a CPU in Minecraft:
There is also a project that implements a neural network with redstone:
Some people even proposed the idea of implementing the Internet in the game - you can use command blocks to transmit input and output and then use scripts to handle the actual calculations.
For Sammyuri, the author of CraftGPT, he once built a "1Hz CPU" with redstone in the game. And CraftGPT undoubtedly raises the ceiling of "players going crazy" even higher.
Netizens also expressed their amazement one after another:
- @myrmatta1: For those who are curious, CraftGPT is about 23 times smaller than GPT - 1 and even 175,000 times smaller than GPT - 3! At least in terms of the number of parameters.
- @luna1534: Just building 4 megabytes of memory itself is already crazy enough, but he used these 4 megabytes to create a working AI whose capabilities far exceed those of similar systems developed 10 years ago. This is not only one of the most astonishing feats in "Minecraft" but also a truly admirable achievement in the field of computing.
Source:
https://www.youtube.com/watch?v=VaeI9YgE1o8
https://www.pcgamer.com/software/ai/the - gamers - have - done - it - again - this - time - building - a - functional - chatgpt - in - minecraft - but - before - you - get - too - excited - it - takes - literally - hours - to - provide - a - response/
https://x.com/tokenbender/status/1972670561689165906
This article is from the WeChat official account "CSDN", author: Tu Min. Republished by 36Kr with permission.