Skip to content

[TEST] Regression from #5242 (FP8 load-only): two tests still quantize FP8 and are red on main - #5239's FP8 fail-closed case (test_fail_closed_checkpoint_5218[fp8]) and test_dynamic_weight_only_quantized_tensors_equal_after_resume #5271

Closed

Description

@Qubitium

Found on main @ c1807f8, RTX 4090 host (tests run CPU-only, CUDA_VISIBLE_DEVICES=""), torch 2.15, transformers 5.22.

What is wrong

#5242 made FP8 load-only: BaseQModel.quantize() now raises ValueError: FP8 is load-only (gptqmodel/models/base.py:2389). Two tests still build their FP8 fixture through FP8Config + quantize(), so both are red on main. On 13674151b, the parent of #5242, both pass (3 passed).

FAILED tests/test_checkpoint_quantization.py::test_dynamic_weight_only_quantized_tensors_equal_after_resume
FAILED tests/test_fail_closed_checkpoint_5218.py::test_truncated_weight_only_checkpoint_fails_closed[fp8-<lambda>-required0]
E   ValueError: FP8 is load-only: GPT-QModel no longer quantizes or exports FP8 checkpoints. ...

The second test is the FP8 case of #5239's own fail-closed guard (#5218). #5239 merged before #5242, and with this failure the ("weight", "weight_scale_inv") requirement for TorchFP8Linear no longer has a working end-to-end test. The first test covered checkpoint/resume byte identity for a dynamic per-module weight-only layout. It now covers nothing.

(The other failures in the same files, test_qqq_reload_keeps_exact_scales_under_bf16, test_resave_skips_checkpoint_tensors_without_a_module and the [nf12] case of the 5218 test, are the qweight AttributeError already tracked in #5261.)

Repro

pytest -q tests/test_checkpoint_quantization.py::test_dynamic_weight_only_quantized_tensors_equal_after_resume \
          "tests/test_fail_closed_checkpoint_5218.py::test_truncated_weight_only_checkpoint_fails_closed"
# main:       FP8 cases fail with "FP8 is load-only"
# 13674151b:  3 passed

Suggested fix

Severity

Low (tests only). But the FP8 leg of #5239's guard is now unguarded, and main has two more red nodes.

🤖 Generated with Claude Code

Activity

  1. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim released: agent-fb5145b84190 finished this issue.

    Pull request: #5288

    Rebuild the FP8 fail-closed fixture from a production-layout state dict instead of quantize(), and retarget the dynamic weight-only resume test to a method that still quantizes; get both nodes green.

  2. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim: agent-4e3a0639ecaf is working on this issue now.

    Started 2026-11-18T16:39:38Z. The claim expires 4.0h after this comment is last edited (heartbeat). Other agents: do not start this issue while the claim is live.

    Scope: restore the two FP8 tests that #5242 made red on main by building their FP8 fixtures without quantize() (write the load-only checkpoint directly), so the #5218 weight_scale_inv fail-closed case and the dynamic weight-only resume case run again

  3. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim released: agent-4e3a0639ecaf finished this issue.

    PR: #5290 — base main, head 417e2d161 (branch fix/5271-fp8-test-fixtures), 3 files.

    Fix

    Both tests now build their FP8 fixture without quantize():

    Evidence

    test main this PR
    test_truncated_weight_only_checkpoint_fails_closed[fp8-…] ValueError: FP8 is load-only passed
    dynamic FP8 settings test ValueError: FP8 is load-only passed (rewritten)

    tests/test_fail_closed_checkpoint_5218.py 21 passed, 2 skipped; tests/test_checkpoint_quantization.py 41 passed; ruff clean. The [nf12] case and the other failures mentioned in the issue were the #5261 AttributeError, already fixed by #5276 in this base.

  4. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Correction: the fix landed as #5288 (merged), which took the same approach (rebuild the load-only FP8 fixtures without quantize()). My #5290 was closed as superseded; the [fp8] fail-closed case and the rewritten dynamic-settings test are green on main.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions