-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[feat] [AutoDeploy] Llama-4 Support #4163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 adds support for Llama-4 within AutoDeploy by introducing a new BMM sharding transformation, updating model factory configurations, and refining related logging and flashinfer attention buffer sizes. Key changes include:
- Introducing the bmm_shard transformation and its associated unit tests.
- Updating logging levels in node_utils and modifying model factory values in several modules.
- Adjusting input processing in the demo interface and updating configuration defaults for examples.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/unittest/_torch/auto_deploy/unit/multigpu/transformations/library/test_bmm_sharding.py | New unit tests for the BMM sharding transformation. |
tensorrt_llm/_torch/auto_deploy/utils/node_utils.py | Downgraded logging of residual node warnings from warning to debug. |
tensorrt_llm/_torch/auto_deploy/transformations/transform.py | Added call to bmm_shard as part of the transformation pipeline. |
tensorrt_llm/_torch/auto_deploy/transformations/library/sharding.py | Introduced the bmm_shard function for sharding batched matrix multiplications. |
tensorrt_llm/_torch/auto_deploy/shim/interface.py | Updated default model_factory parameter for AutoDeployConfig. |
tensorrt_llm/_torch/auto_deploy/shim/demollm.py | Changed call to create_input_processor to pass None instead of model. |
tensorrt_llm/_torch/auto_deploy/models/hf.py | Modified factory registration and heuristics for disabling use_cache. |
tensorrt_llm/_torch/auto_deploy/custom_ops/flashinfer_attention.py | Increased workspace buffer allocation from 128MB to 320MB with updated notes. |
examples/auto_deploy/simple_config.py, .vscode/settings.json, .vscode/launch.json | Updated configuration defaults and VSCode settings for the new changes. |
Comments suppressed due to low confidence (3)
tests/unittest/_torch/auto_deploy/unit/multigpu/transformations/library/test_bmm_sharding.py:68
- Consider adding tests for the scenario where the BMM batch size is not evenly divisible by world_size to ensure the transformation correctly handles uneven distributions.
run_test(
tensorrt_llm/_torch/auto_deploy/utils/node_utils.py:297
- [nitpick] Verify that downgrading the log level from warning to debug does not mask potentially critical issues when residual nodes have more than two users.
ad_logger.debug(f"Unexpected # of users for residuals: {res_nodes_more_users}")
tensorrt_llm/_torch/auto_deploy/shim/demollm.py:375
- [nitpick] Confirm that 'create_input_processor' gracefully handles a None value for the model parameter; if not, consider adding explicit handling or documentation for this case.
self.input_processor = create_input_processor(None, self.tokenizer)
tensorrt_llm/_torch/auto_deploy/transformations/library/sharding.py
Outdated
Show resolved
Hide resolved
|
||
assert isinstance(gm, GraphModule), "Expecting GraphModule" | ||
|
||
def handle_tensor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meenchen, here is an example of bmm sharding where either tensor can be a weight or activation tensor
TODO: only claim |
23401ac
to
b4306e0
Compare
/bot run --disable-fail-fast --extra-stage "DGX_H100-4_GPUs-PyTorch-[Post-Merge]" |
PR_Github #5199 [ run ] triggered by Bot |
PR_Github #5199 [ run ] completed with state |
/bot run --disable-fail-fast --extra-stage "DGX_H100-4_GPUs-PyTorch-[Post-Merge]" |
PR_Github #5242 [ run ] triggered by Bot |
PR_Github #5242 [ run ] completed with state |
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
will be merged via https://github.com/nv-auto-deploy/TensorRT-LLM/pull/32 |
Description
GitHub Bot Help
/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...
Provide a user friendly way for developers to interact with a Jenkins server.
Run
/bot [-h|--help]
to print this help message.See details below for each supported subcommand.
run [--disable-fail-fast --skip-test --stage-list "A10-1, xxx" --gpu-type "A30, H100_PCIe" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-[Post-Merge]-1, xxx"]
Launch build/test pipelines. All previously running jobs will be killed.
--disable-fail-fast
(OPTIONAL) : Disable fail fast on build/tests/infra failures.--skip-test
(OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.--stage-list "A10-1, xxx"
(OPTIONAL) : Only run the specified test stages. Examples: "A10-1, xxx". Note: Does NOT update GitHub check status.--gpu-type "A30, H100_PCIe"
(OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.--only-multi-gpu-test
(OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.--disable-multi-gpu-test
(OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.--add-multi-gpu-test
(OPTIONAL) : Force run the multi-GPU tests. Will also run L0 pre-merge pipeline.--post-merge
(OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.--extra-stage "H100_PCIe-[Post-Merge]-1, xxx"
(OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-[Post-Merge]-1, xxx".kill
kill
Kill all running builds associated with pull request.
skip
skip --comment COMMENT
Skip testing for latest commit on pull request.
--comment "Reason for skipping build/test"
is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.reuse-pipeline
reuse-pipeline
Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.