Skip to content

Feat/staging 05 21 - #25

Merged
lucaslie merged 16 commits into
feat/ad_coverage_week1from
feat/staging_05_21
May 22, 2025
Merged

lucaslie merged 16 commits into
feat/ad_coverage_week1from
feat/staging_05_21

Conversation

@suyoggupta

@suyoggupta suyoggupta commented May 22, 2025 •

Copy link
Copy Markdown

Includes #17 , #18, #21 , #23

Fridah-nv and others added 13 commits May 21, 2025 20:38
Signed-off-by: Ubuntu <[email protected]>
Signed-off-by: Ubuntu <[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]>
Copilot AI review requested due to automatic review settings May 22, 2025 03:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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}")

@lucaslie
lucaslie merged commit 16b57f6 into feat/ad_coverage_week1 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants