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

Staging 1bit adam v1 #348

Merged
merged 12 commits into from
Sep 3, 2020
Merged

Staging 1bit adam v1 #348

merged 12 commits into from
Sep 3, 2020

Conversation

awan-10
Copy link
Contributor

@awan-10 awan-10 commented Sep 3, 2020

This pull request is to bring 1-bit Adam to DeepSpeed.

@jeffra
Copy link
Collaborator

jeffra commented Sep 3, 2020

Two things to help proceed further with the tests:

  1. Can you add any required python dependencies to this file (e.g., cupy): https://github.com/microsoft/DeepSpeed/blob/master/requirements/requirements.txt
  2. Run these two pre-commit commands on your code to make sure the code is formatted to pass our checks: https://github.com/microsoft/DeepSpeed/blob/master/CONTRIBUTING.md#prerequisites

@jeffra
Copy link
Collaborator

jeffra commented Sep 3, 2020

All of these relative changes seem fine, thanks for this PR. I think after we address my points 1 and 2 above let's merge this into the staging branch. Then I'll create a new staging branch (v2) that we can PR everything into to do a more detailed review of everything. We can chat tomorrow in more details here.

@jeffra jeffra merged commit 70cbc46 into deepspeedai:staging-1bit-adam-v1 Sep 3, 2020
jeffra added a commit that referenced this pull request Sep 8, 2020
* 1-bit Adam v1 (squash) (#346)

* testing_onebit

* test_passed

* test_passed

* updated compressed_allreduce

* 123

* cpu2gpu test added

* Add non-cuda-aware code path. Segfaults for > 2 procs.

* Works for 4 procs with numpy buffers now. TODO: cleanup, evalute perf.

* Fix gather. Cleanup.

* Add new tests.

* Reduce memory footprint. BERT large with BS=16 works.

* Revert "Reduce memory footprint. BERT large with BS=16 works."

This reverts commit e7f38fc.

* Update optim to support bert-large.

* with initialization added on bert_onebit_adam

* This works!!

* Force igather for cupy. Better performance. Need cleanup and reorg to
support TCP now.

* X

* testing the fintune task for FP32 training

* Added the fintune taks for FP32 training

* With the control flag of freeze_step added

* added the freeze_step inside fp32_onebitadam

* Seperate freeze_kernnel added

* Added the sanity test for the Compressed_Allreduce

* Test for Compressed_Allreduce passed, but AllGather need sync.

* add checks for finetuning.

* Running passed for finetune on EastUs

* Add one bit adam clean file.

* Refactor comms. code and move it to a new file.

* fix compile/run errors.

* Adding changes for onebit_adam from Hank

* Save memory by modifying in-place.

Co-authored-by: Your Name <[email protected]>
Co-authored-by: Ammar Ahmad Awan <[email protected]>
Co-authored-by: tanghl1994 <[email protected]>
Co-authored-by: Hank <[email protected]>
Co-authored-by: root <[email protected]>

* Staging 1bit adam v1 (#348)

* Refactor to correct locations.

* Deleted unused files.

* Fix imports for refactored codebase.

* update the com reduce test.

* Fix some errors.

* Fix optimizer name

* Delete unused tests.

* Fix formatting for pre-commit.

* Add cupy dependencies.

* add cupy for cuda 10add cupy for cuda 10

* Add mpi4py requirement.

Co-authored-by: Ammar Ahmad Awan <[email protected]>

* Use correct initialization for exp_avg.

* Cleanup onebit adam.

* minor wording fix.

* Cleanup custom collectives.

* Fixes for TCP support.

* fix formatting. fix formatting.

* move 1bit adam reqs

* delay importing 1bit adam unless it's used, this will ensure we delay importing mpi4py

* Fix cuda version parsing.

* Temporary tcp fix.

* Update install.sh

* Refactor code to properly support cuda-aware comm.

* Fix imports.

* add cuda_aware flag to tests.

* Cleanup. Add copyrights.

* Add 1-bit Adam tutorial v1.

* Minor fixes to copyright and print statements.

* Update utils.py

* Update utils.py

Co-authored-by: Jeff Rasley <[email protected]>
Co-authored-by: Your Name <[email protected]>
Co-authored-by: tanghl1994 <[email protected]>
Co-authored-by: Hank <[email protected]>
Co-authored-by: root <[email protected]>
Co-authored-by: Ammar Ahmad Awan <[email protected]>
samadejacobs pushed a commit that referenced this pull request May 4, 2023
Co-authored-by: Jeff Rasley <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants