Skip to content
New issue

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

Tensors are randomized #1

Open
maruel opened this issue Nov 4, 2024 · 0 comments · May be fixed by #3
Open

Tensors are randomized #1

maruel opened this issue Nov 4, 2024 · 0 comments · May be fixed by #3

Comments

@maruel
Copy link

maruel commented Nov 4, 2024

Metadata.indexMap is a map[string]uint64 instead of a slice. Ref: https://github.com/nlpodyssey/safetensors/blob/main/metadata.go#L20

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant