Skip to content

feat: add native TensorRT-LLM P2P example - #540

Merged
zhengluo-nv merged 1 commit into
mainfrom
zheluo/trtllm-clean-example
Jul 28, 2026
Merged

feat: add native TensorRT-LLM P2P example#540
zhengluo-nv merged 1 commit into
mainfrom
zheluo/trtllm-clean-example

Conversation

@zhengluo-nv

@zhengluo-nv zhengluo-nv commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add one production-style TensorRT-LLM Kubernetes example using the native checkpoint_format="MX" loader through the standard trtllm-serve --config interface.
  • Remove the legacy patched PRESHARDED integration, including publish_from_worker, MxLiveCheckpointLoader, the TRT-LLM patch bundle, and historical Kimi/Dynamo-specific manifests.
  • Remove the temporary TRT-LLM CI image, source overlay, merge/patch scripts, launcher, and executable GitHub Actions build/test entries.
  • Keep the TRT-LLM row in ci/TEST_PLAN.md, marked Not started until a qualified upstream image and a no-shards fallback-proof test are available.
  • Retain only the ModelExpress transport helpers consumed by TensorRT-LLM's native MX checkpoint loader.

Why

The repository contained two incompatible TensorRT-LLM paths: a historical patch-based integration and a temporary CI overlay assembled from multiple upstream revisions. Neither is appropriate as the canonical production path.

This change makes the upstream-native loader the only supported architecture. ModelExpress no longer patches or overlays TensorRT-LLM. Operators must use a qualified TensorRT-LLM image that already contains the native MX checkpoint loader, with the ModelExpress client installed without replacing the image's CUDA, Torch, NIXL, UCX, or protobuf stack.

User impact

The TensorRT-LLM example now matches the normal deployment shape used by the vLLM and SGLang examples:

  • one scalable Deployment rather than dedicated source and target workloads;
  • a shared Hugging Face model cache for normal fallback;
  • checkpoint_format: MX and mx_config supplied through a standard TRT-LLM configuration file;
  • the first replica loads from storage and publishes weights, while later compatible replicas can receive them through NIXL P2P.

TRT-LLM CI is intentionally not enabled by this PR. Re-enabling it requires a qualified upstream image and a target without local weight shards so storage fallback cannot produce a false pass.

Validation

  • Full ModelExpress Python client suite: 740 passed, 29 skipped
  • Focused TensorRT-LLM cleanup and native-loader tests: 8 passed
  • GitHub workflow YAML parsing
  • TensorRT-LLM Kubernetes manifest parsing
  • Legacy path/reference audit
  • git diff --check

Summary by CodeRabbit

  • New Features

    • Added a native TensorRT-LLM P2P weight-transfer deployment using checkpoint_format="MX".
    • Added Kubernetes configuration for scalable single-node TensorRT-LLM replicas.
    • Added guidance for supported models, deployment, scaling, and verification.
  • Documentation

    • Updated setup guides, integration references, and CI coverage to reflect native MX support.
    • Clarified vLLM and TensorRT-LLM deployment instructions.
  • Chores

    • Removed legacy TensorRT-LLM preshared examples, patch tooling, and related deployment configurations.
    • Added automated validation for the new deployment and documentation.

@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 18:33 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 18:33 Inactive
@zhengluo-nv zhengluo-nv changed the title Add native TensorRT-LLM P2P example feat: add native TensorRT-LLM P2P example Jul 24, 2026
@github-actions github-actions Bot added the feat label Jul 24, 2026
@zhengluo-nv
zhengluo-nv force-pushed the zheluo/trtllm-clean-example branch from 8f0673c to 5e1b962 Compare July 24, 2026 19:01
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 19:01 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 19:01 Inactive
@zhengluo-nv
zhengluo-nv force-pushed the zheluo/trtllm-clean-example branch from 5e1b962 to 15465a1 Compare July 24, 2026 19:13
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 19:13 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 19:13 Inactive
@zhengluo-nv
zhengluo-nv force-pushed the zheluo/trtllm-clean-example branch from 15465a1 to 7e92ef8 Compare July 24, 2026 19:38
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 19:38 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 19:38 Inactive
@zhengluo-nv
zhengluo-nv force-pushed the zheluo/trtllm-clean-example branch from 7e92ef8 to 46aa8ef Compare July 24, 2026 19:56
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 19:57 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 19:57 Inactive
@zhengluo-nv
zhengluo-nv force-pushed the zheluo/trtllm-clean-example branch from 46aa8ef to d231313 Compare July 24, 2026 20:30
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 20:30 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 20:30 Inactive
@zhengluo-nv
zhengluo-nv force-pushed the zheluo/trtllm-clean-example branch from d231313 to 68f178c Compare July 24, 2026 20:52
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 20:52 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 20:52 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 24, 2026 23:29 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 16:58 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 16:58 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 17:10 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 17:10 Inactive
@zhengluo-nv
zhengluo-nv marked this pull request as ready for review July 27, 2026 17:13
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

Native MX TensorRT-LLM P2P

