]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
convert-hf : match model part name prefix and suffix (#7687)
authorcompilade <redacted>
Sun, 9 Jun 2024 02:47:25 +0000 (22:47 -0400)
committerGitHub <redacted>
Sun, 9 Jun 2024 02:47:25 +0000 (12:47 +1000)
commit5795b941827fdec6c1662986de962badff456718
tree551e2e6de458a97763af41df5b70433276512d7d
parented9f2521185706481501a5e6d5315397b11802ff
convert-hf : match model part name prefix and suffix (#7687)

In #7075, to fix the conversion of (some) models using model-00001-of-00001.safetensors instead of model.safetensors for a single model part we simply used the same logic as the part count to get the part names.

But this doesn't always work correctly, like when unusual additional model files like consolidated.safetensors in https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3 are present.

This commit matching both the prefix and the suffix of the model part names should fix this problem without breaking any previously-supported upstream models. But according to report by @teleprint-me there is still some
persistent problem, but shall do in the meantime.
convert-hf-to-gguf.py