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

Adding Sentence Order Prediction #1061

Merged
merged 183 commits into from Apr 24, 2020
Merged

Adding Sentence Order Prediction #1061

merged 183 commits into from Apr 24, 2020

Conversation

pruksmhc
Copy link
Contributor

@pruksmhc pruksmhc commented Apr 11, 2020

Adding Sentence Order Prediction Task for ALBERT
What this version of MLM supports: ALBERT embedder.
Below are the runs for MLM + SOP + intermediate task (which is how we intend to use SOP)
The results (on ALBERT) are:

Experiment description Intermediate Task Performance SOP performance
SST + SOP 0.85 0.95
QQP + SOP 0.95 0.94

@pyeres
Copy link
Contributor

pyeres commented Apr 15, 2020

Hi @phu-pmh & @pruksmhc — I see this is a "[WIP]". What remains to be done or reviewed?

@phu-pmh
Copy link
Member

phu-pmh commented Apr 15, 2020

Hi @phu-pmh & @pruksmhc — I see this is a "[WIP]". What remains to be done or reviewed?

I just pushed the instructions for data generation. Other than that, nothing left to be done or reviewed, I think.

@sleepinyourhat
Copy link
Contributor

Okay—my major concerns have been addressed, though I'd still prefer Phil do the final review.

@pruksmhc pruksmhc changed the title Adding Sentence Order Prediction [WIP] Adding Sentence Order Prediction Apr 16, 2020
@pruksmhc
Copy link
Contributor Author

@pyeres if you could take a look that would be great.

@pyeres
Copy link
Contributor

pyeres commented Apr 16, 2020

Okay—my major concerns have been addressed, though I'd still prefer Phil do the final review.

Per conversation with @sleepinyourhat — my review will be focused on SentenceOrderTask.

scripts/sop/README.md Outdated Show resolved Hide resolved
jiant/tasks/tasks.py Outdated Show resolved Hide resolved
jiant/tasks/tasks.py Outdated Show resolved Hide resolved
@pyeres
Copy link
Contributor

pyeres commented Apr 17, 2020

Capturing some notes from conversation with @pruksmhc out-of-band:

  • There are intentional differences between our implementation of SOP and the TF implementation — inline code comments will be added to call out these differences.
  • The docstrings will be updated to fully outline the version of the SOP implemented here.
  • @pruksmhc considers the SOP implementation to have been reviewed for correctness (already, by other reviewers).

@phu-pmh, @sleepinyourhat, @zphang for visibility as contributors/reviewers on this PR — I'll plan to resume review once the docstrings and comments (mentioned above) are added.

@sleepinyourhat
Copy link
Contributor

@pruksmhc @phu-pmh I talked through this PR with Phil earlier today, and I think it'll be ready to go with two more smallish fixes:

Try to get to these before you do anything else non-emergency on jiant, and we can get this merged in. Thanks!

Copy link
Contributor

@pyeres pyeres left a comment

Choose a reason for hiding this comment

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

Thanks @pruksmhc and @phu-pmh

@pyeres
Copy link
Contributor

pyeres commented Apr 24, 2020

Below are the runs for MLM + SOP + intermediate task (which is how we intend to use SOP)

@pruksmhc — I'm not able to locate the run results you mentioned in the PR description (maybe they're buried somewhere else in the thread?). Please repost them in the PR description.

@pruksmhc pruksmhc merged commit ccad92a into master Apr 24, 2020
@jeswan jeswan added the jiant-v1-legacy Relevant to versions <= v1.3.2 label Sep 17, 2020
@jeswan jeswan deleted the add_sop branch September 22, 2020 03:41
leo-liuzy pushed a commit to leo-liuzy/dynamic_jiant that referenced this pull request Nov 11, 2020
* misc run scripts

* sbatch

* sweep scripts

* update

* qa

* update

* update

* update

* update

* update

* sb file

* moving update_metrics to outside scope of dataparallel

* fixing micro_avg calculation

* undo debugging

* Fixing tests, moving update_metrics out of other tasks

* remove extraneous change

* MLM task

* Added MLM task

* update

* fix multiple choice dataparallel forward

* update

* add _mask_id to transformers

* Update

* MLM update

* adding update_metrics abstraction

* delete update_metrics_ notation

* fixed wrong index problem

* removed unrelated files

* removed unrelated files

* removed unrelated files

* fix PEP8

* Fixed get_pretained_lm_head for BERT and ALBERT

* spelling check

* black formatting

* fixing tests

* bug fix

* Adding batch_size constraints to multi-GPU setting

* adding documentation

* adding batch size test

* black correct version

* Fixing batch size assertion

* generalize batch size assertion for more than 2 GPU setting

* reducing label loops in code

* fixing span forward

* Fixing span prediction forward for multi-GPU

* fix commonsenseQA forward

* MLM

* adding function documentation

* resolving nits, fixing seq_gen forward

* remove nit

* fixing batch_size assert and SpanPrediction task

* Remove debugging

* Fix batch size mismatch multi-GPU test

* Fix order of assert checking for batch size mismatch

* mlm training

* update

* sbatch

* update

* data parallel

* update data parallel stuffs

* using sequencelabel, using 1 paragraph per example

* update label mapping

* adding exmaples-porportion-mixing

* changing dataloader to work with wikitext103

* weight sampling

* add early stopping only onb one task

* commit

* Cleaning up code

* Removing unecessarily tracked git folders

* Removing unnecesary changes

* revert README

* revert README.md again

* Making more general for Transformer-based embedders

* torch.uint8 -> torch.bool

* Fixing indexing issues

* get rid of unecessary changes

* black cleanup

* update

* Prevent updating update_metrics twice in one step

* update

* update

* update

* Fixing SOP to work with jiant

* delete debugging

* tying pooler weights from ALBERT

* fixed SOP tie weight, and MLM vocab error

* dataset update for SOP

* removed pdb

* Fix ALBERT -> MLM problem, reduce amount of times get_data_iter is called

* delete debugging

* adding utf-8 encoding

* Removing two-layer MLM class hierarchy

* MLM indexing bug

* fixing MLM error

* removed rest of the shifting code

* adding

* fixing batch[inputs] error

* change corpus to wikipedia raw

* change corpus to wikipedia raw

* Finish merge

* style

* Revert rest of mlm_weight

* Revert LM change

* Revert

* Merging SOP

* Improving documentation

* Revert base_roberta

* revert unecessary change

* Correcting documentation

* revert unnecessary changes

* Refactoring SOP to make clearer

* Adding SOPClassifier

* Fixing SOP Task

* Adding further documentation

* Adding more description of dataset

* fixing merge conflict

* cleaning up unnecessary files

* Making documentation clearer about our implementation of ALBERT SOP

* Fix docstring

* Refactoring SOP back as a PairClassificationTask, adding more documentation

* Adding more documentation, adding process_split

* Fix typo in comment

* Adding modified SOP code

* fixing based on comments

* fixing len(current_chunk)==1 condition

* fixing len(current_chunk)==1 condition

* documentation fix

* minor fix

* minor fix: tokenizer

* minor fix: current_length update

* minor fix: current_length update

* minor fix

* bug fix

* bug fix

* Fixing document leakage bug

* Fixing document delimiting bug

* Cleaning up test

* Black style

* Accurately updating current_length based on when len for_next_chunk > 2

* SOP data generation insturctions

* Fix documentation

* Fixing docstrings and adding source of code

* Fixing typos and data script documentation

* Revert merge mistake

Co-authored-by: phu-pmh <phumon91@gmail.com>
Co-authored-by: Haokun Liu <haokunliu412@gmail.com>
Co-authored-by: pruksmhc <pruks22y@mtholyoke.edu>
Co-authored-by: DeepLearning VM <google-dl-platform@googlegroups.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jiant-v1-legacy Relevant to versions <= v1.3.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants