{
  "video_id": "reddit_1voazhm",
  "channel_slug": "MachineLearning",
  "channel_handle": "r/MachineLearning",
  "title": "I compiled Doom's renderer into a 21B-parameter transformer -- no training anywhere [P]",
  "url": "https://www.reddit.com/r/MachineLearning/comments/1voazhm/i_compiled_dooms_renderer_into_a_21bparameter/",
  "external_url": null,
  "upload_date": "20260814",
  "published_at": "2026-08-14T15:50:11+00:00",
  "transcript": "This is the project my last two posts were building towards (this is the last of this silliness). I ported the Doom rendering algorithm to run inside a transformer. Instead of training a model, I used a compiler I wrote which converts computation graphs into transformer weights, and then ported Doom's algorithm into a compatible graph. The generated checkpoints can be loaded in Hugging Face without trust\\_remote\\_code -- it's just a standard transformers checkpoint. You feed the model a prompt representing the scene data, and generate until the model stops. The result is a token sequence which includes simple pixel drawing commands (to move the cursor, draw a pixel, etc). When you mechanically apply those drawing commands you get the rendered frame.\n\nThe article includes the entire host program necessary to load the checkpoint, generate the render, and parse the output into the famous E1M1 frame. This host code is 43 lines of python. The python to define the computation graph is much longer, but that gets compiled into the transformer itself.\n\nOne frame is a 3,614-token prompt plus 53,747 generated tokens -- just over 40 minutes on a B200.\n\nThe original Doom could achieve 35 FPS on a 486. This achieves 35 FPD (frames per day) on a B200.\n\nWrite-up: [https://ood.dev/posts/doom/](https://ood.dev/posts/doom/)  \nWeights:  [https://huggingface.co/physicsrob/torchwright-doom-e1m1](https://huggingface.co/physicsrob/torchwright-doom-e1m1)  \nGithub for the source code which gets compiled: [https://github.com/physicsrob/torchwright\\_doom/](https://github.com/physicsrob/torchwright_doom/)\n\n\n\n--- Top Comments ---\n\n\n[62 upvotes] pretty clever project , but 35 frames per day is hilarious compared to the original doom. Still impressive as a proof of concept though.\n\n[14 upvotes] wtf literally anything can run doom ",
  "transcript_chars": 1830,
  "ingested_at": "2026-08-15T01:30:10.573947+00:00",
  "source": "reddit",
  "yt_meta": {
    "score": 113,
    "upvote_ratio": 0.96,
    "num_comments": 23,
    "author": "notforrob",
    "is_self": true
  }
}