Comments (5)
Yes it won't be balanced. But atleast it will "run" with Megatron Deepspeed. With the current approach, I was getting "empty parameter" errors during optimizer initialization. I believe this was happening on the second last pp rank, since it became parameterless.
from deepspeed.
@siddharth9820, thanks for reporting this error. I am curious if this is a recent regression due to the below PR that changed the balancing algorithm:
#4312
Can you please try earlier DS versions (v. 0.13.0 or 0.12.6) or revert the PR?
from deepspeed.
@tjruwase I am able to reproduce the error outside of Megatron-DeepSpeed as well -
I'll try the other versions too. Thanks for the pointer.
About potential fixes. - Could you first assign 1 layer to each rank first and then run this function on n-m layers and m ranks? But that wouldn't be an ideal fix if the weights aren't uniform.
from deepspeed.
@siddharth9820, thanks for the update. This seems like an implementation bug as I find it hard to believe both the new and old algorithms fail these seemingly practical cases.
- Old algorithm - Fast Optimal Load Balancing Algorithms for 1D Partitioning
- New algorithm - https://www8.cs.umu.se/kurser/TDBAfl/VT06/algorithms/BOOK/BOOK2/NODE45.HTM
from deepspeed.
About potential fixes. - Could you first assign 1 layer to each rank first and then run this function on n-m layers and m ranks? But that wouldn't be an ideal fix if the weights aren't uniform.
Yes, it does not seem like this approach would be balanced. I think it will only increase the minimum from zero to one. Right?
from deepspeed.
Related Issues (20)
- [REQUEST] Add documentation on how to run fast inference of `transformers` models with ZeRO-3
- [REQUEST] Any arguments for disabling saving global steps?
- [BUG] Jamba (Mamba+MoE) + ZeRO3 + LoRA training hangs
- [BUG] 3 GPUs is not as good as expectation compare with 2 GPUs; NV vs AMD performace; flash attention not support for AMD GPUs
- [BUG] Unexpected High Memory Usage (OOM) when finetuning Llama2-7B
- [REQUEST] Enable both CPU and NVMe for optimizer
- [BUG] Mismatch between dtype settings in model and ds_config results in NaN loss
- [REQUEST] Launcher mode with SSH bypass HOT 1
- FileNotFoundError: [Errno 2] No such file or directory: ':/usr/local/cuda/bin/nvcc' HOT 3
- [BUG] Uneven work distribution caused by get_shard_size changes
- [BUG] When initializing model_engine, if an mpu is specified, it can lead to an excessively large checkpoint size, and the checkpoint may not be convertible through the `zero_to_fp32.py` script.
- [BUG] Uneven work distribution caused by get_shard_size changes HOT 7
- [REQUEST] pynvml package seems to be deprecated in favor of nvidia-ml-py HOT 1
- [BUG] BertLMHeadModel.from_pretrained hangs when using zero-3 / zero3-offload HOT 1
- [BUG]Why ZeroOneAdam is easy to OOM compared to Adam optimizer?
- [BUG] Why the results were inconsistent in two identical tests with config zero2 + overlap_comm HOT 3
- [BUG] Zero3: Post backward hook is not triggered for submodules whose inputs have .required_grad=False HOT 1
- Get a error when use deepspeed training with torch.compile HOT 1
- [BUG]AttributeError: module 'torch.nn.functional' has no attribute 'scaled_dot_product_attention'
- [BUG] fp_quantizer is not correctly built when non-jit installation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepspeed.