Instructions to use nvidia/Cosmos3-Edge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Cosmos
How to use nvidia/Cosmos3-Edge with Cosmos:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
vLLM section: four small additions for structured output, the container version, sampling defaults and box coordinates
Thanks for Cosmos3-Edge. I run the reasoner on a Jetson AGX Thor behind a JSON-schema safety checker, and after one server change it found people in 44 of 45 labeled pictures against 29 for Cosmos Reason 2 (2B). Four things on this card cost me time. Each one is a small addition.
1. The vLLM command needs a whitespace setting for JSON schema output
With the card's vllm serve command and response_format set to a JSON schema, 39 of 60 answers were a few tokens of valid JSON followed by whitespace up to the 512-token cap. The schema was enforced, but the grammar allows unlimited whitespace. Adding this to the command took failed reads from 39 to 0 and the median answer from 7.78 s to 1.83 s:
--structured-outputs-config '{"backend": "xgrammar", "disable_any_whitespace": true}'
disable_any_whitespace without a backend named stops the server at start, because the default auto backend does not accept it. Suggestion: add the line to the command, or a note that schema-constrained output needs it.
2. A vLLM version and image digest for the container
The card names vllm/vllm-openai:cosmos3 as a tag only. The image I ran reports vLLM 0.23.1rc1.dev1306+gbfee6a802, digest sha256:db0bb920b0b54e82ea96a98659bbd21921f87d0dcfc86feffdafa2db3f08be55. A tag can move, so publishing the version and digest the card was tested with would let people reproduce it.
3. Sampling values in generation_config.json
The file sets "do_sample": true with no temperature, top_p or top_k, so anyone calling generate() without their own values samples with library defaults. With thinking on, greedy decoding looped to my 1,000-token limit on the video critic prompt. NVIDIA's reasoning values (temperature 0.6, top_p 0.95, top_k 20) finished in 104 to 660 tokens over three seeds. Suggestion: put NVIDIA's recommended values in the file, or state on the card that callers must set them.
4. The bounding-box coordinate convention
The card says reasoning outputs may include bounding-box coordinates but does not give the scale. The boxes I got follow the same 0 to 1000 convention as Cosmos Reason 2. One answer held a negative coordinate. A line on the card would save people guessing.
Measured on jetson-agx-thor (items 1, 2 and 4) and an RTX 5090 workstation (item 3) at revision 6afc1256321c3a8e623d89be3bc5117a1e90f96b. Records and the full launch command: https://github.com/obiedeh/physical-ai-safety-observability. The step-by-step notebook: https://github.com/obiedeh/cosmos3-edge-first-timers-guide.