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
48395d6b
Unverified
Commit
48395d6b
authored
Nov 17, 2020
by
Sylvain Gugger
Committed by
GitHub
Nov 17, 2020
Browse files
Fix init for MT5 (#8591)
parent
a6cf9ca0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
src/transformers/__init__.py
src/transformers/__init__.py
+2
-1
src/transformers/utils/dummy_pt_objects.py
src/transformers/utils/dummy_pt_objects.py
+0
-5
No files found.
src/transformers/__init__.py
View file @
48395d6b
...
...
@@ -145,6 +145,7 @@ from .models.marian import MarianConfig
from
.models.mbart
import
MBartConfig
from
.models.mmbt
import
MMBTConfig
from
.models.mobilebert
import
MOBILEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
MobileBertConfig
,
MobileBertTokenizer
from
.models.mt5
import
MT5Config
from
.models.openai
import
OPENAI_GPT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
OpenAIGPTConfig
,
OpenAIGPTTokenizer
from
.models.pegasus
import
PegasusConfig
from
.models.phobert
import
PhobertTokenizer
...
...
@@ -498,7 +499,7 @@ if is_torch_available():
MobileBertPreTrainedModel
,
load_tf_weights_in_mobilebert
,
)
from
.models.mt5
import
MT5Config
,
MT5ForConditionalGeneration
,
MT5Model
from
.models.mt5
import
MT5ForConditionalGeneration
,
MT5Model
from
.models.openai
import
(
OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST
,
OpenAIGPTDoubleHeadsModel
,
...
...
src/transformers/utils/dummy_pt_objects.py
View file @
48395d6b
...
...
@@ -1361,11 +1361,6 @@ def load_tf_weights_in_mobilebert(*args, **kwargs):
requires_pytorch
(
load_tf_weights_in_mobilebert
)
class
MT5Config
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
requires_pytorch
(
self
)
class
MT5ForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
requires_pytorch
(
self
)
...
...
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