Skip to content
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

Merged
merged 8 commits into from
Nov 2, 2021
Merged

Add SqueezeBERT #937

merged 8 commits into from
Nov 2, 2021

Conversation

renmada
Copy link
Contributor

@renmada renmada commented Aug 27, 2021

See README.md

@CLAassistant
Copy link

CLAassistant commented Aug 27, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ ZeyuChen
✅ smallv0221
❌ deeplaying
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@smallv0221 smallv0221 left a 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 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--model_type squeezebert \

@renmada
Copy link
Contributor Author

renmada commented Aug 30, 2021

Irrelevant files

What is Irrelevant files?

@smallv0221
Copy link
Contributor

Irrelevant files

What is Irrelevant files?

image
These empty files.

@renmada
Copy link
Contributor Author

renmada commented Aug 30, 2021

Please change your codes according to the comments in this pr #872
And don't push those Irrelevant files.

I have changed the code. But I have no idea about where the Irrelevant files came from

Copy link
Contributor

@smallv0221 smallv0221 left a 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,
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

Copy link
Contributor

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')
Copy link
Contributor

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):
Copy link
Contributor

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:
Copy link
Contributor

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,
):

Copy link
Contributor

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):

Copy link
Contributor

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

Copy link
Contributor Author

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?

@renmada
Copy link
Contributor Author

renmada commented Aug 31, 2021

Please review latest submit.

Copy link
Contributor

@smallv0221 smallv0221 left a 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 @@
{}
Copy link
Contributor

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 @@
{}
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

db5a14a6979a52d7b6fa06de8a07ae4
I was told to upload all the relevant files. And he will delete all files after testing.

Copy link
Contributor

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.

@smallv0221
Copy link
Contributor

Since your test passed, you can delete all pytorch script, logs and json files

@renmada
Copy link
Contributor Author

renmada commented Oct 8, 2021

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" ?

@ZeyuChen ZeyuChen added this to In progress in PaddleNLP v2.2 via automation Oct 10, 2021
@smallv0221
Copy link
Contributor

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.

@renmada
Copy link
Contributor Author

renmada commented Oct 14, 2021

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.
Done.

PaddleNLP v2.2 automation moved this from In progress to Reviewer approved Oct 21, 2021
smallv0221
smallv0221 previously approved these changes Oct 21, 2021
Copy link
Contributor

@smallv0221 smallv0221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ZeyuChen
Copy link
Member

@yingyibiao 这个PR有效吗?

PaddleNLP v2.2 automation moved this from Reviewer approved to Done Nov 1, 2021
@chenxiaozeng chenxiaozeng reopened this Nov 1, 2021
PaddleNLP v2.2 automation moved this from Done to In progress Nov 1, 2021
PaddleNLP v2.2 automation moved this from In progress to Review in progress Nov 1, 2021
Copy link
Contributor

@smallv0221 smallv0221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

PaddleNLP v2.2 automation moved this from Review in progress to Reviewer approved Nov 1, 2021
@smallv0221
Copy link
Contributor

Please sign our Contributor License Agreement for this pr to be merged

@ZeyuChen ZeyuChen changed the title Add squeezebert Add SqueezeBERT Nov 2, 2021
@ZeyuChen ZeyuChen added the enhancement New feature or request label Nov 2, 2021
@ZeyuChen ZeyuChen merged commit a77af2e into PaddlePaddle:develop Nov 2, 2021
PaddleNLP v2.2 automation moved this from Reviewer approved to Done Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants