Skip to content

Commit 4b6b388

Browse files
committed
update
Signed-off-by: Zhiyu Cheng <[email protected]>
1 parent a11b8bc commit 4b6b388

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

examples/llm_ptq/hf_ptq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ def main(args):
211211
random.seed(RAND_SEED)
212212
np.random.seed(RAND_SEED)
213213

214-
# Detect if this is a Nemotron VL model
215-
is_nemotron_vl = "nemotron" in args.pyt_ckpt_path.lower() and "vl" in args.pyt_ckpt_path.lower()
216-
217214
# launch a memory monitor to read the currently used GPU memory.
218215
launch_memory_monitor()
219216

@@ -288,6 +285,9 @@ def main(args):
288285

289286
full_model = model
290287

288+
# Detect if this is a Nemotron VL model using model-based detection
289+
is_nemotron_vl = is_multimodal_model(full_model) and "nemotron" in args.pyt_ckpt_path.lower()
290+
291291
if model_type == "mllama":
292292
processor = get_processor(
293293
args.pyt_ckpt_path,

modelopt/torch/export/unified_export_hf.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ def _output_hook(module, input, output):
150150
fake_input = torch.ones(
151151
[1, model.config.num_mel_bins, feature_extractor.nb_max_frames], dtype=model.dtype
152152
).to(model.device)
153-
elif is_vl_model:
154-
# For VL models, run optimization on language model component only
155-
print("Detected VL model during export - optimizing language model component")
156153

157154
# Run forward pass so that all modules sharing the same input are collected using forward hook.
158155

0 commit comments

Comments
 (0)