Skip to content

Conversation

@brb-nv
Copy link
Collaborator

@brb-nv brb-nv commented May 27, 2025

Description

BS > 1 fails on TRTLLM main for vision encoder of Mistral Small 3.1 24B. This MR fixes that and adds functionality to run BS>1 inference in multimodal_model_runner.py.

$ rm -rf mistral_mm_eng/ && python examples/models/core/multimodal/build_multimodal_engine.py --model_path /home/scratch.trt_llm_data/llm-models/Mistral-Small-3.1-24B-Instruct-2503/ --model_type pixtral --max_batch_size 8 --output_dir mistral_mm_eng/vision/
$ rm -rf mistral_mm_llm_ckpt/ && python examples/models/core/llama/convert_checkpoint.py --model_dir /home/scratch.trt_llm_data/llm-models/Mistral-Small-3.1-24B-Instruct-2503/ --output_dir mistral_mm_llm_ckpt/ --dtype bfloat16
$ rm -rf mistral_mm_eng/llm/ && trtllm-build --checkpoint_dir mistral_mm_llm_ckpt/ --output_dir mistral_mm_eng/llm/ --max_batch_size 8 --max_input_len 131072 --max_seq_len 131072 --max_multimodal_len $((131072 * 8)) --use_paged_context_fmha enable
$ python examples/models/core/multimodal/run.py --hf_model_dir /home/scratch.trt_llm_data/llm-models/Mistral-Small-3.1-24B-Instruct-2503/ --engine_dir mistral_mm_eng/ --visual_engine_name model.engine --batch_size 4 --enable_chunked_context --max_new_tokens 512 --temperature 0 --top_p 1 --lora_task_uids -1 --session python

Test Coverage

$ pytest tests/integration/defs/examples/test_multimodal.py::test_llm_multimodal_general[Mistral-Small-3.1-24B-Instruct-2503-pp:1-tp:1-bfloat16-bs:8-cpp_e2e:False-nb:1] -s -v

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.

@brb-nv brb-nv requested a review from a team as a code owner May 27, 2025 22:49
@brb-nv
Copy link
Collaborator Author

brb-nv commented May 27, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #6675 [ run ] triggered by Bot

@brb-nv brb-nv force-pushed the user/brb/fix-mistral-small-vision-encoder-rel-0.20 branch from bdfd5c9 to 8e5dfb0 Compare May 28, 2025 01:27
@brb-nv
Copy link
Collaborator Author

brb-nv commented May 28, 2025

/bot run

@brb-nv brb-nv requested a review from amukkara May 28, 2025 01:30
@tensorrt-cicd
Copy link
Collaborator

PR_Github #6675 [ run ] completed with state SUCCESS
/LLM/release-0.20/L0_MergeRequest_PR pipeline #92 completed with status: 'FAILURE'

@tensorrt-cicd
Copy link
Collaborator

PR_Github #6684 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #6684 [ run ] completed with state SUCCESS
/LLM/release-0.20/L0_MergeRequest_PR pipeline #96 completed with status: 'SUCCESS'

@kaiyux kaiyux merged commit fc3c2f7 into NVIDIA:release/0.20 May 28, 2025
3 checks passed
shaharmor98 pushed a commit to shaharmor98/tekit that referenced this pull request May 28, 2025
omera-nv pushed a commit to omera-nv/TensorRT-LLM that referenced this pull request Jun 7, 2025
@brb-nv brb-nv deleted the user/brb/fix-mistral-small-vision-encoder-rel-0.20 branch July 11, 2025 23:26
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.

4 participants