Layer / File(s) Summary
Native MX runtime integration
modelexpress_client/python/..., modelexpress_client/python/README.md
TensorRT-LLM documentation and transfer code now use native checkpoint_format="MX" loading and remove the custom PRESHARDED loader integration.
Native MX Kubernetes deployment
examples/p2p_transfer_k8s/client/...
Adds the TensorRT-LLM ConfigMap, Service, Deployment, deployment guide, and tests for the single-node-per-replica MX path.
Documentation and contributor alignment
README.md, CONTRIBUTING.md, examples/model_streamer_k8s/README.md
Updates feature descriptions, build instructions, and example links for the native MX workflow.
CI matrix and test-plan alignment
.github/workflows/..., ci/...
Removes TensorRT-LLM CI matrix entries and updates artifact expectations, coverage status, and marker documentation.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Poem

I’m a rabbit with MX in my hat,
Hopping past old loaders—imagine that!
ConfigMaps bloom, replicas take flight,
CI trims its path through the night.
Native weights now flow swift and bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a native TensorRT-LLM P2P example.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
modelexpress_client/python/tests/test_trtllm_native_example.py (1)

46-62: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Include the changed client README in the legacy-reference scan.

examples/p2p_transfer_k8s/client/README.md is a changed user-facing document, but it is absent from documentation. A stale llama-p2p.yaml or PRESHARDED reference there would pass this test. Add that file and keep the list aligned with the migration documentation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modelexpress_client/python/tests/test_trtllm_native_example.py` around lines
46 - 62, Update test_documentation_points_to_the_native_trtllm_example by adding
examples/p2p_transfer_k8s/client/README.md to the documentation list, ensuring
it is covered by the existing legacy-reference assertions and remains aligned
with the migration documentation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@modelexpress_client/python/tests/test_trtllm_native_example.py`:
- Around line 46-62: Update
test_documentation_points_to_the_native_trtllm_example by adding
examples/p2p_transfer_k8s/client/README.md to the documentation list, ensuring
it is covered by the existing legacy-reference assertions and remains aligned
with the migration documentation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ca682b70-02a7-4f68-a034-df93a8530396

📥 Commits

Reviewing files that changed from the base of the PR and between f463897 and 6c17e00.

📒 Files selected for processing (26)
  • .github/workflows/modelexpress-ci-tests.yml
  • CONTRIBUTING.md
  • README.md
  • ci/TEST_PLAN.md
  • ci/k8s/client/sgl/manifest-azure.yaml
  • ci/k8s/client/test_p2p_k8s.py
  • ci/k8s/client/trt-llm/Dockerfile
  • ci/k8s/client/trt-llm/manifest-azure.yaml
  • ci/k8s/client/trt-llm/trtllm_p2p_launcher.py
  • examples/model_streamer_k8s/README.md
  • examples/p2p_transfer_k8s/README.md
  • examples/p2p_transfer_k8s/client/README.md
  • examples/p2p_transfer_k8s/client/trtllm/Dockerfile.ph3-gcp-gb200
  • examples/p2p_transfer_k8s/client/trtllm/README.md
  • examples/p2p_transfer_k8s/client/trtllm/kimi-disagg-mx-tp8-dgd.yaml
  • examples/p2p_transfer_k8s/client/trtllm/kimi-source-decode-dgd.yaml
  • examples/p2p_transfer_k8s/client/trtllm/mx-infra-decode.yaml
  • examples/p2p_transfer_k8s/client/trtllm/trtllm-single-node-p2p.yaml
  • modelexpress_client/python/README.md
  • modelexpress_client/python/modelexpress/envs.py
  • modelexpress_client/python/modelexpress/trtllm_live_transfer.py
  • modelexpress_client/python/tests/test_trtllm_native_example.py
  • trtllm_patches/v1.3.0rc5/README.md
  • trtllm_patches/v1.3.0rc5/apply_patches.py
  • trtllm_patches/v1.3.0rc5/patch_model_loader.py
  • trtllm_patches/v1.3.0rc5/patch_tp_allgather.py
💤 Files with no reviewable changes (13)
  • ci/k8s/client/trt-llm/manifest-azure.yaml
  • examples/p2p_transfer_k8s/client/trtllm/kimi-disagg-mx-tp8-dgd.yaml
  • examples/p2p_transfer_k8s/client/trtllm/mx-infra-decode.yaml
  • modelexpress_client/python/modelexpress/envs.py
  • trtllm_patches/v1.3.0rc5/patch_tp_allgather.py
  • examples/p2p_transfer_k8s/client/trtllm/Dockerfile.ph3-gcp-gb200
  • trtllm_patches/v1.3.0rc5/README.md
  • ci/k8s/client/trt-llm/trtllm_p2p_launcher.py
  • ci/k8s/client/trt-llm/Dockerfile
  • trtllm_patches/v1.3.0rc5/patch_model_loader.py
  • trtllm_patches/v1.3.0rc5/apply_patches.py
  • examples/p2p_transfer_k8s/client/trtllm/kimi-source-decode-dgd.yaml
  • .github/workflows/modelexpress-ci-tests.yml

@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 18:17 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 18:17 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 18:31 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 18:31 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 18:45 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 18:45 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 18:48 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 18:48 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 19:04 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 19:04 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 27, 2026 20:08 Inactive
Signed-off-by: Zheng Luo <zheluo@nvidia.com>
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.

2 participants