transformers
dbf7bfaf - Fix idx2sym not loaded from pretrained vocab file in Transformer XL (#27589)

Commit
2 years ago
Fix idx2sym not loaded from pretrained vocab file in Transformer XL (#27589) * Load idx2sym from pretrained vocab file in Transformer XL When loading vocab file from a pretrained tokenizer for Transformer XL, although the pickled vocabulary file contains a idx2sym key, it isn't loaded, because it is discarded as the empty list already exists as an attribute. Solution is to explicitly take it into account, just like for sym2idx. * ran make style
Author
Parents
Loading