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
3d9556a7
You need to sign in or sign up before continuing.
Unverified
Commit
3d9556a7
authored
Jul 17, 2020
by
Sam Shleifer
Committed by
GitHub
Jul 17, 2020
Browse files
[cleanups] make Marian save as Marian (#5830)
parent
e238e3d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
src/transformers/__init__.py
src/transformers/__init__.py
+1
-1
src/transformers/modeling_marian.py
src/transformers/modeling_marian.py
+2
-0
No files found.
src/transformers/__init__.py
View file @
3d9556a7
...
@@ -22,7 +22,7 @@ import logging
...
@@ -22,7 +22,7 @@ import logging
# Configurations
# Configurations
from
.configuration_albert
import
ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
AlbertConfig
from
.configuration_albert
import
ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
AlbertConfig
from
.configuration_auto
import
ALL_PRETRAINED_CONFIG_ARCHIVE_MAP
,
CONFIG_MAPPING
,
AutoConfig
from
.configuration_auto
import
ALL_PRETRAINED_CONFIG_ARCHIVE_MAP
,
CONFIG_MAPPING
,
AutoConfig
from
.configuration_bart
import
BartConfig
from
.configuration_bart
import
BartConfig
,
MBartConfig
from
.configuration_bert
import
BERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
BertConfig
from
.configuration_bert
import
BERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
BertConfig
from
.configuration_camembert
import
CAMEMBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
CamembertConfig
from
.configuration_camembert
import
CAMEMBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
CamembertConfig
from
.configuration_ctrl
import
CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP
,
CTRLConfig
from
.configuration_ctrl
import
CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP
,
CTRLConfig
...
...
src/transformers/modeling_marian.py
View file @
3d9556a7
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
"""PyTorch MarianMTModel model, ported from the Marian C++ repo."""
"""PyTorch MarianMTModel model, ported from the Marian C++ repo."""
from
transformers.configuration_marian
import
MarianConfig
from
transformers.modeling_bart
import
BartForConditionalGeneration
from
transformers.modeling_bart
import
BartForConditionalGeneration
...
@@ -24,6 +25,7 @@ MARIAN_PRETRAINED_MODEL_ARCHIVE_LIST = [
...
@@ -24,6 +25,7 @@ MARIAN_PRETRAINED_MODEL_ARCHIVE_LIST = [
class
MarianMTModel
(
BartForConditionalGeneration
):
class
MarianMTModel
(
BartForConditionalGeneration
):
config_class
=
MarianConfig
r
"""
r
"""
Pytorch version of marian-nmt's transformer.h (c++). Designed for the OPUS-NMT translation checkpoints.
Pytorch version of marian-nmt's transformer.h (c++). Designed for the OPUS-NMT translation checkpoints.
Model API is identical to BartForConditionalGeneration.
Model API is identical to BartForConditionalGeneration.
...
...
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