From 48489e8400e3873d5be1ddb09f7ac058385957cb Mon Sep 17 00:00:00 2001 From: Chenjie Luo Date: Thu, 23 Apr 2026 09:06:59 -0700 Subject: [PATCH] fix: honor calib_seq in mllama VLM calibration path The mllama branch of make_calib_dataloader in hf_ptq.py was not passing max_length=args.calib_seq to get_vlm_dataset_dataloader, so mllama calibration silently ignored the --calib_seq flag. This matches the companion fix in #1311 for the LLM path. Signed-off-by: Chenjie Luo --- examples/llm_ptq/hf_ptq.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/llm_ptq/hf_ptq.py b/examples/llm_ptq/hf_ptq.py index 832d485e6b4..5558b824c17 100755 --- a/examples/llm_ptq/hf_ptq.py +++ b/examples/llm_ptq/hf_ptq.py @@ -262,6 +262,7 @@ def make_calib_dataloader( processor=processor, batch_size=args.batch_size, num_samples=args.calib_size[0], + max_length=args.calib_seq, ) elif model_type == "whisper": assert processor is not None and isinstance(processor, WhisperProcessor), (