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

AlbertForNextSentencePredicition #58

Open
DeepakDhanasekar opened this issue Oct 2, 2020 · 2 comments
Open

AlbertForNextSentencePredicition #58

DeepakDhanasekar opened this issue Oct 2, 2020 · 2 comments

Comments

@DeepakDhanasekar
Copy link

Hey,

I was going through the code and found out that you had used NSP on pytorch Albert implementation. Doesn't Albert use Sentence Order Predicition??

@lonePatient
Copy link
Owner

@DeepakDhana SOP code:

                if random.random() < 0.5:  # 交换一下tokens_a和tokens_b
                    is_random_next = True
                    temp = tokens_a
                    tokens_a = tokens_b
                    tokens_b = temp
                else:
                    is_random_next = False

@DeepakDhanasekar
Copy link
Author

I have seem this code in both prepare_lm_data_mask.py and prepare_lm_data_ngram.py. What are the difference between them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants