convert : identify missing model files#9397
Merged
ggerganov merged 1 commit intoggml-org:masterfrom Sep 16, 2024
Merged
Conversation
ggerganov
approved these changes
Sep 10, 2024
|
Thanks, it should, I will test it out. Do you think the script should also validate the part sequence number for continuity, even if an index file is missing? For instance, should it throw an error or exit if seq != prev_seq + 1? |
dsx1986
pushed a commit
to dsx1986/llama.cpp
that referenced
this pull request
Oct 29, 2024
arthw
pushed a commit
to arthw/llama.cpp
that referenced
this pull request
Nov 15, 2024
arthw
pushed a commit
to arthw/llama.cpp
that referenced
this pull request
Nov 18, 2024
Nexesenex
pushed a commit
to Nexesenex/croco.cpp
that referenced
this pull request
Feb 25, 2025
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Should fix #9245.
Previously, when models files (like
model-00002-of-00002.safetensors) were missing, a cryptic error message was output, but not when only one model file was left.convert_hf_to_gguf.pynow reads the appropriate(model.safetensors|pytorch_model.bin).index.jsonwhen it exists instead of only when there are more than one model file.I've also made the error message easier to understand by making it include a list of missing tensor files instead of the missing tensor names, when that information can be obtained from the index files.
This can be tested with
python3 convert_hf_to_gguf.py --dry-run /path/to/model_dirby renaming the model files of multi-part models so that at least one of them doesn't matchmodel*.safetensorsorpytorch_model*.bin.From my testing this seems to work correctly, and should proceed with conversion as before when all the tensors are present or if the index file is missing.
@mesibo Does this help with the problem you've noticed?