Replies: 6 comments 14 replies
-
It's going to be hard to do that because people are frequently adding stuff like new quantization types, formats, etc. So we could invent a new format that had the current
I really don't like safetensors' model saving stuff*, but the format at least doesn't seem like it precludes aligning the data. The way tensors are defined is just [ It also allows a * One thing I really don't like about the way safetensors saves stuff is you basically have to load the entire thing into memory. Also, if you don't pass it a file it will additionally build a gigantic buffer before saving. I think that's just a limitation of how they implemented it, the file format is basically okay (kinda weird it has no magic or anything, so you can't really know you have a safetensors format file just by looking at the data).
No way around that one, but is it too much of an issue? The allowed format for the JSON in a ST file is also fairly limited, so you could just write your own very simple JSON parser for ST files if you didn't want to pull in a big dependency like |
Beta Was this translation helpful? Give feedback.
-
This would be nice to have, but I agree with Kerfuffle's concerns: it's non-trivial just due to the variability of the ecosystem. I'm not sure what the best path forward here is - my gut feeling is to wait and see what the ecosystem produces. |
Beta Was this translation helpful? Give feedback.
-
Thinking about this more after noticing just how bad the GGML format fragmentation is. If we were to design such a format, I'd want it to feature the following:
Are there any existing binary formats that meet that criteria / can encode that kind of data? The first thing that comes to mind is something like BSON with a schema. |
Beta Was this translation helpful? Give feedback.
-
If we go with LLVM naming it would be |
Beta Was this translation helpful? Give feedback.
-
I've made a script to write quantized weights to safetensors https://github.com/iacore/model-conversions/tree/main/quantize-wizard |
Beta Was this translation helpful? Give feedback.
-
Hello people, I made a simple reader for safetensors https://github.com/iacore/model-conversions/tree/main/safetensors Maybe it can go in this repo? |
Beta Was this translation helpful? Give feedback.
-
The model format space is quite wild. I think we should at least have a good enough model format.
Problems with safetensors
Beta Was this translation helpful? Give feedback.
All reactions