notebooks icon indicating copy to clipboard operation
notebooks copied to clipboard

[Flax] Fix & Add scripts to push pretrained flax model weights to the huggingface hub

Open snoop2head opened this issue 10 months ago • 1 comments
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!

snoop2head avatar Jan 01 '25 13:01 snoop2head