Fix and improve REALM fine-tuning (#15297)

* Draft

* Add test

* Update src/transformers/models/realm/modeling_realm.py

* Apply suggestion

* Add block_mask

* Update

* Update

* Add block_embedding_to

* Remove no_grad

* Use AutoTokenizer

* Remove model.to overridding
This commit is contained in:
Li-Huai (Allan) Lin
2022-03-03 21:10:15 +08:00
committed by GitHub
parent 439de3f7f9
commit 7b3bd1f21a
6 changed files with 75 additions and 39 deletions

View File

@@ -81,4 +81,5 @@ This model was contributed by [qqaatw](https://huggingface.co/qqaatw). The origi
## RealmForOpenQA
[[autodoc]] RealmForOpenQA
- block_embedding_to
- forward