[TRTLLM-12352][feat] complete MX post-transform qualification foundation - #16458
Conversation
d7a335d to
63503c8
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #60831 [ run ] triggered by Bot. Commit: |
|
PR_Github #60831 [ run ] completed with state
|
|
/bot run --disable-fail-fast --stage-list "A100X-PyTorch-1,B300-PyTorch-1,DGX_B200-PyTorch-5,DGX_H100-PyTorch-5" |
|
PR_Github #61117 [ run ] triggered by Bot. Commit: |
|
PR_Github #61117 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #61352 [ run ] triggered by Bot. Commit: |
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
63503c8 to
c0c0de5
Compare
|
/bot run --disable-fail-fast |
1 similar comment
|
/bot run --disable-fail-fast |
|
PR_Github #61352 [ run ] completed with state |
|
PR_Github #61354 [ run ] triggered by Bot. Commit: |
|
PR_Github #61354 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #61986 [ run ] triggered by Bot. Commit: |
|
PR_Github #61986 [ run ] completed with state
|
|
/bot run --disable-fail-fast --stage-list "DGX_H100-PyTorch-1" |
|
PR_Github #62044 [ run ] triggered by Bot. Commit: |
|
PR_Github #62044 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #62268 [ run ] triggered by Bot. Commit: |
|
PR_Github #62268 [ run ] completed with state |
WalkthroughPost-transform ModelExpress support now uses explicit capability profiles and immutable transform-layout ABI identifiers. Source identities, MX metadata, loader qualification, fallback behavior, tests, and documentation were updated to enforce exact ABI compatibility before P2P transfers. ChangesPost-transform ABI qualification
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ModelLoader
participant MXCheckpointLoader
participant SourceIdentity
ModelLoader->>SourceIdentity: bind qualified transform ABI
ModelLoader->>MXCheckpointLoader: publish or receive post-transform weights
MXCheckpointLoader->>SourceIdentity: compare source and receiver ABI
SourceIdentity-->>MXCheckpointLoader: compatibility result
MXCheckpointLoader-->>ModelLoader: use MX transfer or fall back to disk
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tensorrt_llm/_torch/models/checkpoints/mx/checkpoint_loader.py (1)
994-1012: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the unused
_metadata_is_post_transformhelper. No call sites remain in the repo, so this wrapper can be dropped to avoid dead code.🤖 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 `@tensorrt_llm/_torch/models/checkpoints/mx/checkpoint_loader.py` around lines 994 - 1012, Remove the unused `_metadata_is_post_transform` helper entirely; retain `_metadata_weight_layout_status` and its callers unchanged.
🤖 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 `@tensorrt_llm/_torch/models/checkpoints/mx/checkpoint_loader.py`:
- Around line 994-1012: Remove the unused `_metadata_is_post_transform` helper
entirely; retain `_metadata_weight_layout_status` and its callers unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 09ee05a3-92e7-479d-b15a-7fab33f49529
📒 Files selected for processing (13)
docs/source/features/model-express.mdtensorrt_llm/_torch/models/checkpoints/mx/checkpoint_loader.pytensorrt_llm/_torch/pyexecutor/model_loader.pytensorrt_llm/_torch/weight_sharing/__init__.pytensorrt_llm/_torch/weight_sharing/post_transform_profiles.pytensorrt_llm/_torch/weight_sharing/source_identity.pytests/unittest/_torch/executor/test_model_loader_gms.pytests/unittest/_torch/executor/test_model_loader_mx.pytests/unittest/_torch/models/checkpoints/mx/test_mx_checkpoint_loader.pytests/unittest/_torch/weight_sharing/_source_identity_fakes.pytests/unittest/_torch/weight_sharing/test_post_transform_profiles.pytests/unittest/_torch/weight_sharing/test_source_identity.pytests/unittest/utils/post_transform_qualification.py
2ez4bz
left a comment
There was a problem hiding this comment.
Approving changes to on the modeling side.
schetlur-nv
left a comment
There was a problem hiding this comment.
rubber stamp for trt-llm-devs
…ion (#16458) Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Summary
Complete the post-transform qualification foundation needed before adding MX support for another model family.
This PR keeps
LlamaForCausalLMas the only enabled profile. It replaces broad capability assumptions with an exact, test-backed contract for deciding whether a producer may publish and a receiver may consume post-transform weights.Dependencies
3df2ef3777.3f2eee5133, replayed on the current dependency stack.The PR targets
main, so its visible diff still includes #16159 while that dependency remains open. It should remain draft and be rebased after #16159 merges.Changes
Foundation A: exact capability profiles
Foundation B: reusable qualification harness
Foundation C: transform-layout ABI
trtllm-llama-target-layout-v1.ENFORCEidentity policy.Scope
Validation
git diff --check: passed.torchandtransformersare not installed); full CI is required.Dev Engineer Review
trtllm-llama-target-layout-v1, bound toSourceIdentityformat version 3. ABI mismatches or missing metadata fail closed before P2P transfer.LlamaForCausalLM; unsupported models and speculative/draft-model cases fall back safely.git diff --check, syntax compilation, hooks, and DCO validation passed. Focused pytest execution was unavailable becausetorchandtransformersare absent; full CI remains required.QA Engineer Review
Test code changes include:
ModelLoaderqualification, fallback, ABI propagation, normalization, speculative-mode, and output-behavior tests.SourceIdentityABI binding, serialization, fingerprint, mismatch, and format-version tests.No corresponding coverage entries were found in
test-db/,qa/, ortests/integration/test_lists/for these focused tests. Verdict: needs follow-up.