Closed ydshieh closed 2 years ago
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Environment info
transformers
version: 4.12.0.dev0Information
The recent added
TFEncoderDecoderModel
has an issue: In order to load from a PyTorch checkpoint, a workaround isas stated in the documentation. However, saving and reloading won't load the TF weights correctly.
To reproduce
Steps to reproduce the behavior:
Outputs:
Loading from PT weights as in the workaround
After saving and reloading the TF weights
The warning given when reloading the TF weights
Expected behavior
The weights should be loaded correctly, and the outputs should be exactly the same.
Remark
In
test_modeling_tf_encoder_decoder.py
, we have testsHowever, there is no test combining these two cases.