[Model Requests] Support Qwen2.5-VL Architecture
I would like to request support for the Qwen2.5-VL architecture in TensorRT-LLM.
When I try to convert the model to an LLM checkpoint and build the engine, I encounter the following error:
Traceback (most recent call last): File "/usr/local/bin/trtllm-build", line 8, in <module> sys.exit(main()) ^^^^^^ File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/commands/build.py", line 517, in main model_config = PretrainedConfig.from_json_file(config_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/models/modeling_utils.py", line 434, in from_json_file obj = cls.from_dict(config) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/models/modeling_utils.py", line 416, in from_dict model_cls = MODEL_MAP[config['architecture']] ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'Qwen2_5_VLForConditionalGeneration'
It seems that Qwen2.5-VL is not yet included in the MODEL_MAP within TensorRT-LLM. Since Qwen2 VL models are already supported, adding Qwen2.5-VL would be a valuable extension, particularly for multimodal tasks (text + image understanding).
Request: Could you provide insights on whether there are plans to support this architecture in future releases?
Thanks!
I also request this support. Adding 'Qwen2_5_VLForConditionalGeneration': QWenForCausalLM in MODEL_MAP didn't work.
'Qwen2_5_VLForConditionalGeneration': QWenForCausalLM,
https://github.com/NVIDIA/TensorRT-LLM/blob/258c7540c03517def55d9a5aadfa9288af474e1b/tensorrt_llm/models/init.py#L179
[TensorRT-LLM] TensorRT-LLM version: 0.17.0
~~~ omit ~~~
[03/03/2025-04:54:10] [TRT-LLM] [I] Set nccl_plugin to None.
Traceback (most recent call last):
File "/usr/local/bin/trtllm-build", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/commands/build.py", line 621, in main
parallel_build(model_config, ckpt_dir, build_config, args.output_dir,
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/commands/build.py", line 419, in parallel_build
passed = build_and_save(rank, rank % workers, ckpt_dir,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/commands/build.py", line 384, in build_and_save
engine = build_model(build_config,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/commands/build.py", line 377, in build_model
return build(model, build_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/builder.py", line 1257, in build
model(**inputs)
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/module.py", line 52, in __call__
output = self.forward(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/models/modeling_utils.py", line 1004, in forward
hidden_states = self.transformer.forward(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/models/qwen/model.py", line 196, in forward
hidden_states = self.layers.forward(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/models/modeling_utils.py", line 549, in forward
hidden_states = layer(
^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/module.py", line 52, in __call__
output = self.forward(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/models/qwen/model.py", line 127, in forward
attention_output = self.attention(
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/module.py", line 52, in __call__
output = self.forward(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/layers/attention.py", line 1033, in forward
context, past_key_value = gpt_attention(
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/graph_rewriting.py", line 567, in wrapper
outs = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/functional.py", line 5132, in gpt_attention
assert (mrope_rotary_cos_sin
^^^^^^^^^^^^^^^^^^^^^
AssertionError
How is it going?Is there any plan to support Qwen2.5-VL?
Same problem here
same problem here
same problem here
same problem here
This model has been around for months, why haven't they added any support or at least some kind of response like we're working on it(
Any updates here?
Apologies for the delayed response. The Qwen2.5 VL model is supported by the PyTorch backend and can be found in the Multimodal Feature Support Matrix (PyTorch Backend).