Skip to content

fix(writer): validate all selected checkpoint tensors - #3712

Merged
Qubitium merged 1 commit into
mainfrom
fix/writer-selector-missing-tensors
Nov 9, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/writer-selector-missing-tensors

Conversation

@Qubitium

@Qubitium Qubitium commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix out-of-model checkpoint selection so missing-index validation uses the same predicate as tensor loading. Prefix, suffix, and exact-name selectors now fail closed when their declared shard or tensor is unavailable.

Problem

_load_tensors_by_selectors loaded tensors selected by prefixes, suffixes, and exact names, but the missing-tensor validation checked only prefixes. A missing or unreadable suffix/exact-name shard could therefore produce an incomplete checkpoint without an error.

This is a localized fail-closed bug fix; no control-flow documentation page is required.

Validation

TMPDIR=/dev/shm PYTHONDONTWRITEBYTECODE=1 /root/venv/bin/python -m pytest tests/test_out_of_model_tensors.py -q -p no:cacheprovider
25 passed

ruff check gptqmodel/models/writer.py tests/test_out_of_model_tensors.py
All checks passed

The new matrix covers suffix and exact selectors against missing shards, unreadable shards, and absent declared tensors.

@Qubitium
Qubitium merged commit 0d8d074 into main Nov 9, 2026
5 checks passed
@Qubitium
Qubitium deleted the fix/writer-selector-missing-tensors branch November 9, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant