Skip to content

[BUG] Checkpoint resume fails with "checkpoint tensor schema differs" for any model whose quantized layers have a non-fp16 bias (Qwen2/2.5, OPT, Bloom…) #4324

Closed

Description

@Qubitium

Severity: medium: resume is unusable on models with biased projections. Status: confirmed on an RTX 4090. Kind: not a regression; it fails the same way at 9dad249.

Where

  • gptqmodel/looper/checkpoint_modules.py:115 (restore_packed_module) rebuilds the module with an fp16 bias and does not record the bias dtype.
  • gptqmodel/looper/gptq_checkpoint.py:568-582 then compares module.state_dict() dtypes against the bundle.

Repro

  1. On Qwen2.5-0.5B-Instruct (bf16), run model.quantize(calib, checkpoint=CheckpointConfig(path=CK)).
  2. Stop it after layer 1 with SIGINT from layer_callback.
  3. Run the same call again to resume.

Actual: CheckpointError: checkpoint tensor schema differs: model.layers.0.self_attn.q_proj.

  • With instrumentation, the expected bias dtype is torch.float16 while the bundle has BF16.
  • All other keys match.

Expected: resume works. As a control, TinyLlama (no bias) with format=gptq_v2 resumes bit-identically (0/663 tensors differ).

Note: CheckpointConfig currently only supports llama, qwen2 and qwen3_moe, so on qwen2 this blocks one of the three supported families entirely.


Found during an AI-assisted review (Claude Code, round 11) of 842d666; repros were run at that commit on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.

Activity

  1. added
    bug
    on Nov 16, 2026
  2. Qubitium commented on Nov 16, 2026

    @Qubitium
    CollaboratorAuthor

    Taking this. I'll investigate against current main, add a targeted regression test, and open a PR. Will report back here if the claim turns out to be invalid or already fixed.

  3. self-assigned this
    on Nov 16, 2026
  4. Qubitium commented on Nov 16, 2026

    @Qubitium
    CollaboratorAuthor

    Fixed in #4362 — the checkpoint now records and restores the bias dtype, so bf16/fp32 bias bundles no longer fail the resume schema check.

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions