We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata.indexMap is a map[string]uint64 instead of a slice. Ref: https://github.com/nlpodyssey/safetensors/blob/main/metadata.go#L20
Metadata.indexMap
map[string]uint64
Because of this, the order of the tensors in the safetensors file is lost, which is sometimes important for the users.
This is mostly a problem for Metadata.Tensors() and Metadata.MarshalJSON() which both lose on the determinism.
Metadata.Tensors()
Metadata.MarshalJSON()
The text was updated successfully, but these errors were encountered:
Make SafeTensors.Tensors() and Names() keep ordering
a210899
Fixes nlpodyssey#1
Successfully merging a pull request may close this issue.
Metadata.indexMap
is amap[string]uint64
instead of a slice. Ref: https://github.com/nlpodyssey/safetensors/blob/main/metadata.go#L20Because of this, the order of the tensors in the safetensors file is lost, which is sometimes important for the users.
This is mostly a problem for
Metadata.Tensors()
andMetadata.MarshalJSON()
which both lose on the determinism.The text was updated successfully, but these errors were encountered: