-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SqueezeBERT #937
Add SqueezeBERT #937
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change your codes according to the comments in this pr #872
And don't push those Irrelevant files.
``` | ||
export CUDA_VISIBLE_DEVICES=0 | ||
python -u ./run_glue.py \ | ||
--model_type bert \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--model_type squeezebert \
What is Irrelevant files? |
I have changed the code. But I have no idea about where the Irrelevant files came from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the empty file problem. Pay a attention to your git add
.
|
||
|
||
class SqueezeBertEncoder(nn.Layer): | ||
def __init__(self, embedding_size, hidden_size, intermediate_size, num_attention_heads, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indent here is not correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix this.
Examples: | ||
.. code-block:: python | ||
from paddlenlp.transformers import SqueezeBertTokenizer | ||
tokenizer = SqueezeBertTokenizer.from_pretrained('SqueezeBert-small-discriminator') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unknown name SqueezeBert-small-discriminator
return (sequence_output, pooled_output) + encoder_outputs[1:] | ||
|
||
|
||
# class SqueezeBertForPretraining(SqueezeBertPreTrainedModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this if not needed
@register_base_model | ||
class SqueezeBertModel(SqueezeBertPreTrainedModel): | ||
""" | ||
Args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect indent.
output_attentions=None, | ||
output_hidden_states=None, | ||
): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more doc here.
|
||
|
||
class SqueezeBertForTokenClassification(SqueezeBertPreTrainedModel): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more doc for models for specific tasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more doc for models for specific tasks
I have not got your message for two days, is there any wrong?
Please review latest submit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete train_log.txt and dataset file.
@@ -0,0 +1 @@ | |||
{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this file.
@@ -0,0 +1 @@ | |||
{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, then wait until testing passes.
Since your test passed, you can delete all pytorch script, logs and json files |
How about remove all files under "examples/language_model/squeeze_bert" ? |
Yes. You can remove all examples. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@yingyibiao 这个PR有效吗? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please sign our Contributor License Agreement for this pr to be merged |
See README.md