Skip to content

Commit 840debf

Browse files
committed
fix ci
Signed-off-by: Zhiyu Cheng <zhiyuc@nvidia.com>
1 parent 623fc09 commit 840debf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

modelopt/torch/export/model_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ def get_language_model_from_vl(model) -> list[nn.Module] | None:
148148
return [model, model.language_model]
149149

150150
# Pattern 3: For encoder-decoder VL models (e.g., Nemotron-Parse), the decoder is the language model.
151-
# Note: This is safe because this function is only called when the model is already detected as a VLM.
152-
# Non-VLM encoder-decoder models (T5, Bart) won't reach this code path.
153-
if hasattr(model, "decoder"):
151+
# Only match if the model is detected as multimodal to avoid matching non-VLM encoder-decoder
152+
# models like T5, Bart, Whisper which also have .decoder.
153+
if hasattr(model, "decoder") and is_multimodal_model(model):
154154
return [model, model.decoder]
155155

156156
# Pattern 4: No language_model found

0 commit comments

Comments
 (0)