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
702f4a49
"vscode:/vscode.git/clone" did not exist on "a9d56a675ae08446ad1e122842c3d3650f7015da"
Unverified
Commit
702f4a49
authored
Aug 31, 2021
by
Matt
Committed by
GitHub
Aug 31, 2021
Browse files
Fixed CLM model still using MODEL_FOR_MASKED_LM_MAPPING (#13002)
parent
aa08a346
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/tensorflow/language-modeling/run_clm.py
examples/tensorflow/language-modeling/run_clm.py
+2
-2
No files found.
examples/tensorflow/language-modeling/run_clm.py
View file @
702f4a49
...
...
@@ -43,7 +43,7 @@ import transformers
from
transformers
import
(
CONFIG_MAPPING
,
CONFIG_NAME
,
MODEL_FOR_
MASKED
_LM_MAPPING
,
MODEL_FOR_
CAUSAL
_LM_MAPPING
,
TF2_WEIGHTS_NAME
,
AutoConfig
,
AutoTokenizer
,
...
...
@@ -58,7 +58,7 @@ from transformers.utils.versions import require_version
logger
=
logging
.
getLogger
(
__name__
)
require_version
(
"datasets>=1.8.0"
,
"To fix: pip install -r examples/pytorch/language-modeling/requirements.txt"
)
MODEL_CONFIG_CLASSES
=
list
(
MODEL_FOR_
MASKED
_LM_MAPPING
.
keys
())
MODEL_CONFIG_CLASSES
=
list
(
MODEL_FOR_
CAUSAL
_LM_MAPPING
.
keys
())
MODEL_TYPES
=
tuple
(
conf
.
model_type
for
conf
in
MODEL_CONFIG_CLASSES
)
# endregion
...
...
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