TorchWright Doom โ€” E1M1

This is a stock Hugging Face Phi3ForCausalLM that renders DOOM through ordinary autoregressive inference. The model and the data-only fast tokenizer load through the ordinary Transformers text-generation pipeline without remote code.

The bundled examples/e1m1_prompt.txt is the executable prompt. Run infer.py (at the bundle root) to produce canonical emitted row ids and raw tokenizer text. tools/pretty_text.py formats that text for reading, while tools/txt_to_png.py independently decodes its cursor/pixel protocol into a PNG โ€” every cursor move and pixel in that protocol is a model-emitted token. The protocol is specified in PROTOCOL.md in the source repo. Neither post-processing tool participates in inference or performs geometry, visibility, lighting, texture selection, or sorting.

Ordinary Transformers pipeline inference works directly, with no custom or remote model code:

from pathlib import Path
from huggingface_hub import hf_hub_download
from transformers import pipeline

repo = "physicsrob/torchwright-doom-e1m1"
prompt = Path(hf_hub_download(repo, "examples/e1m1_prompt.txt")).read_text()
generate = pipeline("text-generation", model=repo, device_map="auto")
generated_text = generate(prompt, return_full_text=False)[0]["generated_text"]

The saved generation defaults are greedy and cover the complete frame. Use the shipped infer.py when canonical integer row IDs, progress reporting, and the exact terminal-token-preserving raw text are required.

Published checkpoints: 320ร—200 and 80ร—50. The compiler-facing source is torchwright_doom.

This bundle: screen 320ร—200, map E1M1, dense fp32 sharded safetensors, eager attention (the validated implementation), greedy decode, generation bound 61440 new tokens.

What running it takes: the fp32 weight shards total 79.97 GiB (85.87 GB), needing a B200-class GPU or multi-GPU device_map. The flagship pipeline render peaked at 151.00 GiB reserved; greedy decode took 39.7 minutes on one B200 for its 53,747-token rollout from a 3,614-token prompt, scoring 99.9% within-option color against the reference renderer.

Canonical numbers and their provenance: FACTS.md in the source repo (github.com/physicsrob/torchwright_doom).

Downloads last month
222
Safetensors
Model size
21B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support