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] #6386 overwrites a checkpoint generation_config.pad_token_id with the tokenizer pad id (ovis + qwen3-marin red) #6402
Fresh sweep of main = 1615accf9 (2026-11-29). Regression introduced by #6386 (e8e73276a): green at 390a03229 (its parent), red at HEAD.
Root cause
BaseQModel.__init__ now unconditionally copies the tokenizer's pad id onto the loaded model's generation config (gptqmodel/models/base.py, block added by #6386):
This clobbers an explicit checkpoint generation_config.json. Two observed shapes:
Checkpoint pins a pad id.tests/test_ovis_local_port.py writes pad_token_id: 151643 for the clip-qwen2 policy; after GPTQModel.load() the loaded config reports 0 (assert 0 == 151643).
Checkpoint leaves it None. The marin fixture in tests/test_qwen3_local_port.py has generation_config.pad_token_id = None; after load it becomes 0, and greedy/beam generate() diverges from the source model (first differing token at index 10).
Only fill generation_config.pad_token_id when it is unset (None), or only for the tokenizer-less-checkpoint repair path (#6361). A checkpoint's explicit generation policy must survive a load.
Evidence
test_ovis_local_port.py::... — red at 1615accf9, passes at 390a03229.
test_qwen3_local_port.py::...[False-None-marin] / [True-1-marin] — red at 1615accf9, pass at 390a03229.
3 nodes total; deterministic (chunked xdist run + standalone rerun).
Activity
fix(models): stop rewriting a checkpoint's generation pad id on load (M…
fix(loader): keep a checkpoint's generation pad id when quantize_conf…