transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}
Daniel Stancl e3ff165aa5
Fix cross-attention head mask for Torch encoder-decoder models (#10605)
* Fix cross-attention head mask for Torch BART models

* Fix head masking for cross-attention module for the following
models: BART, Blenderbot, Blenderbot_small, M2M_100, Marian, MBart,
Pegasus

* Enable test_headmasking for M2M_100 model

* Fix cross_head_mask for FSMT, LED and T5

* This commit fixes `head_mask` for cross-attention modules
in the following models: FSMT, LED, T5

* It also contains some smaller changes in doc so that
it is be perfectly clear the shape of `cross_head_mask`
is the same as of `decoder_head_mask`

* Update template

* Fix template for BartForCausalLM

* Fix cross_head_mask for Speech2Text models

* Fix cross_head_mask in templates

* Fix args order in BartForCausalLM template

* Fix doc in BART templates

* Make more explicit naming

* `cross_head_mask` -> `cross_attn_head_mask`

* `cross_layer_head_mask` -> `cross_attn_layer_head_mask`

* Fix doc

* make style quality

* Fix speech2text docstring
2021-04-23 18:58:06 +02:00
..
__init__.py Fix model templates (#9999) 2021-02-04 07:47:26 -05:00
{{cookiecutter.lowercase_modelname}}.rst Honor contributors to models (#11329) 2021-04-21 09:47:27 -04:00
configuration_{{cookiecutter.lowercase_modelname}}.py Fixes in the templates (#10951) 2021-03-29 17:36:13 -04:00
configuration.json Model Templates for Seq2Seq (#9251) 2020-12-22 23:41:20 +01:00
modeling_{{cookiecutter.lowercase_modelname}}.py Fix cross-attention head mask for Torch encoder-decoder models (#10605) 2021-04-23 18:58:06 +02:00
modeling_tf_{{cookiecutter.lowercase_modelname}}.py Enforce string-formatting with f-strings (#10980) 2021-03-31 10:00:27 -04:00
test_modeling_{{cookiecutter.lowercase_modelname}}.py Fix model templates (#9999) 2021-02-04 07:47:26 -05:00
test_modeling_tf_{{cookiecutter.lowercase_modelname}}.py Enforce string-formatting with f-strings (#10980) 2021-03-31 10:00:27 -04:00
to_replace_{{cookiecutter.lowercase_modelname}}.py Fix model templates (#9999) 2021-02-04 07:47:26 -05:00
tokenization_{{cookiecutter.lowercase_modelname}}.py Make get_special_tokens_mask consider all tokens (#11163) 2021-04-09 11:57:44 -04:00
tokenization_fast_{{cookiecutter.lowercase_modelname}}.py Copy tokenizer files in each of their repo (#10624) 2021-03-10 11:26:23 -05:00