• cronoik's avatar
    EncoderDecoderConfigs should not create new objects (#11300) · 35cd8eed
    cronoik authored
    
    
    * removes the creation of separate config objects and uses the existing ones instead+overwrite resize_token_embeddings from parent class because it is not working for the EncoderDecoderModel
    
    * rollback to current version of the huggingface master branch
    
    * reworked version that ties the encoder and decoder config of the parent encoderdecoder instance
    
    * overwrite of resize_token_embeddings throws an error now
    
    * review comment suggestion
    Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
    
    * implemented warning in case encoderdecoder is created with differing configs of encoderdecoderconfig and decoderconfig or encoderconfig
    
    * added test to avoid diverging configs of wrapper class and wrapped classes
    
    * Update src/transformers/models/encoder_decoder/modeling_encoder_decoder.py
    
    * make style
    Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
    Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
    35cd8eed
test_modeling_encoder_decoder.py 41.7 KB