Skip to content

[TEST] norm_requant save/reload test still passes the pre-#6473 turtle shape to the module-replacement writer #6545

Done

Description

@Qubitium

Summary

tests/test_norm_requant.py::test_packed_rmsnorm_tuning_save_reload_preserves_quantized_tensors fails on origin/main (c649fcb):

ValueError: Module replacement save requires a checkpoint source.

Cause (stale test)

#6473 changed gptqmodel.models.writer._save_module_replacement_safetensors to read the source checkpoint through a CheckpointSource (root, weight_map). The test still hand-builds the pre-#6473 turtle shape SimpleNamespace(model_local_path=..., _weight_map=...), so the writer's guard rejects it. The public caller (save_quantized_embeddings) passes the real checkpoint_source, so the product path is correct.

Fix

Build the source with CheckpointSource.from_checkpoint(model_local_path=<dir>, config=None) in the test. The rest of the test is unchanged (norm tuned, packed tensors preserved bit-exactly, reload round trip): 19/19 pass.

Activity

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