Skip to content

Conversation

@CISC
Copy link
Collaborator

@CISC CISC commented Nov 15, 2025

Use all file parts in safetensors index, even if they are not named model*.safetensors. Still requires some of the files to be named that for detection to work (due to consolidated.safetensors).

Fixes #16361

@github-actions github-actions bot added the python python script changes label Nov 15, 2025
@CISC CISC requested a review from ngxson November 15, 2025 13:04
@ngxson
Copy link
Collaborator

ngxson commented Nov 15, 2025

Still requires some of the files to be named that for detection to work (due to consolidated.safetensors).

Not quite sure if I understand this phrase, but for Mistral, we either use model-*.safetensors OR consolidated.safetensors; If all 2 types are being used, it will result in duplicated tensors

@CISC
Copy link
Collaborator Author

CISC commented Nov 15, 2025

Still requires some of the files to be named that for detection to work (due to consolidated.safetensors).

Not quite sure if I understand this phrase, but for Mistral, we either use model-*.safetensors OR consolidated.safetensors; If all 2 types are being used, it will result in duplicated tensors

Yes, exactly, that's why this is done:

prefix = "model" if not self.is_mistral_format else "consolidated"

..meaning, if no files are named model*.safetensors, it won't be detected properly.

Edit: Just for clarity; I think it used to scan for *.safetensors, which resulted in duplicated tensors when consolidated.safetensors came along.

@CISC CISC merged commit 9a8860c into master Nov 15, 2025
10 checks passed
@CISC CISC deleted the cisc/convert-use-all-safetensors-parts branch November 15, 2025 13:12
basnijholt pushed a commit to basnijholt/llama.cpp that referenced this pull request Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python python script changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: GLM 4.6 safetensors fails to convert to a GGUF

3 participants