字节工坊:通过字节生成电子游戏和动画
ByteCraft: Generating video games and animations through bytes

原始链接: https://emygervais.github.io/2025/03/15/bytecraft.html

ByteCraft项目探索通过训练大型语言模型输出文件字节来直接从文本提示生成电子游戏和动画。他们的初始模型🎮ByteCraft,在一个70亿参数的LLM上微调,可以生成最多140KB的文件。虽然由于字节级数据的敏感性而具有挑战性,但该模型显示出希望,能够生成半功能性或完全功能性的文件。 该项目与自回归分子生成类似,早期尝试取得的成功有限,但随着时间的推移迅速改进。ByteCraft目前处于早期阶段,类似于2016年的分子生成,但面临着生成具有较长上下文长度的游戏和动画的更复杂任务。 尽管该模型存在局限性和训练限制(硬件有限),ByteCraft仍然代表着朝着从文本生成交互式体验迈出的重要一步。团队设想在计算能力提升和进一步研究的推动下,取得快速进展,最终实现100%有效的、新颖的文件生成。他们希望这能激励其他人探索这种范式。

Hacker News 最新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 ByteCraft:通过字节生成电子游戏和动画 (emygervais.github.io) 8 分,来自 atomroflbomber,55 分钟前 | 隐藏 | 过去 | 收藏 | 讨论 加入我们,参加 6 月 16-17 日在旧金山举办的 AI 初创公司学校! 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系我们 搜索:

原文

|| Paper | Model | Code ||

Screenshots of files generated by ByteCraft
Screenshots of files generated by ByteCraft

Contents: ByteCraft, Examples, The future

ByteCraft

Imagine a world where you can write a prompt describing a video game or animation that you want, and a fully fledged executable file comes out. We take the first attempt at this crazy goal by training a model to generate the bytes of video games and animations!

The first 256 bytes of a 15Kb game
The first 128 bytes of a 15Kb game

Our model, 🎮ByteCraft, was made by fine-tuning a 7B parameter LLM (Qwen2.5) at 32K generation context length on 4 GPUs for 4 months to generate the bytes of video games and animations conditional on a text description of the desired file. The file can then be saved and read on your computer!

Working in the byte world is extremely challenging because a single wrong byte can break the whole functioning of the file. Still, ByteCraft can generate some semi-functional and fully working files. The model is imperfect, but the fact that it can generate diverse readable files shows that the model has some understanding of bytes.

A file of 32Kb represents 32K tokens at the byte level. To alleviate this problem, we use Byte-Pair-Encoding (BPE) to encode bytes into tokens containing, on average, 2.29 bytes and, at most, 4-5 bytes, allowing us to generate files as big as 140Kb with 32K tokens.

Examples of files generated by ByteCraft

There are 2 examples per section, click on them to start the file.

Note: If your browser doesn’t show the SWF properly, I included direct links. To view the SWF from direct links, install the Firefox/Chrome browser extension of Ruffle to see them directly in your browser, or download them on your computer and open them with the Ruffle app.

(Click here)

The future

A parallel exists between ByteCraft and autoregressive molecule generation. Molecules can be represented as SMILES strings and their context length is generally small (10-250 tokens without BPE). We show below some of the progress of molecule generation over time on the Zinc-250K dataset:

  • (2016) GVAE: 0.7% valid molecules (<- ByteCraft is here)
  • (2017) CVAE: 7.2% valid molecules
  • (2018) RVAE: 34.9% valid molecules
  • (2021) GFVAE, STGG, and many others: 100% valid molecules, but not always synthesizable
  • (2025) STGG+AL: 100% valid molecules with high synthesizability and strong out-of-distribution properties (<- the future ByteCraftv3 is here)

ByteCraft is at the equivalent of GVAE for molecule generation in 2016 but on the much harder problem of generating games and animations at 32K context length. Considering the recent exponential progress in AI, we expect to rapidly move toward the goal of 100% valid generated novel files at high context length.

Keep in mind that this was trained on extremely limited hardware (4 GPUs for 4 months). Our method scales with compute. The ceiling is far from being reached; we are at the very first stage of a new paradigm.

We hope this crazy project inspires researchers and hobbyists toward the lofty goal of generating games through bytes.

联系我们 contact @ memedata.com