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

Overwrite weights (initializers) with fixed data or random data #27

Open
zhenhuaw-me opened this issue Sep 14, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@zhenhuaw-me
Copy link
Owner

Bert series ONNX models are very large (x GB) thus not easy to share the real file. We can improve this process by overwriting the weights (initializers)

  • It can be fixed data (e.g. all 0.1 or other value specified), thus the model can be compressed.
  • After sharing, we can recover with numpy style random numbers.

This can only be used as a sharing method, the generated model are not useful when evaluate accuracy.

For better usage:

  • Annotation will be added when writing fixed data, thus when re-random we can detect automatically.
  • The tensors can be specified with names or size.
  • Only works for FP32/FP16.
  • 0 removed.
@zhenhuaw-me zhenhuaw-me added the enhancement New feature or request label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant