You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't reproduce 10B parameters GPT-2 training, CUDA out of memory #477
changed the title [-]Can't reproduce 10B parameters GPT-2 model training[/-][+]Can't reproduce 10B parameters GPT-2 model training, CUDO out of memory[/+]on Oct 20, 2020
changed the title [-]Can't reproduce 10B parameters GPT-2 model training, CUDO out of memory[/-][+]Can't reproduce 10B parameters GPT-2 training, CUDO out of memory[/+]on Oct 20, 2020
changed the title [-]Can't reproduce 10B parameters GPT-2 training, CUDO out of memory[/-][+]Can't reproduce 10B parameters GPT-2 training, CUDA out of memory[/+]on Oct 20, 2020
Hi @samyam!
I'm talking about zero-2 mode, not about offload to CPU. And that was exactly my question about checkpointing from the original post:
Do i need to turn on activations checkpointing to make it work? Or is there some other caveats?
I wonder what is the maximum size of the model that could be trained without checkpointing? Because it slows thing down a lot. The tutorial looks like it assumes that 10B model could be trained without checkpointing.
@ollmer I see now. Yes, on 32 V100 GPUs ZeRO-2 should work without offload, and yes you need to turn on activation checkpointing. Model size beyond a few billion parameters all need activation checkpointing to be enabled in addition to ZeRO-2 or ZeRO-Offload, which ever you might be using. We will clarify that on the tutorial.
The activation checkpointing will have about 33% overhead, often lower. Are you seeing a much larger overhead?
Activity
[-]Can't reproduce 10B parameters GPT-2 model training[/-][+]Can't reproduce 10B parameters GPT-2 model training, CUDO out of memory[/+][-]Can't reproduce 10B parameters GPT-2 model training, CUDO out of memory[/-][+]Can't reproduce 10B parameters GPT-2 training, CUDO out of memory[/+][-]Can't reproduce 10B parameters GPT-2 training, CUDO out of memory[/-][+]Can't reproduce 10B parameters GPT-2 training, CUDA out of memory[/+]tjruwase commentedon Oct 20, 2020
@ollmer Can you clarify how GPU count and RAM size?
ollmer commentedon Oct 21, 2020
It runs on 32 V100 GPUs with 32Gb RAM each.
ollmer commentedon Oct 21, 2020
Also worth mention that It's fp16 mode. So i expect optimizer state to require 120Gb of ram, which should be 4 Gb per GPU in zero stage 2 mode.
tjruwase commentedon Oct 21, 2020
Can you please share your training log?
tjruwase commentedon Oct 23, 2020
@ollmer Just wanted to follow up whether you could share your training log? Thanks.
ollmer commentedon Oct 26, 2020
Sorry for delay. Here it is.
failed10b_train_2_cuda_oom.log
tjruwase commentedon Oct 26, 2020
Thanks for sharing the log. Can you try the following?
ollmer commentedon Oct 26, 2020
I've tried it. Still got OOM.
failed10b_train_3_cuda_oom.log
tjruwase commentedon Oct 26, 2020
Thanks for sharing the log. I will try to repro this issue on my side.
samyam commentedon Oct 30, 2020
@ollmer the OOM you are seeing should be resolved by enabling activation_checkpointing in addition to enabling zero_offload.
ollmer commentedon Oct 30, 2020
Hi @samyam!
I'm talking about zero-2 mode, not about offload to CPU. And that was exactly my question about checkpointing from the original post:
I wonder what is the maximum size of the model that could be trained without checkpointing? Because it slows thing down a lot. The tutorial looks like it assumes that 10B model could be trained without checkpointing.
samyam commentedon Oct 30, 2020
@ollmer I see now. Yes, on 32 V100 GPUs ZeRO-2 should work without offload, and yes you need to turn on activation checkpointing. Model size beyond a few billion parameters all need activation checkpointing to be enabled in addition to ZeRO-2 or ZeRO-Offload, which ever you might be using. We will clarify that on the tutorial.
The activation checkpointing will have about 33% overhead, often lower. Are you seeing a much larger overhead?
ollmer commentedon Oct 30, 2020
Thanks for clarification! I'll measure the exact slowdown numbers and post it here later.
create branch for public release (#489)
xiexbing commentedon Sep 14, 2023
the software issue has been solved.