You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "run_mlm.py", line 63, in <module>
MODEL_CONFIG_CLASSES = list(MODEL_FOR_MASKED_LM_MAPPING.keys())
AttributeError: 'NoneType' object has no attribute 'keys'
Expected behavior
I want to judge whether two lines of text should be merged into one line.
For example:
input:
The preparations for the Beijing
Winter Olympics are progressing smoothly and are
fully recognized by the International Olympic
Committee, he said.
output:
The preparations for the Beijing Winter Olympics are progressing smoothly and are fully recognized by the International Olympic Committee, he said.
I think maybe the masked language model can do this. I insert a [MERGE] or [SPLIT] special token into the gap of two lines and only masked these two tokens when construct masked tokens like this:
source input:
The preparations for the Beijing [MERGE] Winter Olympics are progressing smoothly and are [MERGE] fully recognized by the International Olympic [MERGE] Committee, he said.
masked input:
The preparations for the Beijing [mask] Winter Olympics are progressing smoothly and are [mask] fully recognized by the International Olympic [mask] Committee, he said.
But when I try to execute the original script run_mlm.py by Tutorials, I get the above error. What do I need to do to perform the training correctly? And do you think the task of merging sentences can be solved by language models?
The text was updated successfully, but these errors were encountered:
I sovled the error by execute pip install -r examples/pytorch/language-modeling/requirements.txt, why should I install the requirements of pytorch example for tensorflow example?
Environment info
transformers
version: 4.13.0.dev0Who can help
@sgugger @Rocketknight1 @Elysium1436
Information
Model I am using Bert:
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
Expected behavior
I want to judge whether two lines of text should be merged into one line.
For example:
I think maybe the masked language model can do this. I insert a
[MERGE]
or[SPLIT]
special token into the gap of two lines and only masked these two tokens when construct masked tokens like this:But when I try to execute the original script
run_mlm.py
by Tutorials, I get the above error. What do I need to do to perform the training correctly? And do you think the task of merging sentences can be solved by language models?The text was updated successfully, but these errors were encountered: