You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Passing a Mapping as the calibration dataset (BatchEncoding, dict of columns, DatasetDict) calibrates on the key names #4193
Severity: low–medium (silent wrong data, or a misleading error) Version: 7.11.0 @ 9dad249
Summary
utils/calibration.py:158-168 rejects only str. The else: list(calibration_dataset) branch turns a Mapping into its keys:
model.quantize(tokenizer(texts)) calibrates on the strings "input_ids" and "attention_mask".
load_dataset(...) without split= calibrates on "train", "validation" and "test".
With the default calibration_data_min_length=10, every row is then dropped and quantize raises "every input_ids was shorter than calibration_data_min_length", which points away from the real problem. Qwen3-VL's override (base_qwen3_vl.py:560) already rejects Mappings; the base path doesn't.
Raise a clear ValueError for a Mapping / DatasetDict (suggest split=), or unpack a columnar BatchEncoding into rows.
Found during an AI-assisted review (Claude Code) of 9dad249; repros were run on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Activity
fix(calibration): unpack columnar mappings instead of calibrating on …
fix(calibration): unpack columnar mappings instead of calibrating on …