Skip to content

Allow non-MLLM calibration datasets when not quantizing vision - #2065

Open
aquilarubra wants to merge 2 commits into
intel:mainfrom
aquilarubra:pr/mllm-dataset-fix
Open

Allow non-MLLM calibration datasets when not quantizing vision#2065
aquilarubra wants to merge 2 commits into
intel:mainfrom
aquilarubra:pr/mllm-dataset-fix

Conversation

@aquilarubra

Copy link
Copy Markdown
Collaborator

Summary

Standalone fix, no dependency on the other PRs in this stack.

MLLMCalibrator unconditionally routes to get_mllm_dataloader whenever the model is multimodal, which KeyErrors on any dataset not in its MLLM_DATASET registry (its own os.path.isfile(dataset) or dataset in MLLM_DATASET guard still indexes MLLM_DATASET with the raw file path). But a local text dataset (file/dir/HF text set) is perfectly valid calibration for a VLM whose non-text modules are not being quantized (quant_nontext_module=False): the full-model forward runs text-only, and the loop's generic-dict branch already just feeds model(**batch) regardless of dataset shape.

Change

When quant_nontext_module is False and the dataset isn't a known MLLM_DATASET entry, use the standard text get_dataloader() instead of falling through to get_mllm_dataloader.

@aquilarubra
aquilarubra force-pushed the pr/mllm-dataset-fix branch 2 times, most recently from 589feba to 123b0e7 Compare July 19, 2026 14:31
@aquilarubra

Copy link
Copy Markdown
Collaborator Author

/azp run Performance-Test-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 2065 in repo intel/auto-round

@chensuyue
chensuyue requested a review from n1ck-guo July 20, 2026 02:11
@aquilarubra
aquilarubra force-pushed the pr/mllm-dataset-fix branch 3 times, most recently from 786af9c to 18ccb50 Compare July 27, 2026 09:25
@aquilarubra

Copy link
Copy Markdown
Collaborator Author

Heads-up on the Performance-Test-AutoRound (Qwen3_FP8_STATIC) check on this PR — it's failed twice on retrigger, but on opposite sides each time:

  • Run 1: Current = 22.83GB, Baseline = 20.51GB (+11.31%) → FAIL
  • Run 2: Current = 20.55GB, Baseline = 23.58GB (-12.85%) → FAIL

The baseline number itself swings ~15% between runs of the identical job, and the sign of the "regression" flips. This PR only touches calibration/mllm.py (routing text-only datasets for non-vision calibration), which has no code path anywhere near FP8_STATIC quantization memory usage, so I don't think this reflects a real change from this diff — looks like VRAM measurement noise on the runner (possibly contention with other concurrent jobs) combined with a tolerance that's too tight to absorb it. Flagging in case it's useful for tightening up the perf-check baseline/tolerance.

@aquilarubra

Copy link
Copy Markdown
Collaborator Author

Rebased onto current main. This PR only touches calibration/mllm.py and is independent of the disk-streaming/resumability stack, so the rebase was clean with no conflicts. Force-pushed to this branch.

Comment thread auto_round/calibration/mllm.py
@wenhuach21

Copy link
Copy Markdown
Contributor

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@wenhuach21 wenhuach21 added this to the 0.16.0 milestone Sep 3, 2026
@wenhuach21

Copy link
Copy Markdown
Contributor

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants