Files
LeonandClaude Opus 5.5 0f200e3728 [Bugfix][Loader] Fail fast on incomplete local sharded safetensors checkpoints (#1356)
Before loading, check that a sharded safetensors checkpoint is complete
and raise FileNotFoundError naming the missing files:

- with a checkpoint index, every file its weight_map names must exist
  (skipped when a model's own allow patterns load a deliberate subset);
- without an index, every <stem>-NNNNN-of-MMMMM.safetensors family among
  the selected files must have all MMMMM members.

Files matching the load config's ignore patterns may be absent. Only file
names and the index are read, no tensor data. Non-numbered names, single
files and shards the index reuses for many tensors are unaffected, and
the existing index-selection and quantized coverage checks stay as they
are. A shard the index names but which is missing now fails here with
FileNotFoundError instead of the later "would not be loaded" error.

Ported by hand from the fix proposed in vllm-project/vllm#63472 (shard
check only).

Signed-off-by: Leonccaa <166551845+Leonccaa@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 21:29:57 +08:00
..