Repository navigation
Feat/staging 05 21 - #25
Merged
Merged
Conversation
Signed-off-by: Ubuntu <[email protected]>
Signed-off-by: Ubuntu <[email protected]>
Signed-off-by: Ubuntu <[email protected]>
Signed-off-by: Ubuntu <[email protected]>
Signed-off-by: Ubuntu <[email protected]>
Signed-off-by: Chenghao Zhang <[email protected]>
Signed-off-by: Suyog Gupta <[email protected]>
Signed-off-by: Suyog Gupta <[email protected]>
Signed-off-by: Suyog Gupta <[email protected]>
Signed-off-by: Suyog Gupta <[email protected]>
Signed-off-by: Suguna Velury <[email protected]>
Signed-off-by: Suguna Velury <[email protected]>
Signed-off-by: Suguna Velury <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
This PR updates the auto-deployment and model export functionality by transitioning model references from DeepSeek‑V3 to Phi‑3 variants and refactoring key internal utilities.
- Updated test cases and integration scenarios with new Phi‑3 model configurations
- Refactored fusion logic to use submodule attribute registration and improved CUDA memory tracking
- Added load hooks for handling aliased parameters and introduced a new module patch for Phi‑3 models
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unittest/_torch/auto_deploy/unit/singlegpu/transformations/test_export.py | Introduced helper function to verify parameter alias loading behavior |
| tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.py | Updated model references from DeepSeek‑V3 to Phi‑3‑mini‑4k |
| tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hf.py | Removed deprecated test for load_state_dict_with_assign |
| tests/unittest/_torch/auto_deploy/integration/test_ad_build.py | Adjusted integration test parameters and backend configuration |
| tensorrt_llm/_torch/auto_deploy/utils/node_utils.py | Added helper functions for submodule attribute management |
| tensorrt_llm/_torch/auto_deploy/utils/cuda_mem_tracker.py | Introduced garbage collection to better free memory |
| tensorrt_llm/_torch/auto_deploy/transformations/library/fusion.py | Refactored GEMM fusion logic with submodule registration and key fusion utility |
| tensorrt_llm/_torch/auto_deploy/transformations/export.py | Added load hook for aliased parameters to ensure consistent state dict loading |
| tensorrt_llm/_torch/auto_deploy/models/phi.py | New module patch to support Phi‑3/4 embedding modifications for torch.export compatibility |
| tensorrt_llm/_torch/auto_deploy/models/hf.py | Removed redundant context manager usage for state dict loading |
| tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py | Updated tensor data type for position_ids to use torch.long |
Comments suppressed due to low confidence (1)
tensorrt_llm/_torch/auto_deploy/transformations/export.py:296
- [nitpick] Using an assert for runtime checks may be disabled in optimized builds; consider raising a proper exception with a clear error message to handle missing parameter values in the state dict.
assert value is not None, (f"No valid value found in state dict for aliased parameters: {group}")
Signed-off-by: Lucas Liebenwein <[email protected]>
Signed-off-by: Lucas Liebenwein <[email protected]>
Signed-off-by: Suyog Gupta <[email protected]>
This was referenced May 22, 2025
lucaslie
added a commit
that referenced
this pull request
May 27, 2025
Includes #17 , #18, #21 , #23 * move Phi PR for sprint Signed-off-by: Ubuntu <[email protected]> * remove Phi3 patch and unfuse_weight transformation Signed-off-by: Ubuntu <[email protected]> * update Phi3/4 patches Signed-off-by: Ubuntu <[email protected]> * minor Signed-off-by: Ubuntu <[email protected]> * minor Signed-off-by: Ubuntu <[email protected]> * Update the position id to int64 Signed-off-by: Chenghao Zhang <[email protected]> * Add support for handling aliased parameters Signed-off-by: Suyog Gupta <[email protected]> * update tests Signed-off-by: Suyog Gupta <[email protected]> * lint Signed-off-by: Suyog Gupta <[email protected]> * lint Signed-off-by: Suyog Gupta <[email protected]> * removed load state dict with assign context manager Signed-off-by: Suguna Velury <[email protected]> * formatting fix Signed-off-by: Suguna Velury <[email protected]> * Removed related unit tests Signed-off-by: Suguna Velury <[email protected]> * [AutoDeploy] correctly identifying how to load HF checkpoint weights Signed-off-by: Lucas Liebenwein <[email protected]> * [AutoDeploy] correctly load sharded weights Signed-off-by: Lucas Liebenwein <[email protected]> * skip sharding if num_users>1 Signed-off-by: Suyog Gupta <[email protected]> --------- Signed-off-by: Ubuntu <[email protected]> Signed-off-by: Chenghao Zhang <[email protected]> Signed-off-by: Suyog Gupta <[email protected]> Signed-off-by: Suguna Velury <[email protected]> Signed-off-by: Lucas Liebenwein <[email protected]> Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Chenghao Zhang <[email protected]> Co-authored-by: Suguna Velury <[email protected]> Co-authored-by: Lucas Liebenwein <[email protected]> Signed-off-by: Lucas Liebenwein <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Includes #17 , #18, #21 , #23