Can a slightly modified multimodal model achieve inference through the tensorrt llm pipeline? #1703
Replies: 1 comment
-
|
Short answer: yes, but only in a “composable pipeline” sense — not as a fully automatic TensorRT-LLM conversion. TensorRT-LLM can only directly handle the decoder-only LLM part (Llama / GPT-style transformer). Everything around it (vision tower, projector, custom forward logic) is not automatically supported unless you explicitly wrap/convert it yourself. 1. Do you still need to pad 32000 → 32064 for Llama 3?No — that step was specific to LLaMA 2 + certain LLaVA HF conversions. For LLaMA 3:
If you force LLaMA 2-style padding on LLaMA 3, you can actually break:
So: skip padding unless a specific converter explicitly requires it (very unlikely for LLaMA 3). 2. Can your modified multimodal model run fully through TensorRT-LLM?Key point:TensorRT-LLM is not a full multimodal framework It only accelerates:
It does NOT natively support:
3. What is the correct architecture pattern?Your described stack: The supported way is:✔ Option A (recommended): Hybrid pipelineRun components separately: TensorRT-LLM only replaces the Llama3 forward pass + decoding loop ✔ Option B: Fully custom orchestration (advanced)You can:
But YOU must implement:
TensorRT-LLM will NOT automatically chain them. 4. Your “modified mm_projector with conv ops”This is the key limitation:
So your design choice becomes:
5. Practical recommendationFor fastest success:
Then optimize later if needed. Bottom line
If this answer helped or pointed you in the right direction, I'd appreciate it if you could mark it as the accepted answer so it's easier for others with the same issue to find. Also, if you found my contribution useful, I'd appreciate it if you could check out my GitHub profile, follow me, and star any repositories you find interesting. GitHub: https://github.com/Advait251206 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried replacing the llm of the llava model with llama3, and now I want to try using tensorrt llm to complete the entire inference. I have a few questions that I don't quite understand and would like to ask for advice:
Beta Was this translation helpful? Give feedback.
All reactions