TensorRT-LLM icon indicating copy to clipboard operation
TensorRT-LLM copied to clipboard

[TRTLLM-5273]feat/Use full attention mask if Llama3 is used as encoder and fix EarlyStopDecoder unsqueeze bug

Open nvrohanv opened this issue 7 months ago • 13 comments

[TRTLLM-5273]feat/Use full attention mask if Llama3 is used as encoder and fix EarlyStopDecoder unsqueeze bug

Description

This PR adds in a flag for bidirectional_attention to modeling_llama.py. This is to support some customer use-cases for llama-based embedding models, see Jira TRTLLM-5273 for more details.

Additionally it fixes a bug in EarlyStopDecoder where 1d logits were being unsqueezed incorrectly, leading to incompatibility with LogitsStorage.

Lastly it hardcodes LlamaForTextEmbedding as a non-generation model for now so that the customer can make their own out-of-tree example with their custom model and still leverage EarlyStopDecoder. I am in discussions with Erin Ho and Freddy Qi about how we can eliminate the need to hardcode this in the future.

Things To Review

  1. Should this bidirectional attention be supported via flag like the current implementation or should it be a separate class?

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.

nvrohanv avatar May 14 '25 06:05 nvrohanv

/bot run

nvrohanv avatar May 15 '25 06:05 nvrohanv

PR_Github #5279 [ run ] triggered by Bot

tensorrt-cicd avatar May 15 '25 06:05 tensorrt-cicd

PR_Github #5279 [ run ] completed with state FAILURE /LLM/main/L0_MergeRequest_PR pipeline #3857 completed with status: 'FAILURE'

tensorrt-cicd avatar May 15 '25 08:05 tensorrt-cicd

/bot run

nvrohanv avatar May 15 '25 15:05 nvrohanv

PR_Github #5363 [ run ] triggered by Bot

tensorrt-cicd avatar May 15 '25 15:05 tensorrt-cicd

PR_Github #5363 [ run ] completed with state SUCCESS /LLM/main/L0_MergeRequest_PR pipeline #3916 completed with status: 'FAILURE'

tensorrt-cicd avatar May 15 '25 17:05 tensorrt-cicd

/bot run --disable-fail-fast

nvrohanv avatar May 16 '25 23:05 nvrohanv

/bot run --disable-fail-fast

nvrohanv avatar May 17 '25 05:05 nvrohanv

PR_Github #5560 [ run ] triggered by Bot

tensorrt-cicd avatar May 17 '25 05:05 tensorrt-cicd

PR_Github #5560 [ run ] completed with state SUCCESS /LLM/main/L0_MergeRequest_PR pipeline #4057 completed with status: 'FAILURE'

tensorrt-cicd avatar May 17 '25 09:05 tensorrt-cicd

/bot run --disable-fail-fast

nvrohanv avatar May 17 '25 15:05 nvrohanv

PR_Github #5577 [ run ] triggered by Bot

tensorrt-cicd avatar May 17 '25 15:05 tensorrt-cicd

PR_Github #5577 [ run ] completed with state SUCCESS /LLM/main/L0_MergeRequest_PR pipeline #4067 completed with status: 'FAILURE'

tensorrt-cicd avatar May 17 '25 21:05 tensorrt-cicd

/bot run --disable-fail-fast

nvrohanv avatar May 19 '25 00:05 nvrohanv

PR_Github #5638 [ run ] triggered by Bot

tensorrt-cicd avatar May 19 '25 00:05 tensorrt-cicd

PR_Github #5638 [ run ] completed with state FAILURE /LLM/main/L0_MergeRequest_PR pipeline #4120 completed with status: 'FAILURE'

tensorrt-cicd avatar May 19 '25 03:05 tensorrt-cicd

/bot run --disable-fail-fast

nvrohanv avatar May 19 '25 20:05 nvrohanv

PR_Github #5771 [ run ] triggered by Bot

tensorrt-cicd avatar May 19 '25 20:05 tensorrt-cicd

PR_Github #5771 [ run ] completed with state SUCCESS /LLM/main/L0_MergeRequest_PR pipeline #4225 completed with status: 'SUCCESS'

tensorrt-cicd avatar May 20 '25 00:05 tensorrt-cicd

LGTM

qixiang-99 avatar May 20 '25 00:05 qixiang-99