Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/models/core/multimodal/requirements-qwen2vl.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
accelerate
qwen-vl-utils==0.0.8 # 0.0.9 has bug https://github.com/QwenLM/Qwen2-VL/pull/673, rollback until a newer version is released
transformers==4.51.0 # nvbugs/5385987
12 changes: 10 additions & 2 deletions tensorrt_llm/tools/multimodal_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,7 @@ def rot_pos_emb(grid_thw, rotary_pos_emb_func):


def build_qwen2_vl_engine(args):
import transformers
from qwen_vl_utils import process_vision_info
from transformers import AutoProcessor, Qwen2VLForConditionalGeneration
from transformers.models.qwen2_vl.configuration_qwen2_vl import \
Expand Down Expand Up @@ -1391,8 +1392,15 @@ def build_qwen2_vl_engine(args):
class VisionAttentionOpt(VisionAttention):

def __init__(self, config: Qwen2VLVisionConfig):
super().__init__(config)
self.head_dim = config.embed_dim // config.num_heads
# Fallback for compatibility with older transformers versions (for certain nvbugs/tests)
if transformers.__version__ >= '4.53.0':
super().__init__(config)
self.head_dim = config.embed_dim // config.num_heads
else:
num_heads = config.num_heads
dim = config.embed_dim
super().__init__(dim, num_heads)
self.head_dim = dim // num_heads

def forward(self,
hidden_states: torch.Tensor,
Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_lists/waives.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ stress_test/stress_test.py::test_run_stress_test[llama-v3-8b-instruct-hf_tp1-str
accuracy/test_llm_api_pytorch.py::TestGemma3_1BInstruct::test_auto_dtype SKIP (https://nvbugs/5375620)
test_e2e.py::test_ptp_quickstart_advanced_8gpus[Llama3.1-405B-FP8-llama-3.1-model/Llama-3.1-405B-Instruct-FP8] SKIP (https://nvbugs/5380570)
test_e2e.py::test_ptp_quickstart_advanced_8gpus[Nemotron-Ultra-253B-nemotron-nas/Llama-3_1-Nemotron-Ultra-253B-v1] SKIP (https://nvbugs/5380570)
examples/test_multimodal.py::test_llm_fp8_multimodal_general[fp8-fp8-cnn_dailymail-Qwen2-VL-7B-Instruct-pp:1-tp:1-bfloat16-bs:1-cpp_e2e:False] SKIP (https://nvbugs/5385987)
examples/test_multimodal.py::test_llm_multimodal_general[Phi-4-multimodal-instruct-pp:1-tp:1-float16-bs:1-cpp_e2e:False-nb:1] SKIP (https://nvbugs/5385992)
examples/test_multimodal.py::test_llm_multimodal_general[kosmos-2-pp:1-tp:1-float16-bs:1-cpp_e2e:False-nb:1] SKIP (https://nvbugs/5387422)
examples/test_multimodal.py::test_llm_multimodal_general[fuyu-8b-pp:1-tp:1-float16-bs:1-cpp_e2e:False-nb:1] SKIP (https://nvbugs/5387424)
Expand Down