• Daniel Stancl's avatar
    Add head_mask, decoder_head_mask, cross_head_mask to ProphetNet (#9964) · f45cb66b
    Daniel Stancl authored
    * Add head_mask & decoder_head_mask + some corrections
    
    * Fix head masking for N-grams
    
    * Enable test_headmasking for encoder and decod
    
    * Fix one typo regarding in modeling_propgetnet.py
    
    * Enable test_headmasking for ProphetNetStandaloneDecoderModelTest
    and ProphetNetStandaloneEncoderModelTest in test_modeling_prophetnet.py
    
    * make style
    
    * Fix cross_head_mask
    
    * Fix attention head mask naming
    
    * `cross_head_mask` -> `cross_attn_head_mask`
    
    * `cross_layer_head_mask` -> `cross_attn_layer_head_mask`
    
    * Still need to merge #10605 to master to pass the tests
    f45cb66b
test_modeling_prophetnet.py 51.1 KB