Skip to content

convert : use all parts in safetensors index#17286

Merged
CISC merged 1 commit intomasterfrom
cisc/convert-use-all-safetensors-parts
Nov 15, 2025
Merged

convert : use all parts in safetensors index#17286
CISC merged 1 commit intomasterfrom
cisc/convert-use-all-safetensors-parts

Conversation

@CISC
Copy link
Member

@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
Contributor

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
Member 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
Anico2 added a commit to Anico2/llama.cpp that referenced this pull request Jan 15, 2026
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

2 participants