[T5] Add T5ForQuestionAnswering and MT5ForQuestionAnswering (#24481)

* Adding T5ForQuestionAnswering

* Changed weight initialization that results in better initial loss when fine-tuning

* Update to class variables

* Running make fixup

* Running make fix-copies

* Remove model_parallel

* Adding MT5ForQuestionAnswering

* Adding docs

* Fix wrong doc

* Update src/transformers/models/mt5/modeling_mt5.py

Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>

* Update src/transformers/models/t5/modeling_t5.py

Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>

* File formatting

* Undoing change

---------

Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
This commit is contained in:
Sebastian
2023-06-27 16:07:06 +02:00
committed by GitHub
parent bcf02ec701
commit 06910f5a76
11 changed files with 450 additions and 7 deletions

View File

@@ -399,6 +399,11 @@ A list of official Hugging Face and community (indicated by 🌎) resources to h
[[autodoc]] T5EncoderModel
- forward
## T5ForQuestionAnswering
[[autodoc]] T5ForQuestionAnswering
- forward
## TFT5Model
[[autodoc]] TFT5Model