Developer Compiles Doom's Rendering Algorithm Directly into Transformer Weights

notforrob · reddit · 2026-08-14

A developer has managed to run the classic game Doom on a Large Language Model without any actual training involved.

Using a custom compiler named torchwright, the developer translated the game's real rendering algorithm directly into Transformer weights. The input prompt carries the level geometry, player position, and view direction, generating drawing commands that a 43-line host program turns into pixels.

Built on the standard Phi3ForCausalLM architecture, the project offers two checkpoints: 320x200 (21B params, 85GB) and 80x50 (34GB). The author notes that generating a single frame takes almost 40 minutes on a B200 GPU, recommending at least 80GB of VRAM to run the smaller 80x50 version locally.

Original post →

More from Fun

Fun channel →