notebooks
notebooks copied to clipboard
[Flax] Fix & Add scripts to push pretrained flax model weights to the huggingface hub
trafficstars
What does this PR do?
Fixes the following:
- https://github.com/huggingface/transformers/issues/12545
- https://github.com/huggingface/transformers/issues/12554#issuecomment-875656287
Issues above happened mainly because provided examples upload initialized model's parameters, resulting in jibberish output as mentioned in the issues.
Fixed with 1) unreplicating params, 2) assigning back to the original flax model class, 3) pushing to the huggingface hub.
Who can review?
@patrickvonplaten
Thank you for your review and devotion to the open source project!