Skip to content

Conversation

@nealvaidya
Copy link
Contributor

@nealvaidya nealvaidya commented Aug 5, 2025

Summary by CodeRabbit

  • New Features

    • Added comprehensive documentation and guides for deploying the gpt-oss-120b model with disaggregated serving on NVIDIA GPUs.
    • Introduced configuration files for prefill and decode engine settings.
    • Added a launch script to simplify starting disaggregated serving components.
    • Provided a new Dockerfile for building a prebuilt TensorRT LLM container image.
  • Documentation

    • Added a "Latest News" section to the README with deployment updates.
    • Included detailed troubleshooting, benchmarking, and architecture overview for the new deployment setup.
  • Chores

    • Enhanced build scripts to support custom TensorRT-LLM git URLs via new command-line options.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Aug 5, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 5, 2025

Walkthrough

This update introduces new documentation, configuration files, and scripts to support disaggregated serving of the gpt-oss-120b model using TensorRT-LLM on NVIDIA Blackwell GPUs. It adds deployment instructions, benchmarking guidance, and troubleshooting tips. Additionally, it provides a new Dockerfile, updates build scripts for custom repository support, and includes engine configuration YAMLs for prefill and decode phases.

Changes

Cohort / File(s) Change Summary
Documentation Additions
README.md, components/backends/trtllm/gpt-oss.md
Added a "Latest News" section to the README and a comprehensive deployment guide for running gpt-oss-120b in disaggregated mode with TensorRT-LLM, including prerequisites, setup, configuration, benchmarking, architecture overview, and troubleshooting.
Engine Configuration Files
components/backends/trtllm/engine_configs/gpt_oss/decode.yaml,
components/backends/trtllm/engine_configs/gpt_oss/prefill.yaml
Introduced new YAML configuration files for the GPT OSS decode and prefill engines, specifying parameters for attention data parallelism, MoE backend, CUDA graph, cache transceiver, logging, and batch sizes.
Deployment Script
components/backends/trtllm/launch/gpt_oss_disagg.sh
Added a bash script to orchestrate the launch of frontend, prefill, and decode workers for disaggregated GPT serving, handling environment setup, resource allocation, and process management.
Container Build System
container/Dockerfile.tensorrt_llm_prebuilt,
container/build.sh,
container/build_trtllm_wheel.sh
Added a new Dockerfile for building a prebuilt TensorRT LLM container with dependencies and build logic. Updated build scripts to support specifying a custom TensorRT-LLM git repository URL via new command-line options, and modified cloning logic accordingly.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Frontend
    participant PrefillWorker
    participant DecodeWorker

    User->>Frontend: Send inference request
    Frontend->>PrefillWorker: Route request (prefill phase)
    PrefillWorker-->>Frontend: Return prefill results
    Frontend->>DecodeWorker: Route request (decode phase, with KV cache via UCX)
    DecodeWorker-->>Frontend: Return decode results
    Frontend-->>User: Respond with final output
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–20 minutes

Poem

🐇
In racks of Blackwell, code now hops,
Disaggregated serving—no more stops!
Scripts and configs, YAMLs anew,
Docker builds ready, just for you.
With docs to guide and scripts to run,
GPT-OSS on GPUs—oh what fun!
Benchmarks await, let’s see how we’ve done.

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

♻️ Duplicate comments (2)
components/backends/trtllm/engine_configs/gpt_oss/prefill.yaml (1)

15-27: Same formatting nits as decode.yaml

See previous comment; apply the same linter fixes here for consistency.

components/backends/trtllm/gpt-oss.md (1)

73-74: Model name availability needs confirmation

openai/gpt-oss-120b is not yet visible on HF Hub (was flagged in prior review). Double-check spelling / availability before publishing docs.

🧹 Nitpick comments (8)
container/build_trtllm_wheel.sh (1)

54-56: Repository already present with different remote

If /tmp/TensorRT-LLM exists from a previous run but points to another remote, the wheel will be built from the wrong source. Consider validating that:

remote=$(git -C TensorRT-LLM remote get-url origin 2>/dev/null)
[ "$remote" != "$TRTLLM_GIT_URL" ] && rm -rf TensorRT-LLM

before the clone.

components/backends/trtllm/engine_configs/gpt_oss/decode.yaml (1)

15-26: Missing trailing newline & inconsistent indentation

Minor, but YAML linters flag both:

  1. File lacks a trailing newline (POSIX-style text).
  2. Top-level keys use 0-space indent while moe_config uses 4; 2-space is the repo convention elsewhere.

Not blocking, but worth normalising to keep diffs clean.

README.md (1)

30-33: Date format & link clarity

“08/05” is ambiguous (US vs ISO). Prefer 2025-08-05 to avoid confusion for international readers.

-* [08/05] Deploy `openai/gpt-oss-120b` …
+* [2025-08-05] Deploy `openai/gpt-oss-120b` …

Also confirm the relative link renders correctly on GitHub; a broken anchor in the homepage hurts discoverability.

components/backends/trtllm/launch/gpt_oss_disagg.sh (2)

18-20: Frontend may start slowly – race condition with workers

Workers may try to register before dynamo.frontend is listening, causing retries / failures. Consider a simple readiness loop:

python3 -m dynamo.frontend --router-mode round-robin --http-port 8000 &
FRONTEND_PID=$!
until curl -sf http://localhost:8000/healthz >/dev/null; do sleep 1; done

23-46: Hard-coded GPU sets & duplicate flags – expose knobs instead

Fixed CUDA_VISIBLE_DEVICES and batch/token limits make the script less reusable. Export them with sensible defaults so users can override:

export PREFILL_GPUS=${PREFILL_GPUS:-"0,1,2,3"}
export DECODE_GPUS=${DECODE_GPUS:-"4,5,6,7"}
…
CUDA_VISIBLE_DEVICES=$PREFILL_GPUS python3 -m dynamo.trtllm …
container/Dockerfile.tensorrt_llm_prebuilt (2)

31-38: apt-get layer leaves cache & increases image size

Add rm -rf /var/lib/apt/lists/* at the end of the apt-get RUN to shrink the final image.


54-58: Building Rust workspace directly in the runtime image bloats final size

Consider a multi-stage build: compile in one stage, then COPY --from=builder only the binaries/libs needed. This keeps the runtime image slim and avoids shipping build toolchain.

components/backends/trtllm/gpt-oss.md (1)

228-255: Benchmark command bundles long JSON in --extra-inputs twice

Both --extra-inputs ignore_eos:true and the subsequent JSON-wrapped version set the same flag, which is redundant and may confuse users. Consider removing one of them.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 433f601 and 37b3373.

📒 Files selected for processing (8)
  • README.md (1 hunks)
  • components/backends/trtllm/engine_configs/gpt_oss/decode.yaml (1 hunks)
  • components/backends/trtllm/engine_configs/gpt_oss/prefill.yaml (1 hunks)
  • components/backends/trtllm/gpt-oss.md (1 hunks)
  • components/backends/trtllm/launch/gpt_oss_disagg.sh (1 hunks)
  • container/Dockerfile.tensorrt_llm_prebuilt (1 hunks)
  • container/build.sh (4 hunks)
  • container/build_trtllm_wheel.sh (2 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: the `--torch-backend=auto` flag works with vllm installations via uv pip install, even though it's n...
Learnt from: ptarasiewiczNV
PR: ai-dynamo/dynamo#2027
File: container/deps/vllm/install_vllm.sh:0-0
Timestamp: 2025-07-22T10:22:28.972Z
Learning: The `--torch-backend=auto` flag works with vLLM installations via uv pip install, even though it's not a standard pip option. This flag is processed by vLLM's build system during installation to automatically match PyTorch distribution with container CUDA versions.

Applied to files:

  • container/build_trtllm_wheel.sh
  • container/build.sh
📚 Learning: in examples/sglang/slurm_jobs/scripts/worker_setup.py, background processes (like nats-server, etcd)...
Learnt from: fsaady
PR: ai-dynamo/dynamo#1730
File: examples/sglang/slurm_jobs/scripts/worker_setup.py:230-244
Timestamp: 2025-07-03T10:14:30.570Z
Learning: In examples/sglang/slurm_jobs/scripts/worker_setup.py, background processes (like nats-server, etcd) are intentionally left running even if later processes fail. This design choice allows users to manually connect to nodes and debug issues without having to restart the entire SLURM job from scratch, providing operational flexibility for troubleshooting in cluster environments.

Applied to files:

  • components/backends/trtllm/launch/gpt_oss_disagg.sh
📚 Learning: in multi-node setups with head/worker architecture, the head node typically doesn't need environment...
Learnt from: GuanLuo
PR: ai-dynamo/dynamo#1371
File: examples/llm/benchmarks/vllm_multinode_setup.sh:18-25
Timestamp: 2025-06-05T01:46:15.509Z
Learning: In multi-node setups with head/worker architecture, the head node typically doesn't need environment variables pointing to its own services (like NATS_SERVER, ETCD_ENDPOINTS) because local processes can access them via localhost. Only worker nodes need these environment variables to connect to the head node's external IP address.

Applied to files:

  • components/backends/trtllm/launch/gpt_oss_disagg.sh
📚 Learning: in vllm worker deployments, startup probes (with longer periods and higher failure thresholds like p...
Learnt from: nnshah1
PR: ai-dynamo/dynamo#2124
File: components/backends/vllm/deploy/disagg.yaml:54-60
Timestamp: 2025-07-25T22:34:11.384Z
Learning: In vLLM worker deployments, startup probes (with longer periods and higher failure thresholds like periodSeconds: 10, failureThreshold: 60) are used to handle the slow model loading startup phase, while liveness probes are intentionally kept aggressive (periodSeconds: 5, failureThreshold: 1) for quick failure detection once the worker is operational. This pattern separates startup concerns from operational health monitoring in GPU-heavy workloads.

Applied to files:

  • components/backends/trtllm/gpt-oss.md
📚 Learning: graceful fallback for pytorch wheel installation is broken on arm architecture, so immediate exit on...
Learnt from: zaristei
PR: ai-dynamo/dynamo#2020
File: container/deps/vllm/install_vllm.sh:115-118
Timestamp: 2025-07-21T00:10:56.947Z
Learning: Graceful fallback for PyTorch wheel installation is broken on ARM architecture, so immediate exit on pinned version failure is preferred over fallback mechanisms in container/deps/vllm/install_vllm.sh for ARM64.

Applied to files:

  • container/build.sh
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pre-merge-rust (lib/bindings/python)
  • GitHub Check: pre-merge-rust (lib/runtime/examples)
  • GitHub Check: pre-merge-rust (.)
  • GitHub Check: Build and Test - vllm
🔇 Additional comments (5)
container/build_trtllm_wheel.sh (1)

43-47: Good default for custom forks

👍 Providing a sane fallback URL avoids hard-coding the NVIDIA fork and simplifies use of private mirrors.

container/build.sh (2)

94-98: TRTLLM_GIT_URL default is empty – OK

Variable introduced cleanly and initialised early; no side-effects observed.


191-198: Help/option wiring looks correct

Parser, help text and variable storage are in sync. No issues.

components/backends/trtllm/launch/gpt_oss_disagg.sh (1)

36-46: Missing & keeps decode worker in-foreground – script exits on failure only

This is intentional (the script stays alive), but once decode worker ends normally the trap kills all processes. If that is not desired, add an explicit wait for the background PIDs instead:

wait $FRONTEND_PID $PREFILL_PID $DECODE_PID
components/backends/trtllm/gpt-oss.md (1)

29-33: deploy/docker-compose.yml path not present in repo

The guide instructs docker compose -f deploy/docker-compose.yml up, but no such file is added in this PR. Please verify the path or include the compose definition.

@nealvaidya
Copy link
Contributor Author

Will address @coderabbitai stuff in a later PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 5, 2025

Tip

For best results, initiate chat on the files or code changes.

@nealvaidya That sounds like a good approach! Keeping PRs focused on their original scope is a solid practice.

If you'd like, I can create a follow-up issue to track any suggestions or improvements for later consideration. This would help ensure nothing gets lost and provide a centralized place to discuss the items when you're ready to address them.

Let me know if you'd like me to create that issue, or if you prefer to handle the tracking yourself.

@saturley-hall saturley-hall merged commit 8964d0d into main Aug 5, 2025
9 checks passed
@saturley-hall saturley-hall deleted the jthomson04/orangina branch August 5, 2025 17:17
jain-ria pushed a commit that referenced this pull request Aug 7, 2025
Signed-off-by: jthomson04 <[email protected]>
Co-authored-by: jthomson04 <[email protected]>
Co-authored-by: John Thomson (DLAlgo) <[email protected]>
Co-authored-by: Neelay Shah <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants