Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
1487b840
Commit
1487b840
authored
Jan 17, 2020
by
Lysandre
Committed by
Lysandre Debut
Jan 23, 2020
Browse files
TF GPT2
parent
bd0d3fd7
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
139 deletions
+150
-139
docs/source/model_doc/gpt2.rst
docs/source/model_doc/gpt2.rst
+4
-0
src/transformers/modeling_tf_bert.py
src/transformers/modeling_tf_bert.py
+0
-6
src/transformers/modeling_tf_gpt2.py
src/transformers/modeling_tf_gpt2.py
+146
-133
No files found.
docs/source/model_doc/gpt2.rst
View file @
1487b840
...
...
@@ -30,6 +30,10 @@ Tips:
See `reusing the past in generative models <../quickstart.html#using-the-past>`_ for more information on the usage
of this argument.
`Write With Transformer <https://transformer.huggingface.co/doc/gpt2-large>`__ is a webapp created and hosted by
Hugging Face showcasing the generative capabilities of several models. GPT-2 is one of them and is available in five
different sizes: small, medium, large, xl and a distilled version of the small checkpoint: distilgpt-2.
``GPT2Config``
~~~~~~~~~~~~~~~~~~~~~
...
...
src/transformers/modeling_tf_bert.py
View file @
1487b840
...
...
@@ -589,12 +589,6 @@ BERT_START_DOCSTRING = r"""
Use it as a regular TF 2.0 Keras Model and
refer to the TF 2.0 documentation for all matter related to general usage and behavior.
.. _`BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding`:
https://arxiv.org/abs/1810.04805
.. _`tf.keras.Model`:
https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/keras/Model
.. note::
TF 2.0 models accepts two formats as inputs:
...
...
src/transformers/modeling_tf_gpt2.py
View file @
1487b840
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment