Skip to content

convert : use all parts in safetensors index#17286

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

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

Conversation

@CISC

@CISC CISC commented Nov 15, 2025

Copy link
Copy Markdown
Member

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

ngxson commented Nov 15, 2025

Copy link
Copy Markdown
Collaborator

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

CISC commented Nov 15, 2025

Copy link
Copy Markdown
Member Author

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
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
phibya pushed a commit to ziee-ai/llama.cpp that referenced this pull request May 29, 2026
fewtarius pushed a commit to fewtarius/CachyLLama that referenced this pull request May 30, 2026
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
MrLordCat referenced this pull request in MrLordCat/llama.cpp-with-GUI Jul 16, 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