Who it is forA developer building an app or agent workflow that needs a physical reasoning model reachable through a standard chat API on their own GPU.
The problemCalling the checkpoints directly from custom Python code is awkward when the rest of the stack already speaks the OpenAI chat format.
The outcomeA running vLLM server that hosts code-as-world-4b (or code-as-world-9b) through the OpenAI-compatible API.
What you need first
- Python 3.10 or 3.11
- A CUDA host for the checkpoints
- git and the hf CLI to clone repos and download weights
- Disk space and network access for the 4B and 9B weights and the QuantiPhy validation videos
Steps
- Clone the repo with
git clone https://github.com/MirroS-Lab/Code-as-World.git, runcd Code-as-World, create a environment withpython -m venv .venv, activate it withsource .venv/bin/activate, and runpip install -r requirements/inference.txt. - Download the checkpoint with
hf download MirroS-Lab/Code-as-World-VL-4B --local-dir weights/4b. - Start the server with
CUDA_VISIBLE_DEVICES=0 vllm serve weights/4b --served-model-name code-as-world-4b --chat-template code_as_world/templates/qwen3_5_no_think.jinja, adding the remaining flags from the README's OpenAI-compatible serving block (including--media-io-kwargs,--mm-processor-kwargs, and--generation-config vllm). (inferred, check the README) - For the 9B checkpoint, swap
weights/4bandcode-as-world-4bforweights/9bandcode-as-world-9b, and download it withhf download MirroS-Lab/Code-as-World-VL-9B --local-dir weights/9b.
Prompt for your agent
In the Code-as-World repo at <repo_path>, start the vLLM server for weights/4b with the served model name code-as-world-4b using the flags in the README's OpenAI-compatible serving section. Then send one chat request containing <video_or_frames> and return the model's text reply. Verify that the server lists code-as-world-4b as an available model before sending the request.
Caveat. The README gives the serve command for a CUDA host and a specific chat template, so the server will not run as documented on other setups.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page