Instructions to use physicsrob/torchwright-doom-e1m1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use physicsrob/torchwright-doom-e1m1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="physicsrob/torchwright-doom-e1m1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("physicsrob/torchwright-doom-e1m1") model = AutoModelForCausalLM.from_pretrained("physicsrob/torchwright-doom-e1m1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use physicsrob/torchwright-doom-e1m1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "physicsrob/torchwright-doom-e1m1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "physicsrob/torchwright-doom-e1m1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/physicsrob/torchwright-doom-e1m1
- SGLang
How to use physicsrob/torchwright-doom-e1m1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "physicsrob/torchwright-doom-e1m1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "physicsrob/torchwright-doom-e1m1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "physicsrob/torchwright-doom-e1m1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "physicsrob/torchwright-doom-e1m1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use physicsrob/torchwright-doom-e1m1 with Docker Model Runner:
docker model run hf.co/physicsrob/torchwright-doom-e1m1
| library_name: transformers | |
| pipeline_tag: text-generation | |
| # 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: | |
| ```python | |
| 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](https://huggingface.co/physicsrob/torchwright-doom-e1m1) | |
| and [80×50](https://huggingface.co/physicsrob/torchwright-doom-e1m1-80x50). | |
| The compiler-facing source is | |
| [torchwright_doom](https://github.com/physicsrob/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). | |