Repository navigation
Conversation
The Cosmos cookbooks now live in this repo, so the Edge-LLM user guide moves here and the notebooks resolve assets under .agents/skills/cookbooks.
pengcuo
left a comment
There was a problem hiding this comment.
Thanks for moving this over and for being explicit about the v0.11.0 state in the description. That is also why I am requesting changes rather than approving:
- The documented policy path is known not to run. Both notebooks and the shared README pin TensorRT-Edge-LLM v0.11.0, but per your own testing the v0.11.0
cosmos3_policy_inferencerejects engines produced by the documentedtensorrt-edgellm-export --task policy->cosmos3_policy_buildpath (missingattention_position_idsonund_prefill,content_height/widthonvae_encoder), and the only end-to-end smoke was on v0.10.0 engines. A cookbook whose main path fails on the version it pins should not merge until either (a) the upstream export/build writes what the runtime needs and the notebook has been re-run on that version, or (b) the cookbook pins the combination that was actually exercised (v0.10.0 export, build and inference) and says so. The open question in your description ("waiting on which build path this cookbook should document") is the blocker; happy to re-review once it is settled. - Please state in the PR which version and box the reasoner notebook's export -> build ->
llm_inferencesequence was last run on; the description only references caption quality confirmed on Thor in the old thread.
Non-blocking:
--viewPoint concat_viewis passed tocosmos3_policy_inference. The upstream VLA guide does not mention the flag;experimental_models/cosmos3/examples/cosmos3_policy_inference.cppon upstreammainhas it, so please confirm it exists in the pinned tag.- README default
EDGELLM_ROOT="${EDGELLM_ROOT:-$PWD/TensorRT-Edge-LLM}"vs the notebooks'~/TensorRT-Edge-LLM; pick one. - The policy engines are built directly under
ENGINE_DIRwhile the reasoner usesENGINE_DIR/reasoning; apolicy/subfolder keeps the two from sharing a directory (the notebook already puts itsWORK_DIRunderENGINE_DIR/policy).
| Thor/Orin, DRIVE, DGX Spark, or an x86 developer build), then run the C++ | ||
| inference binaries. | ||
|
|
||
| Use [TensorRT-Edge-LLM](https://github.com/NVIDIA/TensorRT-Edge-LLM) **v0.11.0**. |
There was a problem hiding this comment.
Per the PR description, v0.11.0's cosmos3_policy_inference does not load engines produced by the v0.11.0 tensorrt-edgellm-export --task policy + cosmos3_policy_build path documented here, and the only end-to-end smoke was on v0.10.0. Pin what was actually run, or re-run on the version that is pinned, before this merges.
There was a problem hiding this comment.
The policy cookbook now uses tensorrt-edgellm-build on the pinned v0.11.0 tag (f19c188), instead of tensorrt-edgellm-export --task policy followed by cosmos3_policy_build. On that tag the export writes the UND input attention_pos_id and VAE height / width only, while cosmos3_policy_inference binds attention_position_ids and reads builder_config.content_height / content_width. The direct builder writes that contract.
I re-ran the documented build and inference on v0.11.0 (95515c2) on an x86 RTX PRO 6000 (SM120): tensorrt-edgellm-build --components und-prefill,gen,vae-encoder, then cosmos3_policy_inference --viewPoint concat_view --state 0,0,0,0,0,0,0,0. action.json is [1, 32, 8], finite=true. The zero state is a runtime smoke, not a DROID quality check. The PR testing section now records this run.
| Set a workspace and the Edge checkpoints: | ||
|
|
||
| ```bash | ||
| export EDGELLM_ROOT="${EDGELLM_ROOT:-$PWD/TensorRT-Edge-LLM}" |
There was a problem hiding this comment.
Default here is $PWD/TensorRT-Edge-LLM; both notebooks default to ~/TensorRT-Edge-LLM. One default, please.
There was a problem hiding this comment.
Updated in f19c188. The shared README now defaults to $HOME/TensorRT-Edge-LLM, matching both notebooks (Path.home() / "TensorRT-Edge-LLM").
| " --engineDir \"$ENGINE_DIR\" \\\n", | ||
| " --image \"$OBSERVATION_IMAGE\" \\\n", | ||
| " --prompt \"$POLICY_PROMPT\" \\\n", | ||
| " --viewPoint concat_view \\\n", |
There was a problem hiding this comment.
The upstream VLA guide (fetched 2026-10-21) does not list --viewPoint; upstream main has it in cosmos3_policy_inference.cpp. Please confirm the pinned tag accepts it, otherwise this cell fails on the version the notebook names.
There was a problem hiding this comment.
Confirmed on the pinned v0.11.0 binary. cosmos3_policy_inference --help lists concat_view (with ego_view, third_person_view, and wrist_view). The v0.11.0 smoke passed --viewPoint concat_view and completed. The notebook now states that this tag accepts the flag.
|
Thanks. Please ping latest version (0.11.0) to ensure it works and merge. Thanks a lot! |
|
Hi @nvluxiaoz @ever-wong, following up on the v0.11.0 policy build-path question in the previous PR: NVIDIA/cosmos#326 (comment) The documented VLA path is
Which path should this cookbook use?
Thanks! |
…lder v0.11.0 policy export does not write the runtime contract, so the cookbook uses tensorrt-edgellm-build and keeps policy engines under ENGINE_DIR/policy.
|
Thanks for the review. I confirmed with Luxiao that this policy cookbook should use the direct builder,
The non-blocking notes are in |
Summary
Moves the Cosmos3-Edge TensorRT-Edge-LLM user guide from NVIDIA/cosmos#326 into this repo, under
.agents/skills/cookbooks/cosmos3/..agents/skills/cookbooks/cosmos3/README.md, pinned to TensorRT-Edge-LLM v0.11.0.EDGELLM_ROOTdefaults to$HOME/TensorRT-Edge-LLM.nvidia/Cosmos3-Edgewith--task reasoning, build engines underENGINE_DIR/reasoning, and runllm_inferenceonassets/robot_153.jpg.und-prefill,gen, andvae-encoderwithtensorrt-edgellm-buildunderENGINE_DIR/policy, then runcosmos3_policy_inference. The C++ runtime needs-DBUILD_EXPERIMENTAL_MODELS=ONand-DENABLE_CUTE_DSL=ALL. It uses the same 640×540 DROIDconcat_viewas the vLLM-Omni / SGLang policy notebooks, with--viewPoint concat_viewand an 8-value--state. Edge-LLM covers the policy task only..agents/skills/cookbooks/cosmos3.On the v0.11.0 tag,
tensorrt-edgellm-export --task policywrites the UND inputattention_pos_idand VAEheight/widthonly.cosmos3_policy_inferencebindsattention_position_idsand readsbuilder_config.content_height/content_width. The direct builder writes that contract, so the policy cookbook usestensorrt-edgellm-build.Upstream references: Cosmos3-Edge VLA guide for reasoning, and the direct engine builder for policy.
Testing
robot_153.jpgand the three DROID camera videos are found.95515c2), x86 RTX PRO 6000 (SM120):tensorrt-edgellm-build --components und-prefill,gen,vae-encoder, thencosmos3_policy_inference --viewPoint concat_view --state 0,0,0,0,0,0,0,0.action.jsonis[1, 32, 8],finite=true. The zero state is a runtime smoke, not a DROID quality check. v0.11.0cosmos3_policy_inference --helplistsconcat_view.llm_build+visual_build→llm_inferencesequence was TensorRT-Edge-LLM v0.10.0 on the same RTX PRO 6000. After Ever's visual-export fix,llm_inferencewas re-run on that box forrobot_153.jpganddescribe_anything.png, and the captions matched the images. Ever confirmed normal outputs on Thor. See the thread on cookbook: add Cosmos3-Edge TensorRT-Edge-LLM reasoner and policy notebooks cosmos#326. That retest did not name the tag as v0.11.0.