Skip to content

Can't reproduce 10B parameters GPT-2 training, CUDA out of memory #477

Description

@ollmer

Hi!
I'm trying to run 10B params model training on a 32 V100 GPUs, following the tutorial https://www.deepspeed.ai/tutorials/zero/#training-a-10b-parameter-gpt-2-model
But i consistently get CUDA out of memory even when i've reduced model size to 6B params and batch size to 1.
Here are my configs:

       --model-parallel-size 1 \
       --num-layers 40 \
       --hidden-size 3072 \
       --num-attention-heads 24 \
       --batch-size 1 \
       --seq-length 1024 \
       --max-position-embeddings 2048 \

deepspeed config

{
  "train_batch_size": 32,
  "gradient_accumulation_steps": 1,
  "steps_per_print": 100,  "gradient_clipping": 1.0,
  "wall_clock_breakdown": true,  
  "fp16": {    "enabled": true,    "loss_scale": 0,
    "loss_scale_window": 1000,
    "hysteresis": 2,
    "min_loss_scale": 0.0000001
  },
  "zero_optimization": {
    "stage":2,
    "contiguous_gradients": true,
    "overlap_comm": true,
    "reduce_scatter": true,
    "reduce_bucket_size": 50000000,
    "allgather_bucket_size": 500000000
  }
}

Hardware setup is 2 DGX-2.
Do i need to turn on activations checkpointing to make it work? Or is there some other caveats?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions