Skip to content

Conversation

@brb-nv
Copy link
Collaborator

@brb-nv brb-nv commented May 23, 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 changed the title fix: Mistral Small VLM with BS>1 fix: Mistral Small vision encoder with BS>1 May 24, 2025
@brb-nv brb-nv force-pushed the user/brb/fix-mistral-small-vision-encoder branch from 66f38ea to 0b86a00 Compare May 24, 2025 01:29
@brb-nv brb-nv requested a review from amukkara May 24, 2025 01:30
@brb-nv
Copy link
Collaborator Author

brb-nv commented May 24, 2025

/bot run --disable-fail-fast

@brb-nv brb-nv requested a review from tijyojwad May 24, 2025 01:32
@tensorrt-cicd
Copy link
Collaborator

PR_Github #6343 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

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

@brb-nv brb-nv force-pushed the user/brb/fix-mistral-small-vision-encoder branch 2 times, most recently from c6ccf4e to d461882 Compare May 27, 2025 19:33
@brb-nv brb-nv force-pushed the user/brb/fix-mistral-small-vision-encoder branch from d461882 to 2d15a9b Compare May 27, 2025 19:34
@brb-nv
Copy link
Collaborator Author

brb-nv commented May 27, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #6668 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

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

@brb-nv
Copy link
Collaborator Author

brb-nv commented May 28, 2025

Closing this in favor of #4713.

I learnt that current process is to merge to release branch and let it be cherry-picked to main.

@brb-nv brb-nv closed this May 28, 2025
@brb-nv brb-nv deleted the user/brb/fix-mistral-small-vision-encoder 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.

3 participants