allenai / OLMo

Modeling, training, eval, and inference code for OLMo
https://allenai.org/olmo
Apache License 2.0
4.5k stars 453 forks source link

[Quick question]: How do I turn off FSDP? #703

Open candygocandy opened 1 month ago

candygocandy commented 1 month ago

❓ The question

quick question, is there any example script and yaml file that turn off FSDP completely? (I want to use DDP)

I am running it on a 7B model. I have A100 80GB. I guess this will fit onto the GPU right?

2015aroras commented 1 month ago

You can look at https://github.com/allenai/OLMo/blob/main/configs/tiny/OLMo-20M.yaml for a ddp example. You just need the following from there:

ddp:
  grad_sync_mode: batch
  find_unused_params: false
...
distributed_strategy: ddp

With just 1 GPU, FSDP doesn't do anything special and so there shouldn't be a need to turn it off.