Skip to content

Commit

Permalink
Add label and loss support for BERT/RoBERTa/ERNIE (#3013)
Browse files Browse the repository at this point in the history
* Add label and loss support for BERT/RoBERTa.

* Add label and loss support for ERNIE.

* Update api docs.
  • Loading branch information
guoshengCS authored Aug 12, 2022
1 parent 115d69d commit 8980d64
Show file tree
Hide file tree
Showing 43 changed files with 1,001 additions and 172 deletions.
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.dataaug.base_augment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
base\_augment
======================================

.. automodule:: paddlenlp.dataaug.base_augment
:members:
:no-undoc-members:
:show-inheritance:
17 changes: 17 additions & 0 deletions docs/source/paddlenlp.dataaug.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
paddlenlp.dataaug
=========================

.. automodule:: paddlenlp.dataaug
:members:
:no-undoc-members:
:show-inheritance:


.. toctree::
:maxdepth: 4

paddlenlp.dataaug.base_augment
paddlenlp.dataaug.word_delete
paddlenlp.dataaug.word_insert
paddlenlp.dataaug.word_substitute
paddlenlp.dataaug.word_swap
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.dataaug.word_delete.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
word\_delete
=====================================

.. automodule:: paddlenlp.dataaug.word_delete
:members:
:no-undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.dataaug.word_insert.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
word\_insert
=====================================

.. automodule:: paddlenlp.dataaug.word_insert
:members:
:no-undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.dataaug.word_substitute.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
word\_substitute
=========================================

.. automodule:: paddlenlp.dataaug.word_substitute
:members:
:no-undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.dataaug.word_swap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
word\_swap
===================================

.. automodule:: paddlenlp.dataaug.word_swap
:members:
:no-undoc-members:
:show-inheritance:
7 changes: 6 additions & 1 deletion docs/source/paddlenlp.datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ paddlenlp.datasets
:members:
:no-undoc-members:


.. toctree::
:maxdepth: 4

paddlenlp.datasets.dataset


.. toctree::
:maxdepth: 4

paddlenlp.datasets.dataset
1 change: 1 addition & 0 deletions docs/source/paddlenlp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ paddlenlp
:maxdepth: 4

paddlenlp.data
paddlenlp.dataaug
paddlenlp.datasets
paddlenlp.embeddings
paddlenlp.experimental
Expand Down
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.taskflow.code_generation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
code\_generation
==========================================

.. automodule:: paddlenlp.taskflow.code_generation
:members:
:no-undoc-members:
:show-inheritance:
2 changes: 2 additions & 0 deletions docs/source/paddlenlp.taskflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ paddlenlp.taskflow
.. toctree::
:maxdepth: 4

paddlenlp.taskflow.code_generation
paddlenlp.taskflow.dependency_parsing
paddlenlp.taskflow.dialogue
paddlenlp.taskflow.information_extraction
Expand All @@ -28,6 +29,7 @@ paddlenlp.taskflow
paddlenlp.taskflow.sentiment_analysis
paddlenlp.taskflow.task
paddlenlp.taskflow.taskflow
paddlenlp.taskflow.text2image_generation
paddlenlp.taskflow.text_correction
paddlenlp.taskflow.text_generation
paddlenlp.taskflow.text_similarity
Expand Down
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.taskflow.text2image_generation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
text2image\_generation
================================================

.. automodule:: paddlenlp.taskflow.text2image_generation
:members:
:no-undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.artist.modeling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
modeling
=============================================

.. automodule:: paddlenlp.transformers.artist.modeling
:members:
:no-undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/source/paddlenlp.transformers.artist.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
artist
=====================================

.. automodule:: paddlenlp.transformers.artist
:members:
:no-undoc-members:
:show-inheritance:


.. toctree::
:maxdepth: 4

paddlenlp.transformers.artist.modeling
paddlenlp.transformers.artist.tokenizer
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.artist.tokenizer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tokenizer
==============================================

.. automodule:: paddlenlp.transformers.artist.tokenizer
:members:
:no-undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.codegen.modeling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
modeling
==============================================

.. automodule:: paddlenlp.transformers.codegen.modeling
:members:
:no-undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/source/paddlenlp.transformers.codegen.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
codegen
======================================

.. automodule:: paddlenlp.transformers.codegen
:members:
:no-undoc-members:
:show-inheritance:


.. toctree::
:maxdepth: 4

paddlenlp.transformers.codegen.modeling
paddlenlp.transformers.codegen.tokenizer
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.codegen.tokenizer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tokenizer
===============================================

.. automodule:: paddlenlp.transformers.codegen.tokenizer
:members:
:no-undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.dallebart.modeling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
modeling
================================================

.. automodule:: paddlenlp.transformers.dallebart.modeling
:members:
:no-undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/source/paddlenlp.transformers.dallebart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dallebart
========================================

.. automodule:: paddlenlp.transformers.dallebart
:members:
:no-undoc-members:
:show-inheritance:


.. toctree::
:maxdepth: 4

paddlenlp.transformers.dallebart.modeling
paddlenlp.transformers.dallebart.tokenizer
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.dallebart.tokenizer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tokenizer
=================================================

.. automodule:: paddlenlp.transformers.dallebart.tokenizer
:members:
:no-undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
faster\_tokenizer
========================================================

.. automodule:: paddlenlp.transformers.ernie_m.faster_tokenizer
:members:
:no-undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/paddlenlp.transformers.ernie_m.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ ernie\_m
.. toctree::
:maxdepth: 4

paddlenlp.transformers.ernie_m.faster_tokenizer
paddlenlp.transformers.ernie_m.modeling
paddlenlp.transformers.ernie_m.tokenizer
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.gau_alpha.modeling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
modeling
=================================================

.. automodule:: paddlenlp.transformers.gau_alpha.modeling
:members:
:no-undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/source/paddlenlp.transformers.gau_alpha.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
gau\_alpha
=========================================

.. automodule:: paddlenlp.transformers.gau_alpha
:members:
:no-undoc-members:
:show-inheritance:


.. toctree::
:maxdepth: 4

paddlenlp.transformers.gau_alpha.modeling
paddlenlp.transformers.gau_alpha.tokenizer
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.gau_alpha.tokenizer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tokenizer
==================================================

.. automodule:: paddlenlp.transformers.gau_alpha.tokenizer
:members:
:no-undoc-members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/paddlenlp.transformers.model_outputs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
model\_outputs
============================================

.. automodule:: paddlenlp.transformers.model_outputs
:members:
:no-undoc-members:
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.opt.modeling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
modeling
==========================================

.. automodule:: paddlenlp.transformers.opt.modeling
:members:
:no-undoc-members:
:show-inheritance:
13 changes: 13 additions & 0 deletions docs/source/paddlenlp.transformers.opt.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
opt
==================================

.. automodule:: paddlenlp.transformers.opt
:members:
:no-undoc-members:
:show-inheritance:


.. toctree::
:maxdepth: 4

paddlenlp.transformers.opt.modeling
8 changes: 8 additions & 0 deletions docs/source/paddlenlp.transformers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ paddlenlp.transformers
:maxdepth: 4

paddlenlp.transformers.albert
paddlenlp.transformers.artist
paddlenlp.transformers.auto
paddlenlp.transformers.bart
paddlenlp.transformers.bert
Expand All @@ -19,8 +20,10 @@ paddlenlp.transformers
paddlenlp.transformers.blenderbot
paddlenlp.transformers.blenderbot_small
paddlenlp.transformers.chinesebert
paddlenlp.transformers.codegen
paddlenlp.transformers.convbert
paddlenlp.transformers.ctrl
paddlenlp.transformers.dallebart
paddlenlp.transformers.distilbert
paddlenlp.transformers.electra
paddlenlp.transformers.ernie
Expand All @@ -31,6 +34,7 @@ paddlenlp.transformers
paddlenlp.transformers.ernie_m
paddlenlp.transformers.fnet
paddlenlp.transformers.funnel
paddlenlp.transformers.gau_alpha
paddlenlp.transformers.gpt
paddlenlp.transformers.layoutlm
paddlenlp.transformers.layoutlmv2
Expand All @@ -41,6 +45,7 @@ paddlenlp.transformers
paddlenlp.transformers.mobilebert
paddlenlp.transformers.mpnet
paddlenlp.transformers.nezha
paddlenlp.transformers.opt
paddlenlp.transformers.ppminilm
paddlenlp.transformers.prophetnet
paddlenlp.transformers.reformer
Expand All @@ -56,6 +61,7 @@ paddlenlp.transformers
paddlenlp.transformers.transformer
paddlenlp.transformers.unified_transformer
paddlenlp.transformers.unimo
paddlenlp.transformers.xlm
paddlenlp.transformers.xlnet


Expand All @@ -67,8 +73,10 @@ paddlenlp.transformers
paddlenlp.transformers.distill_utils
paddlenlp.transformers.export
paddlenlp.transformers.generation_utils
paddlenlp.transformers.model_outputs
paddlenlp.transformers.model_utils
paddlenlp.transformers.optimization
paddlenlp.transformers.sentencepiece_model_pb2
paddlenlp.transformers.tokenizer_utils
paddlenlp.transformers.tokenizer_utils_base
paddlenlp.transformers.tokenizer_utils_faster
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sentencepiece\_model\_pb2
=======================================================

.. automodule:: paddlenlp.transformers.sentencepiece_model_pb2
:members:
:no-undoc-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
faster\_tokenizer
========================================================

.. automodule:: paddlenlp.transformers.tinybert.faster_tokenizer
:members:
:no-undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/paddlenlp.transformers.tinybert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ tinybert
.. toctree::
:maxdepth: 4

paddlenlp.transformers.tinybert.faster_tokenizer
paddlenlp.transformers.tinybert.modeling
paddlenlp.transformers.tinybert.tokenizer
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.xlm.modeling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
modeling
==========================================

.. automodule:: paddlenlp.transformers.xlm.modeling
:members:
:no-undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/source/paddlenlp.transformers.xlm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
xlm
==================================

.. automodule:: paddlenlp.transformers.xlm
:members:
:no-undoc-members:
:show-inheritance:


.. toctree::
:maxdepth: 4

paddlenlp.transformers.xlm.modeling
paddlenlp.transformers.xlm.tokenizer
7 changes: 7 additions & 0 deletions docs/source/paddlenlp.transformers.xlm.tokenizer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tokenizer
===========================================

.. automodule:: paddlenlp.transformers.xlm.tokenizer
:members:
:no-undoc-members:
:show-inheritance:
Loading

0 comments on commit 8980d64

Please sign in to comment.