AFAIK Marian is implemented as a subclass of BART for generation, which outputs cross attention weights:

  
      github.com
  
  
    huggingface/transformers/blob/4a9e502a3602d21a6005259fb57b8e1c78101410/src/transformers/models/bart/modeling_bart.py#L1059-L1069 4

return Seq2SeqLMOutput(    loss=masked_lm_loss,    logits=lm_logits,    past_key_values=outputs.past_key_values,    decoder_hidden_states=outputs.decoder_hidden_states,    decoder_attentions=outputs.decoder_attentions,    cross_attentions=outputs.cross_attentions,    encoder_last_hidden_state=outputs.encoder_last_hidden_state,    encoder_hidden_states=outputs.encoder_hidden_states,    encoder_attentions=outputs.encoder_attentions,)



  
  
    
    
  
  


cc @patrickvonplaten